Skip to main content
GameDev.net gamedev.net
🔒 Locked

Infinite Plane

Started by Agwan Sep 6, 2008 at 12:16 AM 2 replies 2.4k views
Original Post
Agwan
Agwan
Hi, I'm trying to render an infinite plane, that is rendered by using the projection/view information to render a visualy seemless plane. The image does a better job at describing. Problem So my question is how would i go about actualy implementing this?
oliii
oliii
no a specialist in that field, but ...

render the quad in light blue, and offset it by the camera position.

If you need to, you will also need to offset the texture coordinates. OpenGL allows you to do this automatically with simple procedural texture mapping (dunno about direct3d but it should be similar).

or you can use 4D vertex coords as well (it's a bit math intensive). That's how Doom3 renders its infinite shadow volumes.
Everything is better with Metal.
Agwan
Agwan
I've gotten it to work.
My algorithm follows four main steps.
1. Get intersection points with the view frustom.
2. Get the center of these points.
3. Sort them in a circular fashion around the center.
4. Render as a triangle fan.
zedz
zedz
sounds like youve overcomplicated it

A/ unproject the 4 corners of the viewfrustum using 1.0 for depth
or
B/ cast a ray through each of the 4 corners seeing where they intersect the required plane

once u have the 4 resulting verts u can draw a quad between them, watch out though if youre doing texture mapping, cause it mightnt play nice, due to it not actually being a quad. but u can fix this either by making it a real quad or altering the texture coords

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.