Anson Savage

AnsonSavage

About Me

Connect

LOCATION
Not Specified
ウェブサイト

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Get name of root primitive for a given node in Solaris 2023年9月29日13:43

Hi!



Suppose I have a setup like this. I'd like to write some code in either Python or Hscript that can return the name of the root primitive (I'd like to check and see if the name of the root primitive is equal to a certain name to perform some logic in my nodes).

I can get the name of the root primitive with:
`lopinputprims('.', 0)`

The string I need to compare it with is located at:
`chs("../current_department")`

(which would need to be prefixed with a / in order to be properly compared).

I need to use whether or not these strings match to drive a switch node. I've tried the following but I haven't been able to get anything that correctly switches the node depending on whether or not it works:



  • strcmp(`lopinputprims('.', 0)`,/`chs("../current_department")`)
    
  • strcmp(lopinputprims('.', 0),chs("../current_department"))
    
    (would need prefixing, but doesn't work either way)
  • if(strcmp(`lopinputprims('.', 0)`,/`chs("../current_department")`)==0, 1, 0)
    

What am I missing to make this string comparison work? Is there a way to do this in Python that would be cleaner (e.g., using husd)? It'd also be nice to get the number of root primitives so that I can ensure that there's a single root primitive at the top before it's exported.

Thanks!
Anson

Intensity values change in render after referencing in a USD 2023年9月28日17:39

robp_sidefx
Thanks, I can reproduce this. It's not immediately obvious to me if this is a Solaris or USD or RenderMan thing, but I'm going to have a closer look early next week.
Awesome! Yeah, I'm very interested in what's going on.

Intensity values change in render after referencing in a USD 2023年9月27日10:55

robp_sidefx
Can you send us a hip file for these?
For sure!

Here's the HIP file:
Image Not Found


To reproduce:
  1. Turn on the Renderman Ris setting in the Viewport (in Solaris)
  2. Click "Save to Disk" on the usdrop node
  3. See the differences in the sparks' intensity between the material assignment node and the reference node that pulls in the USD that was saved out by the usdrop

Thanks!
Anson