Giter Club home page Giter Club logo

Comments (16)

bnagirniak avatar bnagirniak commented on June 23, 2024 1

Thank you for your detailed report, we still haven't tried renderman delegate, but it is in our plans. We expect there could be issues with new delegate.

-GL Renderer objects never have color.

This is known issue, it'll be fixed soon.

Overall, we'll walk with your report and such fixes are in our plans.

from blenderusdhydraaddon.

bnagirniak avatar bnagirniak commented on June 23, 2024

Sorry, UsdImagingLite is in our closed repo of USD. We have nearest plans to move its code into this repo, so it'll be available there soon.

from blenderusdhydraaddon.

bnagirniak avatar bnagirniak commented on June 23, 2024

For your development, you can temporary comment code with UsdImagingLite, it is used only in final_engine.py. Final rendering won't be available for RPR delegate but will work for GL delegate.

from blenderusdhydraaddon.

pellerington avatar pellerington commented on June 23, 2024

Thanks I was able to launch it. I had to change:

-from pxr import UsdImagingGL, UsdImagingLite
+from pxr import UsdImagingGL

in src/hdusd/engine/final_engine.py

and also:

- default='HdRprPlugin',
+ default='HdStormRendererPlugin',

in src/hdusd/properties/scene.py

Thank you!

from blenderusdhydraaddon.

bsavery avatar bsavery commented on June 23, 2024

We're going to make it so that we can more easily work on linux. Stay tuned!

from blenderusdhydraaddon.

pellerington avatar pellerington commented on June 23, 2024

Exciting news, can't wait for the next update. Will happily test anything when it's ready.

Is the current implementation locked to the usd included delegates, or is the intention to allow any custom render delegate in the future?

from blenderusdhydraaddon.

bsavery avatar bsavery commented on June 23, 2024

You should/could be able to install your own delegate right now. But it would have to be compiled against the USD version in the plugin. We haven't tested this but that's the intention.

from blenderusdhydraaddon.

pellerington avatar pellerington commented on June 23, 2024

How do I link it, it's currently only giving me the option of GL?

from blenderusdhydraaddon.

bsavery avatar bsavery commented on June 23, 2024

You'd have to install whichever hydra delegate to libs/plugins. The code that searches for render delegates is here:

_render_delegates = {name: UsdImagingGL.Engine.GetRendererDisplayName(name)

Which delegate are you trying to use?

from blenderusdhydraaddon.

pellerington avatar pellerington commented on June 23, 2024

It's a custom one (not embree/renderman/arnold or any published delegate).

I see that you are moving usdImagingLite into the repo. Thank you for the quick update!

from blenderusdhydraaddon.

bnagirniak avatar bnagirniak commented on June 23, 2024

Yes, and Linux build is coming soon ;)

from blenderusdhydraaddon.

DeRobertC avatar DeRobertC commented on June 23, 2024

I came across a similar issue when I was trying to install Renderman as a USD hydra delegate. I'll preface this by saying I'm not a developer. I'm just a 3D artist interested in using this system.

Traceback (most recent call last):
  File "D:\Blender\2.93\scripts\modules\addon_utils.py", line 351, in enable
    mod = __import__(module_name)
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\hdusd\__init__.py", line 39, in <module>
    from . import engine, properties, ui, usd_nodes, mx_nodes, bl_nodes
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\hdusd\engine\__init__.py", line 39, in <module>
    from . import engine, handlers
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\hdusd\engine\engine.py", line 42, in <module>
    from . import final_engine, viewport_engine, preview_engine
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\hdusd\engine\final_engine.py", line 19, in <module>
    from pxr import UsdImagingGL, UsdImagingLite
ImportError: cannot import name 'UsdImagingLite' from 'pxr' (C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\hdusd\libs\lib\python\pxr\__init__.py)

After reading the documentation here I thought it was going to be something where I just run the build_usd.py script from Pixar USD and enable the options in the advanced build configuration while using the line arguments from here. I had to do a bit of folder renaming since Boost installation was failing but ultimately the traceback above was, what I think, the closest I got to installing the delegate.

After spending an embarrassing amount of time trying to figure this out I am stuck. If someone could lend some guidance on how to correctly add a delegate I would be very grateful.

(I'm using Windows 10, Blender 2.93.1, and the latest release from Aug 19 (v1.0.21-beta b0bf57e) )

Thanks!

from blenderusdhydraaddon.

bnagirniak avatar bnagirniak commented on June 23, 2024

Try the following:

  1. Add your options for build_usd.py script from Pixar USD here: https://github.com/GPUOpen-LibrariesAndSDKs/BlenderUSDHydraAddon/blob/master/tools/build_usd.py#L64
  2. Use our build tool https://github.com/GPUOpen-LibrariesAndSDKs/BlenderUSDHydraAddon#build-tool to build USD and all other projects required for this plugin.

from blenderusdhydraaddon.

bnagirniak avatar bnagirniak commented on June 23, 2024

@KY-Hage in your case from #111 it'll be:

        call_args = (sys.executable, str(usd_dir / "build_scripts/build_usd.py"),
                     '--build', str(bin_usd_dir / "build"),
                     '--src', str(bin_usd_dir / "deps"),
                     '--openvdb',
                     '--prman', '--prman-location", "C:\Program Files\Pixar\RenderManProServer-24.1",
                     str(bin_usd_dir / "install"),
                     *args)

from blenderusdhydraaddon.

DeRobertC avatar DeRobertC commented on June 23, 2024

I was able to get the custom build to finish, or at least I think it did. It produced a .zip file in the install folder and I was easily able to install it into blender. It was an issue on my end of doing things incorrectly. My apologies if you had spent time looking at my previous edit. I was able to successfully render and use the add-on just like the pre-built github release. However I did come across some issues.

As a quick note beforehand, I did edit the environment variables both listed in the command prompt window and on the Renderman USD page. As far as I understand they are correct.

Issues:

Minor:
-In general Blender would just immediately crash and close. Not really an issue considering I'm still trying to get this set up but I might as well state that.
-USD node tree would delete at times during my frequent restarts after Blender crashes. I expected as much consider I kept crashing Blender.

Major:

-Can't Render certain file types. Or rather at times certain file types refuse to work giving the error message as seen below. This would happen at times with any of the 5 file types I tried (PNG, JPEG, TIFF, OpenEXR, OpenEXR Multilayer) This message would appear almost always if I changed the render quality from full to medium. I did this just so I could test a little faster but the same message from before would appear. There was one instance where I tried to restart blender, then even my computer and neither worked to allow for a successful render without the same Osl error. Then I just selected cycles render then back to USD Hydra and I was able to render.

2021-09-29 04:38:04,650 ERROR hdusd.engine [27000]:
        Error in 'pxrInternal_v0_21__pxrReserved__::PlugPlugin::_Load' at line 258 in file S:\GitHub\BlenderUSDHydraAddon\deps\USD\pxr\base\plug\plugin.cpp : 'Failed to load plugin 'rmanOslParser': The specified module could not be found.
 in 'c:/Users/DeRobertC/AppData/Roaming/Blender Foundation/Blender/2.93/scripts/addons/hdusd_Renderman/libs/plugins/usd/rmanOslParser.dll''
        Error in 'pxrInternal_v0_21__pxrReserved__::NdrRegistry::_InstantiateParserPlugins' at line 961 in file S:\GitHub\BlenderUSDHydraAddon\deps\USD\pxr\usd\ndr\registry.cpp : 'Failed verification: ' pluginFactory '' EXCEPTION: Traceback (most recent call last):
  File "C:\Users\DeRobertC\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\hdusd_Renderman\engine\engine.py", line 85, in render
    self.engine.render(depsgraph)
  File "C:\Users\DeRobertC\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\hdusd_Renderman\engine\final_engine.py", line 158, in render
    self._render(scene)
  File "C:\Users\DeRobertC\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\hdusd_Renderman\engine\final_engine.py", line 116, in _render
    renderer.Render(self.stage.GetPseudoRoot(), params)
pxr.Tf.ErrorException:
        Error in 'pxrInternal_v0_21__pxrReserved__::PlugPlugin::_Load' at line 258 in file S:\GitHub\BlenderUSDHydraAddon\deps\USD\pxr\base\plug\plugin.cpp : 'Failed to load plugin 'rmanOslParser': The specified module could not be found.
 in 'c:/Users/DeRobertC/AppData/Roaming/Blender Foundation/Blender/2.93/scripts/addons/hdusd_Renderman/libs/plugins/usd/rmanOslParser.dll''
        Error in 'pxrInternal_v0_21__pxrReserved__::NdrRegistry::_InstantiateParserPlugins' at line 961 in file S:\GitHub\BlenderUSDHydraAddon\deps\USD\pxr\usd\ndr\registry.cpp : 'Failed verification: ' pluginFactory ''

-Every time i use prman to render Blender closes immediately. No matter if it's in view-port or in render. Scene or node-tree.
--I am using the free renderman license but as far as I understand there shouldn't be an issue since I believe it still fully installs renderman but your license is the limiting factor.
--There was one time when attempting to render it got stuck at Scene: View Layer | Start Syncing but I was unable to repeat this.
start sync

-GL Renderer objects never have color. This same thing occurred for me with the pre-built add-on you can download and install off the github release page. In view-port or in a render it will not have color. I am using the RPR shader default with only the diffuse color changed. No other settings enabled or changed. I will see the object if I'm using a HDRI (.hdr) but it is grey instead of having its proper color. It's a completely black render even if I have a light source (sun) in the sceen. This is using both scene or node tree as my data source.
gl view
gl render

-Can't use an HDRI: .hdr files work while .exr does not. Sometimes just enabling an .hdr in my world node would cause the previous Osl error making it difficult to pinpoint the real issue. I refer to the OpenImageIO plugin below.

2021-09-29 04:14:06,039 ERROR hdusd.engine [21336]:
        Error in 'pxrInternal_v0_21__pxrReserved__::HioGetFormat' at line 86 in file S:\GitHub\BlenderUSDHydraAddon\deps\USD\pxr\imaging\hio\types.cpp : 'Invalid channel count' EXCEPTION: Traceback (most recent call last):
  File "C:\Users\DeRobertC\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\hdusd_Renderman\engine\engine.py", line 85, in render
    self.engine.render(depsgraph)
  File "C:\Users\DeRobertC\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\hdusd_Renderman\engine\final_engine.py", line 158, in render
    self._render(scene)
  File "C:\Users\DeRobertC\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\hdusd_Renderman\engine\final_engine.py", line 116, in _render
    renderer.Render(self.stage.GetPseudoRoot(), params)
pxr.Tf.ErrorException:
        Error in 'pxrInternal_v0_21__pxrReserved__::HioGetFormat' at line 86 in file S:\GitHub\BlenderUSDHydraAddon\deps\USD\pxr\imaging\hio\types.cpp : 'Invalid channel count'

My initial thought was that it seems to be missing a few options during the build, referring to the USD Advanced Build Configuration guide.
My guesses were:
-It needs Osl enabled in the cmake build options. There is a note Renderman USD Imaging documentation mentioning OSL parsing plugins. I am unsure what exactly is needed for this build.

-I may need to enable OpenImageIO

-Not sure if OpenColorIO would be needed as well.

-I don't really know how to change the way the build works with cmake but after looking through some of the files I found the options.cmake file in S:\GitHub\BlenderUSDHydraAddon\deps\USD\cmake\defaults which does appear to have options for similar to what's in the USD Documentation.
--However I retried building it after having editing the options.cmake but I got the same OSL error. I must not know the correct way to add Osl to the build options.

I'm hoping this will be enough information to get this figured out. I really am interested in this and my lack of python and cmake knowledge wont make this impossible for me. At the very least hopefully my testing and documenting of it can help in the development a bit.

Thanks!

from blenderusdhydraaddon.

bnagirniak avatar bnagirniak commented on June 23, 2024

Discussion moved to #111

from blenderusdhydraaddon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.