jon3de Posted February 13, 2017 Share Posted February 13, 2017 hi, I try to work with the relbbox node in a shader just like in sops but it doesnt give me the desired results. The picture below shows my network in the shader which I thought should give me a gradiant from bottom to the top of the box. But it looks like that I´m missing something. I read that P in shading context is P in camera space. But converting it from cam to obj space also didn´t change anything. I would be thankfull for some help here. Quote Link to comment Share on other sites More sharing options...
anim Posted February 13, 2017 Share Posted February 13, 2017 relbbox() requires geometry file to work on, it will not pick up geometry that's being shaded, so if your object is delay loaded, you can promote file input to the shader and put the same geometry file in there, if not, you'll have to export geometry to the file to reference in the shader or you can pre-compute relbbox as an attribute in SOPs and bind that in the shader 1 Quote Link to comment Share on other sites More sharing options...
jon3de Posted February 13, 2017 Author Share Posted February 13, 2017 Ah thank you Tomas, I came to this situation while working with alembic caches so the pre compute in SOPs workflow is no option. I saved my test cube out and used the file for the relbbox node. That worked. So i think I can also refer to some alemic cache instead and this solves my problem. May I ask you if this is the normal way of doing such things like gradiant in one axis etc. Im asking myself why does the Shader is not able to look up the dimensions of a cube in the scene but from a file on disk ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.