Min Brush resolution (1x1) not small enough

mkiv

03-04-2008 04:41:29

Hi,

Having great success w/ETM2. I've got a working map editor that saves/loads etc etc.

Current problem - tanks firing projectiles to make shell craters. But the smallest possible brush size (1x1 pixel) is still making craters that are too large compared to the size of the projectiles, and it doesn't look as nice and round as larger (e.g. 8x8) sized brushes.

Is there a way to change the scale easily so that the brush sizes make smaller holes. i.e. can I fiddle with the 'Ogre Unit vector scale' variables in ETM to make 8x8 brush sizes do deformations about 10x smaller than default size??

btw - screenshots http://markivengine.blogspot.com/

CABAListic

03-04-2008 07:55:49

No. You can only edit terrain on a per-vertex basis, there's no way around this. If editing a single vertex is not small enough, then you have to increase the number of vertices of your terrain (but keep its size in Ogre units constant), so that you have more vertices per area to modify. Needless to say, this will hurt your performance.

mkiv

03-04-2008 11:34:54

Thanks - that worked. I doubled the vertex resolution to 257*257 and it looks reasonably good. It does make a very big hit to performance though, especially in the editor - which is almost non-functional on my average desktop.
I'm thinking that there may be CPU-cheaper alternatives to achieve the same effect (I'll let people know if I come up with anything), but I'll keep it in for now and see how it goes. It does look quite impressive to see artillery rounds deform the terrain and create dynamic obstacles - which is something that I haven't seen for years in a 3D game or simulation.

SongOfTheWeave

03-04-2008 11:39:18

Thanks - that worked. I doubled the vertex resolution to 257*257 and it looks reasonably good. It does make a very big hit to performance though, especially in the editor - which is almost non-functional on my average desktop.
I'm thinking that there may be CPU-cheaper alternatives to achieve the same effect (I'll let people know if I come up with anything), but I'll keep it in for now and see how it goes. It does look quite impressive to see artillery rounds deform the terrain and create dynamic obstacles - which is something that I haven't seen for years in a 3D game or simulation.


You simply cannot deform a mesh at a finer resolution than there are verticies to be moved.

Your only alternative is to fake deforming the mesh with some form of bump mapping, but that defeats your goal of "real deformation" of the terrain.

CABAListic

03-04-2008 12:23:53

Thanks - that worked. I doubled the vertex resolution to 257*257 and it looks reasonably good. It does make a very big hit to performance though, especially in the editor - which is almost non-functional on my average desktop.
I'm thinking that there may be CPU-cheaper alternatives to achieve the same effect (I'll let people know if I come up with anything), but I'll keep it in for now and see how it goes. It does look quite impressive to see artillery rounds deform the terrain and create dynamic obstacles - which is something that I haven't seen for years in a 3D game or simulation.

Just what is your average desktop? 257x257 isn't really that big, this should be working quite adequately. If that's already causing you troubles, then that might suggest that you've chosen a poor patch (tile) size or that you disabled LOD.

mkiv

03-04-2008 21:21:14

Thanks for that.

On closer inspection the biggest problem was that I'd scaled up my lightmap to match (256*256), and updating this in the editor was killing the CPU - so I scaled it back to 128*128 and the performance with the 257*257 vertex terrain is fine.

Regarding the tile size - I had it set to default tile size (33 I think), and tried 17 and 65, but it didn't seem to make any difference - is there a general rule of thumb for tile size related to terrain size? I'm assuming smaller tiles = more detailed, is that correct?

Thanks again.

CABAListic

03-04-2008 21:26:04

No, tile size has nothing to do with details, they are always the same. The lesser the tile size, the fewer LOD levels are available, but the more tiles might be frustum culled, and LOD can be adjusted to finer substructure, so parts of the terrain might already get rendered with less detail than they could if tile size was higher. On the other hand, it increases batching.

The higher the tile size, the less parts of the terrain can get frustum culled, and LOD can't be switched as immediately, so more triangles are potentially rendered, but with fewer batches. There's no real rule of thumb as to what fits a situation best, you'll have to experiment. But usually, 33 or 65 are fine.