Deferred Pipeline w/ Physically Based Shading

Yes. I’m using this project. You can check out my latest gameplay videos as examples: https://www.youtube.com/channel/UCk_tdqQvpyvvXzEVbW9ACLg

I’m using only those plugins:

  • bloom
  • color_correction
  • forward_shading
  • smaa

So I have disabled everything else.

The game runs at 40-50 fps on mobile nvidia 1050, it’s in pre-alpha state and still not optimized yet.

Hi,

First thanks for all your work on this very nice renderer.
I am trying to get the deployment process to work while using Render Pipeline with Panda, but having an issue. The build system can’t seem to find the rpcore module.

To test it I copied the setup.py and requirements.txt from Panda’s asteroids sample (which I can build successfully) to RP’s “00-Loading the pipeline” folder.

The setup.py output seems normal except I noticed this:

Building runtime for platform: manylinux1_x86_64
There are some missing modules: ['__builtin__', 'rpcore']

The win_amd64 builds without this message, and results in a folder of dlls and an .exe that appears okay. But when it runs it fails to do anything, and produces the following in output.log:

Traceback (most recent call last):
  File "main.py", line 39, in <module>
    Application().run()
  File "main.py", line 31, in __init__
    from rpcore import RenderPipeline
  File "C:\Panda3D-1.10.1-x64\python\lib\importlib\_bootstrap.py", line 983, in _find_and_load
    return _find_and_load_unlocked(name, import_)
  File "C:\Panda3D-1.10.1-x64\python\lib\importlib\_bootstrap.py", line 965, in _find_and_load_unlocked
    raise ModuleNotFoundError(_ERR_MSG.format(name), name=name)
ModuleNotFoundError: No module named 'rpcore'

The samples and all code I write using RP works fine so far when run as pure python scripts. I have the path set up as instructed in the demo code and don’t have any import errors in python. Is there something I need to do differently to include the rpcore module when building a binary? I’ve tried this with the rp_distributor version and the development version with the same result on Windows 10. Thanks for any help.

I think you need to either copy the rpcore directory into your project or in your setup.py make sure that it can be found (possibly by adding the directory containing rpcore to sys.path).

But it would be cool if RenderPipeline were distributed as a wheel on PyPI to make it easier to distribute.

After I posted I thought of that and tried both of those things… now I am seeing this in setup.py’s output in the same place:

Building runtime for platform: manylinux1_x86_64
There are some missing modules: ['StringIO', '__builtin__', 'cStringIO', 'cyaml', 'dumper', 'error', 'events', 'loader', 'nodes', 'rpcore.native.GPUCommand', 'rpcore.native.GPUCommandList', 'rpcore.native.IESDataset', 'rpcore.native.InternalLightManager', 'rpcore.native.PointLight', 'rpcore.native.ShadowManager', 'rpcore.native.SpotLight', 'rpcore.native.TagStateManager', 'rpcore.native.native_', 'tokens', 'yaml_py2.SafeLoader', 'yaml_py2.YAMLError', 'yaml_py2.load', 'yaml_py3.SafeLoader', 'yaml_py3.YAMLError', 'yaml_py3.load']

And output.log looks like this:

Traceback (most recent call last):
  File "main.py", line 40, in <module>
  File "main.py", line 32, in __init__
  File "C:\Panda3D-1.10.1-x64\python\lib\importlib\_bootstrap.py", line 983, in _find_and_load
    return _find_and_load_unlocked(name, import_)
  File "C:\Panda3D-1.10.1-x64\python\lib\importlib\_bootstrap.py", line 967, in _find_and_load_unlocked
    module = _load_unlocked(spec)
  File "C:\Panda3D-1.10.1-x64\python\lib\importlib\_bootstrap.py", line 677, in _load_unlocked
    spec.loader.exec_module(module)
  File "C:\Panda3D-1.10.1-x64\python\lib\importlib\_bootstrap.py", line 819, in exec_module
    exec(code, module.__dict__)
  File "C:\dev\render_pipeline\samples\00-Loading the pipeline\rpcore\__init__.py", line 32, in <module>
    from rpcore.render_pipeline import RenderPipeline
  File "C:\Panda3D-1.10.1-x64\python\lib\importlib\_bootstrap.py", line 983, in _find_and_load
    return _find_and_load_unlocked(name, import_)
  File "C:\Panda3D-1.10.1-x64\python\lib\importlib\_bootstrap.py", line 967, in _find_and_load_unlocked
    module = _load_unlocked(spec)
  File "C:\Panda3D-1.10.1-x64\python\lib\importlib\_bootstrap.py", line 677, in _load_unlocked
    spec.loader.exec_module(module)
  File "C:\Panda3D-1.10.1-x64\python\lib\importlib\_bootstrap.py", line 819, in exec_module
    exec(code, module.__dict__)
  File "C:\dev\render_pipeline\samples\00-Loading the pipeline\rpcore\render_pipeline.py", line 40, in <module>
    from rplibs.yaml import load_yaml_file_flat
  File "C:\Panda3D-1.10.1-x64\python\lib\importlib\_bootstrap.py", line 983, in _find_and_load
    return _find_and_load_unlocked(name, import_)
  File "C:\Panda3D-1.10.1-x64\python\lib\importlib\_bootstrap.py", line 967, in _find_and_load_unlocked
    module = _load_unlocked(spec)
  File "C:\Panda3D-1.10.1-x64\python\lib\importlib\_bootstrap.py", line 677, in _load_unlocked
    spec.loader.exec_module(module)
  File "C:\Panda3D-1.10.1-x64\python\lib\importlib\_bootstrap.py", line 819, in exec_module
    exec(code, module.__dict__)
  File "C:\dev\render_pipeline\samples\00-Loading the pipeline\rplibs\yaml\__init__.py", line 19, in <module>
    from .yaml_py3 import load as yaml_load
  File "C:\Panda3D-1.10.1-x64\python\lib\importlib\_bootstrap.py", line 983, in _find_and_load
    return _find_and_load_unlocked(name, import_)
  File "C:\Panda3D-1.10.1-x64\python\lib\importlib\_bootstrap.py", line 967, in _find_and_load_unlocked
    module = _load_unlocked(spec)
  File "C:\Panda3D-1.10.1-x64\python\lib\importlib\_bootstrap.py", line 677, in _load_unlocked
    spec.loader.exec_module(module)
  File "C:\Panda3D-1.10.1-x64\python\lib\importlib\_bootstrap.py", line 819, in exec_module
    exec(code, module.__dict__)
  File "C:\dev\render_pipeline\samples\00-Loading the pipeline\rplibs\yaml\yaml_py3\__init__.py", line 2, in <module>
    from .error import *
  File "C:\Panda3D-1.10.1-x64\python\lib\importlib\_bootstrap.py", line 983, in _find_and_load
    return _find_and_load_unlocked(name, import_)
  File "C:\Panda3D-1.10.1-x64\python\lib\importlib\_bootstrap.py", line 965, in _find_and_load_unlocked
    raise ModuleNotFoundError(_ERR_MSG.format(name), name=name)
ModuleNotFoundError: No module named 'rplibs.yaml.yaml_py3.error'

As far as I can tell though those modules should be visible… I made sure the contents of the RenderPipeline source folder were available with respect to main.py, so I guess now that it sees that source code this is what happens? Feels like I’m missing something obvious but I don’t know what.

I used to have an identical problem when exporting to PBS - when I used Bam exporter. The problem could be solved by choosing the version of bam 6.41. However, now I use Yabbee and get the difference in the rendering of the same material.

Original BAM.

Yabbee.

Sometimes when trying to load the EGG file obtained with the help of Yabbee. An APPCRASH event occurs in the libpandaegg.dll module with exception code c00000fd. However, when the model opens without problems with the help of the utility view PVIEW.exe

In a difference, it seems Yabbee ignores the PBS parameter record for the material.

  <Scalar> roughness { 1.0}
  <Scalar> metallic { 0 }
  <Scalar> ior { 2.5 }
  <Scalar> local { 0 }

Hmm… looking at YABEE’s code, it looks like it’s looking for a material attribute named “pbepbs”.

See this excerpt:

for m_idx in used_materials:
        mat = bpy.data.materials[m_idx]
        mat_str += '<Material> %s {\n' % eggSafeName(mat.yabee_name)

        if EXPORT_PBS and hasattr(mat, "pbepbs"):

Of course, I don’t know that there isn’t a problem elsewhere that’s preventing output…

(Just to check, you do have “Export PBS” checked in the YABEE export-screen, correct?)

I guess what’s the matter, most likely need to install a BAM exporter. It seems that he keeps this settings panel for the material. A check mark is useless without material data for PBS.

I would think that there would be some way to specify such a material in Blender, especially if YABEE is coded to look for some specific specification.

Unfortunately, I haven’t really worked with PBS, and so don’t know how one might specify this in Blender… :/

As I have indicated, need to install Panda3D BAM Exporter At the moment I am checking it.

I installed Panda3D BAM Exporter, however I cannot find this panel.

Perhaps blender 2.79b is incompatible with YABEE in terms of PBS export.

Ah, I see–I missed that earlier. My mistake!

Possibly, I suppose!

Well, I did a study on the PBS material API and came to the conclusion of creating a material editor on Panda3D in order to avoid problems with blender. However, I was faced with a problem that should be discussed in another thread.

Heh, I forgot that a tick is required to add Panda3D BAM Exporter :joy:. Indeed, YABEE and Panda3D BAM Exporter work together. I got the original material from the examples.