Lots of feature requests :-)

Falagard

28-05-2006 18:09:30

Is there a way to run mapsplitter/maputil over already split files?

For example, if I generate a terrain using libnoise then the user performs some deformation modifications - then wants to re-generate coverage maps which automatically calculate alpha values for the splatting textures based on material heights. Or, regenerate zhorizon so they can have shadowed terrain?

What I'd like to do eventually is give an option in the landscape editor in GOOF to allow the user to calculate zhorizon and coverage maps.

I'd also like to add functionality to the coverage map calculation to not only go by height, but also min and max heights and min and max slopes. That is what freeworld does and generates very nice splats which can then be edited afterwards using channel painting. I know that it becomes complicated by the fact that we have to sum to 1.0, but there's gotta be a way to do it, possibly with the assumption that higher layers have preference over lower layers when there is a conflict.

A couple other things I'd like to get working even sooner than that are shadow receiving on the terrain, and fog support. And then I'd like to look at adding horizon shadowing to the SplattingShader, and maybe even support for dynamic lights (per vertex or per pixel, I'm not sure yet).

I've looked briefly into adding fog to the SplattingShader and it shouldn't be too hard assuming that I can just output a FOG value and it'll work, however some people mentioned the fixed function fog (which I think that shader param is) works differently on different cards, and suggested doing fog in the pixel shader. I'd like to avoid that if possible, see if fog works without problems first.

Lighting, I assume, is as simple as adding lighting shader code and setting up a iterate per light section in the material.

I really wish the default Ogre scene manager had the ability to manually hook up lights to specific renderables instead of doing it automatically based on distance, but since it doesn't, I may want to look at adding that functionality into the PLM2 scene manager. The reason for this is that I want to have dynamic lighting on the terrain for things like campfires, or street lights or whatever, and the ability to specify whether a light affects the terrain or not, as well as having a sun directional light that affects meshes but not the terrain.

Thoughts?

tuan kuranes

30-05-2006 10:29:43

Is there a way to run mapsplitter/maputil over already split files?
Yes, I can easily add it in a clean way.
You would set it like computing a new map but doesn't call the processmap, so that maputil know map size, pointer to heightfield and so on,
but then directly call the different parts of computation (coverage, horizon, etc..).

Thoughts?
Coverage calculation, fog and lighting path seems feasible without big problems. Not sure about the per light renderables and scene manager howto. Did you post a thread about that on main forums ?