[help me] Save the world to files

smino

11-03-2008 13:35:20

Hello, i'm newbie in plsm

At this moment, i am creating world editor using plsm. I can make the world and can deform the terrain too, but i don't know how to save the world back to files. Is there anyone can help me to save the world scene back to files???

Sorry about my little english ...

Thanks..

Maxi

11-03-2008 13:48:58

The default behaviour is that PLSM2 saves changes of the terrain on a page every time the page is unloaded.
You can change this behaviour with
setOptions("SaveDeformation",.

smino

11-03-2008 14:59:53

oh sorry about my question ...

i mean to save the texture of the maps, not the height of the map ..
thanks anyway ...

is there anyone can help me to save the textures of the maps ...

Maxi

12-03-2008 13:41:01

Normaly the terrain texturing is based on the values of the alpha map which should be saved just as the height map.
If your texturing is done anotherway I would need more information about it.

smino

13-03-2008 14:05:49

Oh really ?

Thanks for your concern at first. My friend told me to create some data(alpha map) in my main memory to manage the textures but i really don't know about the alpha map and how to manage it. I have some questions about that:
1. When does alpha map constructed ?
2. Is PLSM already implement the control of alpha map ?
3. Can you give me the sample code to make an alpha map (or where can i get it) ?
4. Can you give me the sample code to retrieve the data from alpha map an write it into the files or png ?

Sorry for my newbieness ... hehe
Thanx maxy ...

-smino-
Is there anyone can help me ... ???

Maxi

13-03-2008 14:55:07

First of all I'm far away from being an PLSM pro. Everything I know about was gained by a hard strugle with this scene manager :D


1. When does alpha map constructed ?

An alpha map is created for every page if you run mapsplitter and have "AlphaMaps=yes" in your *.gen.cfg file.

2. Is PLSM already implement the control of alpha map ?

I think the alpha map is used to texture the terrain if you set "TextureFormat" to one of the splatting techniques in your terrains config file.
I think it works this way:

For every pixel in your height map, there is a pixel/rgba color in your alpha map which is used to paint the vertex. The splatting shader uses the color to determine which texture is used to paint each pixel. However I'm certainly the wrong man if you want to know how it works in detail.

smino

13-03-2008 16:05:24

This is my config file :

LandScapeFileName=sumatra
FileSystem=LandScapeFileName

Width=2
Height=2
Deformable=yes

ScaleX=5000
ScaleY=5000
ScaleZ=5000
PageSize=1025
TileSize=129

TextureFormat=ImagePaging
ImageFilename=sumatra.texture

-end of file-

I have only two types of image files. They are :
1. for height map (e.g : sumatra.0.0.png. sumatra.0.1.png)
2. for textures (e.g : sumatra.texture.0.0.png, sumatra.texture.0.1.png)

Once my world editor success to load the world, i want to create another directory that contains the height images and textures images of my world. Can you explain the way to save the images from the running world in that new directory?

Thanks ... Please help me Maxy ...

smino

15-03-2008 15:44:07

Hi ... hello

is there anyone can help me ???

huhuhu

grelot

07-07-2008 22:04:52

http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=7542