PDA

View Full Version : How filled polygon wrap over the terrain?



ichimv
01-07-2004, 01:12 AM
Hi!

I have to display over the terrain some filled polygons. Polygon borders and its colours are known. Polygons can be convex or concave. I tessellated concave polygons using glu tessellator.
Can anybody advice me how to wrap these polygons over the terrain?
Thank you an advance.

orbano
01-09-2004, 09:20 AM
Can you tell me what you mean under wrapping? My english is poor. You want to project it onto a surface?

ichimv
01-09-2004, 11:34 PM
Originally posted by orbano:
Can you tell me what you mean under wrapping? My english is poor. You want to project it onto a surface?


My English is also poor. I'll try to explain you what I mean.
I have a 3D terrain. I used a CLOD algorithm to generate terrain surface. Over the terrain I want to display some filled areas with different colours. I generated a texture with filled polygons. This solution is working, but image quality is depended of texture resolution. Size of texture depends of resolution. Of course I split terrain in tiles. For very big terrains this solution will be very expensive. I think to keep in database only polygons and their colours and display polygons dynamically using stencil buffer. I think to use stencil shadow volume of each filled polygon projected on the terrain. What do you think about this?
Thank you.

ZbuffeR
01-10-2004, 04:25 AM
I think to keep in database only polygons and their colours and display polygons dynamically using stencil buffer. I think to use stencil shadow volume of each filled polygon projected on the terrain.
This should work, but may be quite slow, as anything using stencil buffer. Specially if you need many projected polygons.

If those polygons are static, you can try to clip the extruded polygon against the terrain. Go to the "math & algorythms" forum to have help on this.