Jump to content

move 3D positions but keep screen positions.


Recommended Posts

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 by Spyrogif
Link to comment
Share on other sites

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.

projection.png.3702569dafa1cd9b955bc6137dd5fbda.png

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 by Spyrogif
Link to comment
Share on other sites

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.

image.png.564575a7b76919d0af5106deb7e2d238.pngimage.png.e3416318f2dc783289ae93bfb221b144.png image.png.f1a7dbbaaca6f1d87bc7f9a6b3a6e4e7.png

I am looking forward to what you come up with!

lines_towards_camera.hipnc

Edited by konstantin magnus
  • Thanks 3
Link to comment
Share on other sites

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.

 

 


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