Rob Pieké

robp_sidefx

About Me

Expertise
Not Specified
Location
United Kingdom
Website

Senior Software Developer - Solaris

Connect

Recent Forum Posts

KarmaRender Viewport is empty Jan. 14, 2022, 2:44 p.m.

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!

KarmaRender Viewport is empty Jan. 14, 2022, 4:58 a.m.

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

Instancing input and orientation Jan. 12, 2022, 5:27 a.m.

jason_iversen
That'll be very convenient, thank you Rob. Does it follow the entire cascade we see in: https://www.sidefx.com/docs/houdini/copy/instanceattrs [www.sidefx.com] ?

It's very likely not an exact match for that page, but it's getting much closer.

My target is that you should be able to use the same SOP points (with N/v/etc) and feed them into either a Copy To Points SOP or an Instancer LOP (via SOP/Scene Import to first convert them to a USD point cloud) and get the same transformations of the instances coming out.

As/when differences are spotted, you know I'm only a bug report or forum post away