[help] Change terrain images in real-time

jguerra

05-03-2008 20:16:30

Hi.

I'm building a terrain editor, and i would like to let the user import a new heightmap, alpha maps and/or textures.

For example, when the users enters the application, it is presented a default terrain that can be deformed and textured. But the user might want to import an heightmap (or alpha maps) built in another application, or even change some textures. How can i do that?

Basically, how would i change the terrain images in real-time (or near real-time)?

I've done the following:
- Import terrain height map/alpha map;
- Split it to the current number of pages;
- Replace the old image with the new one;
- Page Update... LoadNow... LoadMap... etc... tried all the options i could think of, none worked...

Besides this issue, i've found that i'll have another problem when i'll try to import images bigger or smaller than the ones that are currently being used... aka TextureStretchFactor.

Thanks in advance,
jguerra