Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

BlueGrass

3d space to 2d space

This topic is 6336 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need to project a triangle from 3d space onto its 2d plane so that i only have 2 coordinates instead of 3 for each point. My question is, how do i do this? If anyone''s interested, i''m using this to texture my models evenly so there is no stretching. I kinda flatten all the triangles onto one plane and place a texture over it so that it fits nicely. of course, I''ll have to try and keep the flattened mesh as rectangularly shaped as possible to use as little memory as possible. thanks BlueGrass

Share this post


Link to post
Share on other sites
Advertisement
Most modeling packages support this already. It is called UVW unwrap in 3D Studio MAX and simply UV mapping in Blender (which is free, by the way: www.blender.nl).



Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

Share this post


Link to post
Share on other sites
Take your 3d vector:
vold = <x,y,z,w>
and do the following:
vnew = <x/z * viewing distance, y/z * viewing distance, 1>
to get the new projected vector. To calculate viewing distance, you do the following calculation:
viewing distance = (viewport width/2)/tan(horizontal field of view/2)



Just because you're outnumbered doesn't mean you're wrong.


sharewaregames.20m.com

Edited by - furby100 on January 16, 2001 1:26:06 PM

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!