On Fri, 2004-02-20 at 19:08, Sean R. Lynch wrote:
David Turner wrote:
How do you recommend doing "decals" on landscapes? For example, if a bomb hits the landscape, I want that spot to be black and burned. I can set an individual vertex to a black texture (well, with a few hacks to Soya), but that's not very good when your scale is 1 Soya Unit = 1 meter. Here's what I'm looking for: http://novalis.org/images/mockup/burned.jpg
I think the best way to do this is to composite your decal with the current texture at that vertex and set the new texture to the composited texture.
But that will fade out as it gets further from the vertex, which is not
what I want. I could do that for all four vertices of the quad that it
hits, but if it hits near the edge....
Isn't there a better way?
Well, you could put a face above the landscape, but then the LOD algorithm won't be able to do anything with it, and it may occasionally appear to float above or below the landscape or penetrate it. A feature probably needs to be added to landscape to be able to map a given image at a certain point on the landscape without fading. This would be good for things like skid marks and penguin marks (think TuxRacer)
Also, it's clear that landscapes are weak when dealing with cliff faces. Should I (a) reduce my scale and use much bigger maps (which, I assume, will have performance costs) or (b) put some sort of structure "on top" of my landscape to represent cliffs?
You can probably get away with using much bigger maps than you're currently using without too much of a problem. I think one unit per meter is fairly coarse. I think the LOD algorithm will handle this efficiently, though you may have to play with some of the parameters.
I'll try that when I get home -- I'm currently using a 129x129 map, and think it feel like about half the size I want, so...
That's tiny! I've been using 800x800 maps with no problems. I eventually plan to make "infinite" maps by swapping them in and out as the player moves around. I recommend storing the map data as a PNG or calculating it on the fly, though, since the current Soya file format is not very space efficient, even when compressed.
signature.asc
Description: OpenPGP digital signature
