Jump to content

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. 

 

Link to comment
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.

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...