need help with wedge

   1929   3   1
User Avatar
Member
143 posts
Joined: Sept. 2017
Offline
Hi,

I´m completely new to TOPs, so my question might be really stupid, but what I´m trying to accomplish, is to get variations of a scene rendered out into folders.
There´s a few variations of geometry, which should be diven by Wedge1. This wedge should control the first Switch node, but also control the name of the folder, that the renders are saved in, set in the Renderproduct node, using the attribute "geo". Ideally, it would be a list of strings pulled from the Switch1 node (if set to "by name"). I tried pulling the values from the switch node, as well as setting up a list of strings manually, but was unable to get to the Switch node to work with a string input from a Wedge, so I resorted to drive the switch by integer, which worked, but wanted to set up a second Wedge attribute in the same Wedge node, that would be a list of strings called "geo_name" and drive the name of the folder to save the render in. The second attribute doesn`t seem to want to be refferenced though, and either resolves as empty, or as a constant of "2", that I have no idea whre it comes from.

The actual file name should come from the name of the lighting, which is controlled with another switch and another Wedge node with the attribute "lighting". This would ideally also be a list of strings pulled from the Switch2 node, but again, strings seem to be a no-go and only integers seem to work. At the same time, the attribute should drive the actual file name in the Renderproduct node.

The scene is built in Solaris and is being rendered in Redshift.
Test scene attached.

Thanks in advance for any help.
Edited by ivanmalek - Nov. 21, 2021 04:07:47

Attachments:
wedge.hiplc (1.2 MB)

User Avatar
Staff
600 posts
Joined: May 2014
Offline
In the file you attached, the Render Product node's file path is set to $HIP/render/`@test`/light`@lighting`.exr. However there doesn't appear to be an @test attribute on your work items -- you can middle-mouse click on the items to see the full list of attributes.

It seems like something in your file has created a geo_name context option -- that's where the value "2" is coming from. In the Context Options editor there's a menu-type context option with the same name, which will take priority over PDG attributes. You can use a P prefix on the attribute access in order to force it to use PDG attribute even if a context option exists, for example $HIP/render/`P@geo_name`/light`@lighting`.exr for the file path works for me.
Edited by tpetrick - Nov. 23, 2021 11:12:44
User Avatar
Member
143 posts
Joined: Sept. 2017
Offline
Thanks tpetrick, this makes things a lot clearer for me, the P@attrib is a really useful thing to know!

Cheers,
Ivan
User Avatar
Member
2 posts
Joined: April 2018
Offline
Hi,

Great piece of information here !
I am testing that on H19.5 and it solves as for Ivan my issue.
However P@attrib does not eval as @attrib if any Top network is currently evaluated or generated

Would it make sense that if no Top network is active that P@attrib value takes the @attrib value from the Context Options ? Rather than not being evaluated at all as it is at the moment ?
  • Quick Links