Jump to content
hampuseh

Problem with instances and attributes in digital asset

Recommended Posts

Greetings!
I have a digital asset, it works as a tool to generate trees. You have the option to change the bark geometry, leaf geometry etc. These bark and leaf geos are instanced using the instance sop inside the digital asset. 

My digital asset is build in layers:
Digital asset - Obj Geometry - sops.

The base geometry of the leaves and bark have specific attributes to be used during the shading aspect. Example, the leaves have a edge attribute for edge tear detail.

However! From the shading in Redshift I can't access the attributes of the instanced objects. I can apply shading to my bark and leaves but not if I decide to use any of the attributes that the base geos have. Then the instances turn either black(point material), or white(primitive material). 

Since the attributes are created at geometry level the attributes don't show up when they are instanced. But I am certain that redshift shading should be able to read packed attributes. If I unpack the instances then my attributes show up and it all works but not is not a very good workflow when I have to unpack 300,000+ leaves. 

 

Share this post


Link to post
Share on other sites

Never used redshift and it is shooting in the dark without an example but You might need to use 'full instancing' instead of 'fast instancing' in order to pass attributes.

Share this post


Link to post
Share on other sites

Hey thanks for the input but I did find the solution with a lot of tinkering. 
When assigning Redshift materials and get them to render properly I had to output a Null from each different object I wanted to assign a material to. Then OUTSIDE of the tool I had to create a new geometry node for each null I created and then object merge the specific null for that geometry. With Redshift you have to assign your materials to the geometry node for it to render properly.

This was my work around and for me it works OK for anyone else seeing this.

Share this post


Link to post
Share on other sites

couple things... if you are using packed primitives, make sure you add a redshift spare parameters to your objects, and enable "instance sop level packed primitives" under the redshift OBJ > settings > instancing tab of your geometry network

second, are you using the sop-level instancer or the OBJ level instancer?  sop level instance doesnt actually instance anything its just a copy sop wrapped in an HDA. you want to be using the OBJ level instance

third, if you have nested OBJ networks inside a subnet you need to enable "render the OBJ nodes inside OBJ/SOP subnets" on the redshift OBJ spare parameters tab, which should be enabled by default. you should enable "force update OBJ nodes inside of subnets" in the IPR tab as well

finally, redshift only allows point attributes on geometry* (for the most part, prim attributes can be used for strands/hair, you can promote color to vertex attribute to eliminate point color bleeding from shared edges, etc) buts its a safe bet to promote all your custom attributes to point level BEFORE you pack anything.   Also if you have mismatched attributes when using packed primitives you are going to have a bad day, i.e. if you have color on your points on 1 thing and color on your source geo on another thing and merge them together that attribute will break in your shaders

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×