Spyrogif Posted March 31, 2020 Share Posted March 31, 2020 (edited) Hello, I'm trying to make an effect but i'm stuck right now. Basicly i'm trying to make some point transformation in the z axis but i want to keep the same visual result with a given perpective camera. As an example. Let's say a grid made of points. When i'm moving randomly points on the z axis i want the same visual result looking throught the camera . Any idea ? Edited April 7, 2020 by Spyrogif Quote Link to comment Share on other sites More sharing options...
Skybar Posted March 31, 2020 Share Posted March 31, 2020 Move in Z from camera: vector campos = point(1, "P", 0); vector dir = normalize(@P-campos); @P += dir*ch("amp"); 1 Quote Link to comment Share on other sites More sharing options...
Spyrogif Posted March 31, 2020 Author Share Posted March 31, 2020 Thanks a lost Skybar, this is a perfect and elegant solution. Quote Link to comment Share on other sites More sharing options...
Spyrogif Posted April 7, 2020 Author Share Posted April 7, 2020 (edited) One more thing who's someway related. Do you have any idea how to match some points in screen space according to another one. I'm pretty sure this a very similar problem but i can't figure it out myself. The idea is to move green/yellow points in XY to match the blue\cyan according to a perpective camera. As a result primites should became invisible with camera projection or perfectly align. hip file attached. Thank you for your precious help. MatchingxzfromScreenSpace.hip Edited April 7, 2020 by Spyrogif Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted April 7, 2020 Share Posted April 7, 2020 (edited) Hi Io, you can acquire the camera transforms with: string cam = chs('camera'); matrix xform = optransform(cam); vector pos = cracktransform(0,0,0,0,0,xform); After connecting the point pairs to lines with the add SOP, you can set their point normals inwards using polyframe in order to shoot rays at the pig head. I am looking forward to what you come up with! lines_towards_camera.hipnc Edited April 7, 2020 by konstantin magnus 3 Quote Link to comment Share on other sites More sharing options...
Spyrogif Posted April 7, 2020 Author Share Posted April 7, 2020 Thanks this is a very clever way to do this. Quote I am looking forward to what you come up with! Working on some real life anamorphosis. Both solution are just awsome to takle this kind of subject. The skybar solution is perfect for turning a 2d graphic into a puzzle who forms the given 2d shape in a certain angle of view. Your solution is perfect to make the same effect but with a striped 3d object. With both solution you can hide an anamophis into an another anamorphis to make some kind of double illusion using paper or thin material supported by ropes. Thanks you guys. 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.