Shading in OBJ or SOP ? Pros and Cons

   4844   4   2
User Avatar
Member
581 posts
Joined: July 2005
Offline
Hi all, a shader can be assign to a geometry in OBJ or SOP context.
In SOP context we can use several OP like Shader, or RMan Shader, in OBJ is strighforward, we can assign it in the shading tab.
Ok, but what are the pros and cons of the two methods, is better to shade in OBJ context or in SOP context.
I'm interesting in shading with mantra and renderman.

Thanks
Un saludo
Best Regards

Pablo Giménez
User Avatar
Member
321 posts
Joined: July 2005
Offline
Assigning shaders in SOPs presents more flexibility, as you can assign a shader to set primitive group. The downside is that if you have a large geometry, and it has to pass through a bunch of shader SOPs, then you chew up RAM fairly quickly. Plus, any tweak you make in SHOPs on a shader that's being assigned in a shader SOP will flag your geometry for a recook.

I personally almost never assign shaders in SOPs.

– Antoine
Antoine Durr
Floq FX
antoine@floqfx.com
_________________
User Avatar
Member
581 posts
Joined: July 2005
Offline
Thanks antoine.
If i shade in OBJ i found several problems:
To tweak the texture projection i need to shade in SOP context, there's no way to to that in OBJ context, using the UV… SOP and a Shader SOP is the only way to adjust the texture coordinates i know, i dont know a way to to this in OBJ context.
Another question is : if i have a subnet with several objects, and i want to assign a shader to all the objects in the subnet, there is a way to do this without assigning the shader object per object.
Un saludo
Best Regards

Pablo Giménez
User Avatar
Member
12461 posts
Joined: July 2005
Offline
This acutally goes along with an RFE I posted a while ago to be able to view OBJ-level shader assignments at SOP level. Also OBJ level lighting WITHOUT having to turn on the See-All toggle. I think this would help seam these two very seperate environments and help with issues just like this.

I prefer using object level assignments when I can because I am concerned about weighing down my models with shader strings baked into attributes. So, along the same issues lisux is having, I have to create a Shader SHOP and assign the same thing I intend to assign at the OBJ level just temporarily for when I'm adjusting UV's and such. This seems unnecessary and its easy to make several mistakes while doing this (incorrect assignments, unsynchronised assignments, forgetting to remove/undisplay the Shader SOP, etc).

Anyone want to second that RFE?
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
User Avatar
Member
321 posts
Joined: July 2005
Offline
lisux
Another question is : if i have a subnet with several objects, and i want to assign a shader to all the objects in the subnet, there is a way to do this without assigning the shader object per object.

There's a hack: use a primitive SOP and assign a ‘texture’ per whatever granularity you need, e.g. per object, per primitive, etc. (you might have to create a primitive attribute that contains the “number” of the original batch of geometry, using something like opdigits() ).

Then, put the shader string into this texture field as you would into the shader SOP (basically, check with the geometry spreadsheet to ensure that the string looks the same from the primitive SOP as it did from the shader SOP.

Finally, with an attribute SOP, rename the ‘texture’ primitive attribute to ‘shop_vm_surface’ or ‘shop_vm_displace’ as needed.

– Antoine
Antoine Durr
Floq FX
antoine@floqfx.com
_________________
  • Quick Links