Jump to content
  • Advertisement

Archived

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

Doddler

Cipping with D3DX

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

Ok, here''s the problem... I''m trying to make a cool effect with D3DX. It''s going to be a portal. When I say portal, I''m not talking about a portal engine, I''m talking like a gateway. Your going to be able to look at the portal from all angles, and see another ''world'' on the other side. I know I can do this with 3d clipping, as in the clip mirror example. If I set the clip points to the outside of the portal, and render the scene beyond, it''ll give me what I want... but there''s a problem. If I render the other scene through the portal, any object that''s already been rendered in the clipping area will apear mess up the apearance of the portal... I could clear the zbuffer within the clipping area, but that means that any object obstructing view of the portal will also be cleared. I''m unclear as to how to do such a scene. If anyone knows how to solve this problem, it would be greatly appreciated . Thanks everyone for your time! -Doddler

Share this post


Link to post
Share on other sites
Advertisement
Assuming your world is divided into sectors, and areas on opposite sides of a portal are different sectors, is there some way you can guarantee that the sector containing the camera is drawn last? This would allow you to clear the z-buffer, draw the sector beyond the portal, and then draw the current sector, allowing objects in this sector to obscure the view of the portal. I''m not confident it''s a good method, but it might work, depending on your engine.

Share this post


Link to post
Share on other sites
Ok, that just might work! Actually, I found source on www.ati.com''s RAGE128 sdk, it doesn''t require a rage card, but it''s got some pretty nifty source examples, one of which is rendering to a texture to create a portal . Either way, just to get a little more knoledgeable on the subject, how would I clear a certain part of the ZBuffer? If I cleared the ZBuffer while the clipping is still set, will it only clear the clipping area?

Anyways, thanks for the help! I''ll see what I can make out of it!

-Doddler

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!