Confirmed. I started over with a height/terrain map. I put a white circle on the height map to create a column. A red dot on the terrain map in the exact same position - you’d expect a red top to the column right?
…nope. Not how it comes out. Flip the terrain map vertically and it is correct. A bug?
It doesn’t sound like a bug to me; it just sounds like a disagreement between L3DT and GeoMipTerrain as to which is the correct orientation to apply the map.
There are clearly at least two different common conventions. One tool chose one convention, the other tool chose the other one. It just means you need to adapt when you convert from one tool to the other.
Yup, that’s why I setBruteForce(True). Generate the full terrain in the highest LOD then write that out as a model.
The bam generation simply avoids the need to generate the terrain which, in my case, led to long load times.
I suppose I’m a little confused myself! If you follow the Panda3D manual when starting out, it has you using models for the world - not any terrain generator. Ditto with the examples (Roaming Ralph etc.).
I guess (and I’m sure I’ll be corrected if wrong!) that using a GeoMipTerrain with varying LOD is best suited to very large terrains. But if your world/game area isn’t that large - a model is better suited.
The point of the exercise/thread was a quick and easy way to get going with a 3D world for those who do not have 3D modelling experience (i.e., using GeoMipTerrain instead of sitting in Blender or similar creating the landscape).
Where on the height map did you put the dot? I can assure you - because I’ve done it several times now - that if you put a white dot, say, bottom right on the height map image… then red dot bottom right on the texture… they won’t come close to lining up until you flip one of the images. I’ve had other people try too with the same result using both the current stable release of Panda and the CVS version on both Linux and Windows.
As noted before, if it’s ‘convention’ that height/colour map be opposite vertically then so be it. If not - it’s a bug or an ‘undocumented feature’, hence I suggested a note in the manual.
output - I eyeballed the white/red dots so they are not perfect, but close enough to show I don’t need to flip anything.
Not saying you don’t need to flip anything, it sounds pretty clear that you do. Maybe I don’t understand what you are doing and I’m doing it differently??? Is this something specific to using BAM files that I’m not seeing by using geomipterrain directly?
They don’t do the same job, as setColorMap assigns vertex colours, so it’ll be lower quality (although when you’re using bruteforce rendering and if your colour map is the same size as the height map, there is indeed little difference in the result.)
Did you use Panda to load a .png from L3DT into a GeoMipTerrain and then create a bam file ? You need to set the Z scale before you call generate on the GeoMipTerrain. Something like show in the above post:
# Set up the GeoMipTerrain
terrain = GeoMipTerrain("genTerrain")
# Store the root NodePath for convenience
root = terrain.getRoot()
perhaps you don’t need to call root.setScale(4), but you do need to set some height with root.setSz()