sipi Posted Thursday at 02:31 PM Share Posted Thursday at 02:31 PM How would you calculate the velocity of a moving geometry (consistent topology, static camera) in screen space? 1 Quote Link to comment Share on other sites More sharing options...
haggi Posted Thursday at 02:59 PM Share Posted Thursday at 02:59 PM You have a vex function called toNDC where you can use your velocity information to transform it to normalized raster coordinates. Even if it says it's only well defined in shading context it seems to work in sop as well. 2 Quote Link to comment Share on other sites More sharing options...
sipi Posted Thursday at 03:15 PM Author Share Posted Thursday at 03:15 PM (edited) 15 minutes ago, haggi said: You have a vex function called toNDC where you can use your velocity information to transform it to normalized raster coordinates. Even if it says it's only well defined in shading context it seems to work in sop as well. yeah, i guess i have to do something with the NDC stuff, but not clear to me how Edited Thursday at 03:15 PM by sipi Quote Link to comment Share on other sites More sharing options...
Librarian Posted Thursday at 09:22 PM Share Posted Thursday at 09:22 PM (edited) @sipi maybe //box ndc vector offset = {0.5, 0.5, 0}; vector cameraScale = set(ch("camera_X"), ch("camera_Y"), 1); if (@group_near) @P = set(@P.x, @P.y, ch("near")*-1); if (!@group_near) @P = set(@P.x, @P.y, ch("far")*-1); vector xformpos = @P * maketransform(0,0, offset,{0,0,0},cameraScale,{0,0,0}); @P = fromNDC(chs("camera_path"), xformpos); Edited Thursday at 09:27 PM by Librarian 1 Quote Link to comment Share on other sites More sharing options...
sipi Posted Thursday at 09:37 PM Author Share Posted Thursday at 09:37 PM (edited) This is what I could come up with. Uses 1 qLib node (Camera Plane ql). screen_space_velocity.hiplc Edited Thursday at 09:38 PM by sipi typo 2 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.