View Full Version : Clipping of some sort?
04-22-2002, 07:34 PM
First off, look at this image to get a clear idea of what I'm talking about:
Now. Is there a way to clip off that cap? I want to turn it into a pond, then blit some twirling quads around it for a water effect... could someone give me some pointers / Hints / Ideas / Resources... Anything would help. Thx in advance!
04-23-2002, 01:21 PM
Cmon' please... I need help here...
04-23-2002, 03:09 PM
If I understand right you want to create a pond in the middle of your landscape. You can't just clip that part or your polygon out since OpenGL only works with convex polygons. In other words instead of drawing one large quad and trying to cut a bit out draw lots of smaller ones leaving a hole in the center.
My crude ascii drawing might help(__ polygons, *** water part)
I have a feeling you might have thought of this idea but hoped there was a better way, anyway I hoped that helped.
[This message has been edited by Brent Fogarty (edited 04-23-2002).]
04-24-2002, 07:59 PM
the problem is that I have a quad over 6000 x 6000 and the lake is about 50 in diameter. I do not want to mess up my textures....
04-24-2002, 11:57 PM
Texture coord's are no problem that's just a simple calculation to find the new ones.
To do what you want can actually be done but I didn't mention it before because it will create an even bigger problem. You could I spose disable the colour writes and enable depth writes and draw a circle where the pond should be first then enable colour writes again and draw your quad. Because the circle would be on the same plane as the terrain that part of the terrain wouldn't be drawn because it wouldn't be infront of the circle. This will create more problems than it solves though when it comes to drawing other objects latter on so this is not practical.
In short split you quad up or draw your pond slightly above your terrain quad.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.