Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Negative near plane for Perspective matrix?


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
1 reply to this topic

#1 maya18222   Members   -  Reputation: 191

Like
0Likes
Like

Posted 15 November 2012 - 05:46 AM

Is this possible?

I tried it with the DX api math library and it doesnt work as expected, so is there anyway of adapting the creation of of the perspective matrix?

The reason Im asking is because Im trying to draw lines that are drawn by transforming 3d points by a viewProj matrix, and then sending the XY values to a 2D line drawing library. This creates problems when one of the 3d points defining a line is behind the camera.

I could solve this by "sliding" the vertices to clip with the view frustum in 3d space, but im hoping the above would be an easier approach. Im not using the depth either, so precision isnt a problem.

Any ideas?

Sponsor:

#2 luca-deltodesco   Members   -  Reputation: 637

Like
0Likes
Like

Posted 15 November 2012 - 05:54 AM

Having a negative viewing plane doesn't really make sense, the viewing plane is representing your eyes essentially, a negative viewing plane would mean you are seeing things that are behind you at the same time as things that are infront of you; straight lines passing through z = 0 would not look like lines anymore; as things approach z = 0 the perspective transform moves things to infinity.

When you have things that are partially behind the camera, you have to clip the geometry to only render things that are infront of the camera plane

Edited by luca-deltodesco, 15 November 2012 - 05:55 AM.





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.



PARTNERS