Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

3d-vertex to 2d-screencoordinates

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
4 replies to this topic

#1 IStrikerI   Members   

122
Like
Likes
Like

Posted 29 September 2001 - 05:46 AM

i need to convert a 3d-vertex to 2d-screencoordinates. how can i do that ? i thought about doing a special calculation with the vertex and the two matrices (projection and modelview).

#2 Crazy_Vasey   Members   

100
Like
Likes
Like

Posted 29 September 2001 - 06:58 AM

ScreenX = X/Z
ScreenY = Y/Z
ScreenZ = Z/Z = 1

giving you the (x,y) co-ords. That''s the way I know someone will probably know a better way :p

#3 Null and Void   Members   

1087
Like
Likes
Like

Posted 29 September 2001 - 07:27 AM

You can use gluProject and gluUnProject to convert back and forth. If you''re trying to draw a 2D object you can use an orthographic projection matrix.

[Resist Windows XP''s Invasive Production Activation Technology!]

#4 IStrikerI   Members   

122
Like
Likes
Like

Posted 29 September 2001 - 09:22 AM

yeah, thats the function i needed !! thx

but if someone has the real mathematical calculation for this,
please tell me !!

#5 masonium   Members   

118
Like
Likes
Like

Posted 01 October 2001 - 03:36 PM

I''m not sure of the exact mathematical calculation, but I know the vertex goes through the modelview and projection matrices in order to be displayed on a 2D screen






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.