create a paging landscape from an existing mesh

ghiboz

28-05-2007 07:46:02

hi!
I have a mesh that rapresents my landscape (Created in 3ds max).
how can I create a plsm with this mesh?

thanks!

Jerky

28-05-2007 09:08:54

You would want to convert your mesh into a heightmap, and then run that through the mapsplitter tool in order to get it into PLSM2. Check the main forum for how to do that (in the Artist forum). There was a thread recently that described how to get a heightmap from a mesh.

ghiboz

28-05-2007 09:43:11

You would want to convert your mesh into a heightmap, and then run that through the mapsplitter tool in order to get it into PLSM2. Check the main forum for how to do that (in the Artist forum). There was a thread recently that described how to get a heightmap from a mesh.
http://www.ogre3d.org/phpBB2/viewtopic.php?t=32402
is this?

so I need to make a grayscale image and a textured image...
but if the landscape is big, how is the better mode to make the image??
thanks again! :wink:

Jon

28-05-2007 22:45:10

If you are using a tool to generate the heightmap, I imagine it doesn't matter how big the mesh is -- as long as you have enough memory.

"Big" is a relative term. What is big to me may not be big for you. Give us an idea of the dimensions.

The split heightmap is enough to use the splatting modes. You only need the large texture if you want to use the image mode, and for large landscapes this isn't practical (given the texture size limits of most^h^h^h^h all cards. :wink:

I would start with one of the splatting modes and get an idea of how well that works.

ghiboz

28-05-2007 23:20:08

If you are using a tool to generate the heightmap, I imagine it doesn't matter how big the mesh is -- as long as you have enough memory.

"Big" is a relative term. What is big to me may not be big for you. Give us an idea of the dimensions.

The split heightmap is enough to use the splatting modes. You only need the large texture if you want to use the image mode, and for large landscapes this isn't practical (given the texture size limits of most^h^h^h^h all cards. :wink:

I would start with one of the splatting modes and get an idea of how well that works.

hi!
i searched but understand how works plsm and how make these things is very hard
I need a landscape for a car game, with long tracks, starts from 4, 5km to go over 20 (using NxOgre the unit is a meter)

thanks for the infos!
bye :wink:

Jon

29-05-2007 00:05:17

20k by what? Lets say 20kx20k for argument's sake, that is 400M as an 8-bit greyscale. That should be doable in one chunk, although I'd try to split that up into 16 5kx5k maps before running them through the mapsplitter. After they are ran though mapsplitter, the split files for the pieces not at the origin would need to be renamed (following the page/tile naming convention which should be apparent).

I'd recommend starting with something smaller. Get a 1kx1k map split and displayed, then worry about working with larger stuff.

I wonder what the largest map is that people have used? I do a lot of current work with a 4kx2k map.

ghiboz

29-05-2007 00:08:04

20k by what? Lets say 20kx20k for argument's sake, that is 400M as an 8-bit greyscale. That should be doable in one chunk, although I'd try to split that up into 16 5kx5k maps before running them through the mapsplitter. After they are ran though mapsplitter, the split files for the pieces not at the origin would need to be renamed (following the page/tile naming convention which should be apparent).

I'd recommend starting with something smaller. Get a 1kx1k map split and displayed, then worry about working with larger stuff.

I wonder what the largest map is that people have used? I do a lot of current work with a 4kx2k map.


but where I can find a tutorial or a sample step by step to use this thing??
thanks
:cry:

Jon

29-05-2007 02:33:59

Have you read the Wiki?

http://www.ogre3d.org/wiki/index.php/Paging_Scene_Manager

I think the necessary information is there.

ghiboz

29-05-2007 07:21:53

Have you read the Wiki?

http://www.ogre3d.org/wiki/index.php/Paging_Scene_Manager

I think the necessary information is there.

I read all... but there is nothing to convert a mesh in a map & heightmap

thanks for your time that you spend to post here! :wink:

HexiDave

29-05-2007 08:20:40

I don't use 3DS Max, but this was taken from the Maya version of converting mesh to heightmap:

1. From a top projection, map your mesh to Planar UVs (i.e. if you look down on the square of terrain, you'll have a 1:1 match with UVs).

2. Create a linear gradient from black (lowest point) to white (highest point) and apply that as a material to the mesh. This should make the lowest points black and fade into the highest points which should be white.

3. This is the part I can't really help you too much on, but you want to get a 1:1 projection of from directly above the mesh, such that the entire render is corner-to-corner of the mesh.

4. Make sure the image is scaled to a size that PLSM2 would take, which should be a 2^x + 1 (i.e. 257,513,1025,2049, etc) value.


The reason you wouldn't use a mesh, mostly, is the memory issue for sure, but you can't also forget LOD - you won't be able to get LOD to work if the whole mesh is in one piece (as the whole thing would have to change LOD), nor if you just split the mesh into pieces (the edges wouldn't match up).

Hope that helps.

ghiboz

29-05-2007 09:48:05

I don't use 3DS Max, but this was taken from the Maya version of converting mesh to heightmap:

1. From a top projection, map your mesh to Planar UVs (i.e. if you look down on the square of terrain, you'll have a 1:1 match with UVs).

2. Create a linear gradient from black (lowest point) to white (highest point) and apply that as a material to the mesh. This should make the lowest points black and fade into the highest points which should be white.

3. This is the part I can't really help you too much on, but you want to get a 1:1 projection of from directly above the mesh, such that the entire render is corner-to-corner of the mesh.

4. Make sure the image is scaled to a size that PLSM2 would take, which should be a 2^x + 1 (i.e. 257,513,1025,2049, etc) value.


The reason you wouldn't use a mesh, mostly, is the memory issue for sure, but you can't also forget LOD - you won't be able to get LOD to work if the whole mesh is in one piece (as the whole thing would have to change LOD), nor if you just split the mesh into pieces (the edges wouldn't match up).

Hope that helps.


thanks... but how can I do this in 3ds??
my problem are 2:
1: the mesh is big, how can I export completely?
2:how can I make the heightmap? (so I have only 256 levels of the height map?)

thanks again! :wink: