gubar Posted November 28, 2019 Share Posted November 28, 2019 Hi, I've got a problem I want to solve. Basically - I want to have a layered texture with different UV sets on a flat object, but I want the layers to appear to have depth within the object, with parallax between the layers. So, I'd like the UVs to be offset by different factors, and that offset to be driven by objects position, distance, movement, rotation relative to the viewing and render camera. Normally I used Houdini for lighting so this is a challenge for me Any advice gratefully appreciated! Thanks, G Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted November 28, 2019 Share Posted November 28, 2019 Hi Steven, you can get camera coordinates using optransform() and cracktransform(). Here is a minimal example that shifts UVs based on the camera's position: matrix xform_cam = optransform('../../cam1'); vector pos_cam = cracktransform(0,0,0,0,0, xform_cam); v@uv = (v@uv + pos_cam) % vector(1.0); offset_uv_by_camera_position.hipnc 1 Quote Link to comment Share on other sites More sharing options...
gubar Posted November 28, 2019 Author Share Posted November 28, 2019 Hi Konstantin, thanks so much for taking the time to post this for me. I'm going to have a look into it right now! Great forum, thanks again. Steven 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.