KarmaRender Viewport is empty

   759   5   2
User Avatar
Member
9 posts
Joined: April 2019
Offline
Hi

I have a really simple scene,
i try to render with Karma, but the Karma viewport is not showing the geometry
and the render is empty.

i am new on render with Houdini , maybe a forgot something

Thank for your help
Best regards
Daniel
Edited by dpotuznik - Jan. 13, 2022 12:38:27

Attachments:
karma.PNG (2.7 MB)
karma2.PNG (1.7 MB)

User Avatar
Staff
4031 posts
Joined: July 2005
Offline
I don't see anything obviously wrong there. Can you attach your hip file and some simple piece of geometry you're willing to share that demonstrates the issue?
User Avatar
Member
9 posts
Joined: April 2019
Offline
Hi,

it's working with mantra but not karma

thank you for your help.
i wish you a beautiful day.
Best regards
Daniel

Attachments:
karma3.PNG (2.6 MB)
RenderNFT_V1.0_bug_fix.hiplc.zip (12.6 MB)

User Avatar
Staff
118 posts
Joined: June 2020
Offline
Thanks for this example Daniel!

I'll give the quick-fix first, and the explanation below.

Somewhere in $HOUDINI_PATH(e.g., $HOME/houdini19.0), create husdplugins/objtranslators/rendernft.pywith the following contents:
import husd

class RenderNFTTranslator(husd.objtranslator.Translator):
    def shouldTranslateNode(self):
        return True
    def primType(self):
        return 'Xform'

def registerTranslators(manager):
    manager.registerTranslator('feeble::dev::RenderNFT::1.0', RenderNFTTranslator)

The Karma ROP uses a Scene Import LOP internally, which is responsible for translating Houdini geometry to USD. It uses Python plugins to handle the translation of custom node types, and ignores node types that don't have associated translators. This is what you've run into, though the warning is a bit hidden (if you dive into the Karma ROP and then the lopnet, you'll see it).

There's more information about writing translators here: https://www.sidefx.com/docs/houdini/hom/sceneimport_object_translator.html [www.sidefx.com]

Note that the Python code above is extremely minimal. If you want to support the display flag, for example, the translator's logic will need to be extended. The best place to look for an example is the GeometryTranslatorin $HH/husdplugins/objtranslators/base.py, which you should be able to use as-is.

I hope this helps!

- Rob
Edited by robp_sidefx - Jan. 14, 2022 05:07:20
User Avatar
Member
5014 posts
Joined: Sept. 2011
Offline
robp_sidefx
Thanks for this example Daniel!

I'll give the quick-fix first, and the explanation below.

Somewhere in $HOUDINI_PATH(e.g., $HOME/houdini19.0), create husdplugins/objtranslators/rendernft.pywith the following contents:
import husd

class RenderNFTTranslator(husd.objtranslator.Translator):
    def shouldTranslateNode(self):
        return True
    def primType(self):
        return 'Xform'

def registerTranslators(manager):
    manager.registerTranslator('feeble::dev::RenderNFT::1.0', RenderNFTTranslator)

The Karma ROP uses a Scene Import LOP internally, which is responsible for translating Houdini geometry to USD. It uses Python plugins to handle the translation of custom node types, and ignores node types that don't have associated translators. This is what you've run into, though the warning is a bit hidden (if you dive into the Karma ROP and then the lopnet, you'll see it).

There's more information about writing translators here: https://www.sidefx.com/docs/houdini/hom/sceneimport_object_translator.html [www.sidefx.com]

Note that the Python code above is extremely minimal. If you want to support the display flag, for example, the translator's logic will need to be extended. The best place to look for an example is the GeometryTranslatorin $HH/husdplugins/objtranslators/base.py, which you should be able to use as-is.

I hope this helps!

- Rob

Would it be possible for husdtranslators to use the translator associated with the base class of a node type if no translator exists explicitly for the node type? For example use 'base' for node types that subclass geo nodes, and 'hlight' for nodes that subclass the light, etc.
User Avatar
Staff
118 posts
Joined: June 2020
Offline
jsmack
Would it be possible for husdtranslators to use the translator associated with the base class of a node type if no translator exists explicitly for the node type? For example use 'base' for node types that subclass geo nodes, and 'hlight' for nodes that subclass the light, etc.

That sounds like a good idea. RFE created to investigate further!
  • Quick Links