vm_rendervisibility behavior on packed prims?

   1550   8   0
User Avatar
Member
178 posts
Joined: Jan. 2013
Offline
… or primitives in general.

Is there a way to control ray visibility on a primitive level?

Cheers,
Jon
User Avatar
Member
8532 posts
Joined: July 2007
Offline
you can use Material Stylesheets to override Mantra Render Properties with the same targeting options as material overrides so even per packed primitive
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
7741 posts
Joined: Sept. 2011
Offline
You can only control it on packed primitives that don't share a detail, i.e. packed fragments cannot have individual visibility overrides.
User Avatar
Member
178 posts
Joined: Jan. 2013
Offline
Thanks! I'm embarrassed to ask, but I see how I can apply style sheets at scene and object level… where do I apply them at SOP level?

Thanks,
Jon
User Avatar
Member
8532 posts
Joined: July 2007
Offline
here is a simple example of Scene level stylesheets that target primitives of specific objects

file has 3 Styles:
1. targets just a single primitive of boxes object by primnum
2. targets just a single primitive of boxes object by name attribute
3. targets all primitives of spheres object and uses myrendervisibility attribute value to set vm_rendervisibility property directly


while this is using scene level MS definition, you can attach MS to an object in many different ways
- adding shop_materialstylesheet with MS JSON string directly to an object (possibly material too? not sure)
- creating primitive attribute material_stylesheet with MS JSON string on your geo
- maybe some other

but regardless, scene level MS can target your specific SOP geo so there should be no need to use other types of assignments just to get that functionality
Edited by tamte - May 16, 2019 12:03:56

Attachments:
ts_rendervisibility_stylesheets_overrides.hip (481.7 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
178 posts
Joined: Jan. 2013
Offline
Thanks for the example Tomas!

I'm packing multiple geo types into a SOP asset and want the asset to carry the visibility settings with it, hence the SOP-level request.

Cheers,
Jon
User Avatar
Member
8532 posts
Joined: July 2007
Offline
jpparkeramnh
Thanks for the example Tomas!

I'm packing multiple geo types into a SOP asset and want the asset to carry the visibility settings with it, hence the SOP-level request.

Cheers,
Jon
then try storing it in material_stylesheet attribute, I haven't tried using it, but in theory it can maybe be detail attrib and in that case maybe you don't need the object target in the json, just the prim targets
or then maybe individual material_stylesheet attribute per prim with it's own stylesheet definition of rendervisibility property
Edited by tamte - May 16, 2019 14:36:24
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
8532 posts
Joined: July 2007
Offline
here are 2 examples of geo level assignments
1. assigned as detail material_stylesheet attribute, still requires myrendervisibility prim attribute
2. assigned as prim material_stylesheet attribute, fully describing the visibility settings per prim

but overall the stylesheet definition is the same as scene level

Attachments:
ts_rendervisibility_stylesheets_overrides_declared_at_geo_level.hip (498.4 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
178 posts
Joined: Jan. 2013
Offline
Tomas,


Thanks! I forgot to reply back and let you know that I did exactly what your example shows and it works great!

I haven't used style sheets (at all, really) until now and always assumed they carried the same limitations as trying to apply object-level overrides via a primitive attribute. Apparently you can apply render overrides with style sheets that you can't any other way, which actually gets rid a lot of limitations I've run up against. Cool!

Cheers,
Jon
  • Quick Links