Jump to content

Assign volume shader at SOP level


Recommended Posts

Hello!

I have created a material using Material Shader Builder with a Volume Core inside. While working on a project I have noticed that if I assign this material at obj level it works, if I assign the same material at Sop level it doesn't.  

It's not the first time that I have this problem but it's never been an issue since now. I really need to assign it at SOP level with some other materials.

 

In the hip I have created two boxes. One box has the material assigned at SOP and the other one at obj level. Any suggestions? Thanks in advance

material builder_test.hip

Link to comment
Share on other sites

Your shader is getting assigned alright (which you can test by using different shader) but i guess it has something to do with "uniform volume" render property which I guess should not be assigned per primitive but as a whole object in order to determine surface of a volume.

I guess when you pack an object beforehand - you are assigning material to the WHOLE, pack object, not just individual primitives - therefore it may work.

Alternatively, you could add your "uniform volume / volume quality / volume density" render properties separately on the geometry level.

material builder_test2.hip

  • Thanks 2
Link to comment
Share on other sites

Interesting, thanks Albert. Probably it makes sense that you have to assign the volume shader to the whole geometry being a little bit different from the other components.

 

I did several tests with different shaders and is just with the volume shader that it doesn't work correctly. 

But after all packing or, as you said, add the render properties on the geometry level is really quick to do, so not a big problem if I'll be able to remember in which shaders I have used the volume for refractions 

 

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...