Sign in to follow this  

problem with portals

This topic is 4304 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

Hello! I want to render indoor scenes using portals and sectores. I just started and already have problem. I want to use portals as teleportes. now: Free Image Hosting at www.ImageShack.us wanted: Free Image Hosting at www.ImageShack.us The blue quad is the portal and the rest is the sector. I only want to see the lines/triangles/objects inside the portal. Is there a easy and fast way to do this? I looked for tutorials, but they couldn't help, because the used portals as doors and windows and because of this they don't have the problem. Berion

Share this post


Link to post
Share on other sites
Well isn't your blue quad a "door"? If the effect you wish to achieve is seeing something only through a certain object on screen, you could just use that door technique (probably stencil buffer + clipping plane). In more complex cases you might render the stuff on the other side of the portal to a texture and then use it on your quad or other shape.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
any particular reason why you are doing it in wireframe?
is this a hardware or software engine?

My own portal engine is hardware accelerated, consequently.... I just use the Z-Buffer, and don't really care about getting the specifics of clipping stuff against portals, I only test if Any portion of the next sector is visible thru the portal, then render the whole thing

Share this post


Link to post
Share on other sites
One way to do this (in hardware) is to draw a quad of your portal, and use the stencil buffer... specifically:

draw your quad for the portal with writing to the stencil buffer, say value=1
then draw stuff "on the other side" but enable stencil testing with value==1.


Note: you need to draw the full quad, not jsut the outline (and of course clear all the buffers including stencil between frames).

Best Regards

-Kevin

Share this post


Link to post
Share on other sites

This topic is 4304 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this