L3DT users' community
Large 3D terrain generator

Heightfield does not match exported mesh.

Got a problem or need advice?

Heightfield does not match exported mesh.

Postby joehot200 » Fri Nov 27, 2015 12:44 pm

Hi,

Here is a picture in blender of the exported mesh and a picture of the exported heightfield together:
Image

As you can see, they are completely incorrect. If I bring them down on each other, there appears to be hills where there weren't hills previously, and everything, although it somewhat seems to look like the terrain, doesn't appear to be in the right place.

I have tried:

[*]Rotating the terrain by 90, 180, and 270 degrees.
[*]Flipping the terrain & Negative scaling.
[*]Changing the scale of the terrain.
[*]Changing the tile it's on top of (It doesn't just not fit with the tile, it doesn't fit with any tile).

If necessary, I can just use a heightmap for my entire terrain instead of a model, however I would much prefer a model due to looking better graphically, and I need a matching heightmap for efficient collision detection.

Thank you again
Joe
joehot200
Member
 
Posts: 15
Joined: Mon Nov 23, 2015 10:48 pm

Re: Heightfield does not match exported mesh.

Postby Aaron » Fri Nov 27, 2015 2:54 pm

Hi Joe,

Hmmm, not sure, it seems to work for me. Here is the Sapphire render (using the heightfield):

sapphire_demo.png


...and here is the view from Blender, after exporting from L3DT as a 2x2 set of overlapped OBJ mesh files using a 257px tile size (original heighfield was 512px). Note after importing into blender, I manually translated the four tiles a little bit to create a gap so that you can see that they are indeed separate meshes.

blender_demo_800.png


I must admit I did find it a bit disorienting in Blender when only looking at the raw untextured mesh. Once I set the viewport shading to 'texture' it became pretty obvious.

blender_demo_menu.png
blender_demo_menu.png (8.57 KiB) Viewed 8191 times


If this doesn't work for you, can you please send me the original heightfield file (*.hfz) to aaron@bundysoft.com so that I can test it for you?

Cheers,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Re: Heightfield does not match exported mesh.

Postby Aaron » Sat Nov 28, 2015 2:40 pm

Hi Joe,

Thank you for the map files.

To make absolutely sure I hadn't messed up the orientation of anything, I drew a 'NW' onto the northwest corner of your heightfield (using Sapphire), and then exported the heightfield as a 2x2 set of OBJ tiles, the whole heightmap as one bitmap, and only the northwest corner of the heightfield as a bitmap. When I imported the lot into Blender (bitmaps imported as planes, as per your method), I got this:

blender_demo_day2_800.png


Note I did not import the southeast OBJ file, so as to leave some space for the bitmap planes (hence the chunk missing out of the textured mesh). I applied no rotation to any component, and only a translation and uniform scaling to bring the components into the one field of view. I did not use the bitmaps as displacement modifiers, partly because I couldn't immediately work out how, and partly because the bitmap planes are sufficient to show the orientations are consistent.

For completeness, I exported the OBJs from L3DT with the 'XZ plane, Y up' coordinate system (probably not the L3DT default), and imported it into Blender with the '-Z forward' and 'Y up' options (Blender default, I think). Did you use the same settings?

Best regards,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia


Return to Help and support

Who is online

Users browsing this forum: No registered users and 8 guests

cron