rschlend
06-09-2006 04:10:44
Hi all--
First off, I love plsm, however I'm having some kind of scaling problem in the heightmap (the y axis) while using plsm. I've spent 10+ hours or so trying to figure out the root cause of this so any hints or help will be greatly appreciated.
What I would like to do is use freeworld3d to create a terrain and generate a road. I've been able to export the heightmap (16 bit raw), and generate the road mesh and load them in my app using plsm.
Everything looks almost "ok" but I've noticed a few things...
1) I've had to scale the road mesh based on the page size. This is easily solved however (by simply scaling the mesh when I export it from freeworld3d)
2) If the heightmap from freeworld is a flat plane at 100 units in the y direction, it is imported at 0 after running mapsplitter.
3) when I export the heightmap from freeworld3d, I get close to the right answer if I take the maximum value in the heightmap and use this as the scaleY in the *.cfg file.
4) In order to reduce the complexity I am just using one page, making a location on the heightmap 0 (in order to avoid the offset thing I see in step 2), and trying to scale it based on the maximium value. After doing all of this the road mesh still doesn't quite sit perfectly on the road. (If I make the entire terrain flat the road sits perfectly on the terrain)
From reading the source code and the experiments I've done above it seems like the problem is related to the maximum value in the heightmap.
If anyone can provide input as to why I am seeing these things, or how to accomplish what I'm trying to do I'd greatly appreciated.
Thanks in advance,
Rob
First off, I love plsm, however I'm having some kind of scaling problem in the heightmap (the y axis) while using plsm. I've spent 10+ hours or so trying to figure out the root cause of this so any hints or help will be greatly appreciated.
What I would like to do is use freeworld3d to create a terrain and generate a road. I've been able to export the heightmap (16 bit raw), and generate the road mesh and load them in my app using plsm.
Everything looks almost "ok" but I've noticed a few things...
1) I've had to scale the road mesh based on the page size. This is easily solved however (by simply scaling the mesh when I export it from freeworld3d)
2) If the heightmap from freeworld is a flat plane at 100 units in the y direction, it is imported at 0 after running mapsplitter.
3) when I export the heightmap from freeworld3d, I get close to the right answer if I take the maximum value in the heightmap and use this as the scaleY in the *.cfg file.
4) In order to reduce the complexity I am just using one page, making a location on the heightmap 0 (in order to avoid the offset thing I see in step 2), and trying to scale it based on the maximium value. After doing all of this the road mesh still doesn't quite sit perfectly on the road. (If I make the entire terrain flat the road sits perfectly on the terrain)
From reading the source code and the experiments I've done above it seems like the problem is related to the maximum value in the heightmap.
If anyone can provide input as to why I am seeing these things, or how to accomplish what I'm trying to do I'd greatly appreciated.
Thanks in advance,
Rob