Ultimate Tricky Mesh Question of the Week

Blitz3D Forums/Blitz3D Programming/Ultimate Tricky Mesh Question of the Week

Fredborg has some nice code to fill in an outline with tri's. If you could get all the intersect points, you could easily make the mesh using this code.

Another way you could do this.

It's similar to a lightmap, and may work better than the triangle idea, as you'll be able to blend the texture with the texture of the ground below. Create a texture to cover the area of the ground. Even if it's just the area in view. Then, each frame, point the camera from above, render ONLY the light polygons onto a black backround, or grey (128,128,128) depending on if you want thedark parts to darken, or remain a neutral colour. Then, COPYRECT this onto your texture used to cover the ground area.

If you do this every frame, you'll probably need to use the VRAM flag on the texture your copying to, you won't need to worry about the amount of light polygons, or the intersection. TIP: when rendering, you could try and change the camera view distance to just what you need to render the light polygons, giving you less chance of having overlapping issues.

I might give this a try when i get home to show you what i mean. It's pretty straight forward though :o)