L3DT users' community
Large 3D terrain generator

water mesh export

It doesn't hurt to ask...

water mesh export

Postby mcbeth » Sun May 18, 2008 7:52 pm

like the terrain is it possible to get the water mesh exported
mcbeth
Contributing member
 
Posts: 45
Joined: Wed Jun 27, 2007 10:01 pm

Postby Aaron » Mon May 19, 2008 12:34 pm

Hi McBeth,

Thanks for the request. IIRC, you can get the water map as a mesh, via a somewhat circuitous route:
* export the water map as a HFF file, and close your project.
* import the HFF file as a new heightfield.
* export the heightfield as mesh file (OBJ/X).

If you expect to be doing this often, I'll modify the OBJ plugin to natively support water maps.

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

Postby mcbeth » Mon May 19, 2008 3:30 pm

thanks does the method u outline exclude geometry where there is no water...um well I suppose not :oops:, but having the mesh would make getting a map with water at different altitudes much easier, I am assuming that the water is a seperate mesh created per body of water and not an advanced clipping or culling algo on a single mesh :(

anywat I,ll give it a go when I get home from work
mcbeth
Contributing member
 
Posts: 45
Joined: Wed Jun 27, 2007 10:01 pm

Postby mcbeth » Mon May 19, 2008 9:53 pm

o.k. I tried it but it returns my original heightmap :? what I'm look for is the water mesh geometry as it fits my terrain, the plan is to import it in my game engine and apply water fx it.
mcbeth
Contributing member
 
Posts: 45
Joined: Wed Jun 27, 2007 10:01 pm

Postby Aaron » Tue May 20, 2008 9:19 am

Hi McBeth,

Oops, I forgot to mention that the water map mesh will include the height of the water table. In most cases, this will closely follow the terrain height, so the water map mesh will look very similar to the heightmap (except on lakes).

I'll add it to my to-do list to export the water map mesh without the water table.

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

Postby mcbeth » Tue May 20, 2008 3:37 pm

thanks for making that clear and getting the meshes via export will be great for me.

on on a slightly unrelated noted are you aware that the terrain is exported with "cubic" demensions i.e x,y,z are exported with the same value making the terrain stretch at it's height changing the height scaling is simple enough in a modeller, I suppose.

and one more question can something be done to get deeper water bodies if u are to far past the design map phase and satisfied with the other aspects of your map, I have tried to generate a new design map from my heightmap but alot of important detail is lost.
mcbeth
Contributing member
 
Posts: 45
Joined: Wed Jun 27, 2007 10:01 pm

Postby Aaron » Wed May 21, 2008 10:17 pm

Hi McBeth,

mcbeth wrote:on on a slightly unrelated noted are you aware that the terrain is exported with "cubic" demensions i.e x,y,z are exported with the same value making the terrain stretch at it's height changing the height scaling is simple enough in a modeller, I suppose.


Hmmm...curious. This doesn't happen to me when I export the heightmap as a mesh, and then view it in Blender. Furthermore, I'm quite sure I've not written any code that would do this sort of rescaling automatically without asking you first. Which brings me to a few questions:
  • What is the size of the terrain (in pixels)?
  • Has any part of your pipeline involved saving/converting the heightmap to an image format (BMP/JPG/PNG/etc)?
  • In which program are you viewing the exported heightmap?

mcbeth wrote:and one more question can something be done to get deeper water bodies if u are to far past the design map phase and satisfied with the other aspects of your map, I have tried to generate a new design map from my heightmap but alot of important detail is lost.


Yes, you can open the 3D editor and use the raise / lower brushes to lower the sea/lakebed. You'll then have to re-flood the water bodies.

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

Postby mcbeth » Thu May 22, 2008 10:31 am

based on what u said, I retested, it would seem that this only happen if u rescale the map on export. I find it easier to work with higher resolution design maps....um unless........there is a setting that allow u to determine the number of segment a design map can have regardless of the size.
mcbeth
Contributing member
 
Posts: 45
Joined: Wed Jun 27, 2007 10:01 pm

Postby Aaron » Tue May 27, 2008 12:23 pm

Hi McBeth,

mcbeth wrote:I find it easier to work with higher resolution design maps....um unless........there is a setting that allow u to determine the number of segment a design map can have regardless of the size.


How funny you should ask; I'm working on this for the next release. Beta-ish support will be included in the next developmental build.

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

Postby mcbeth » Thu May 29, 2008 2:29 am

sounds good..............really got to suck it up and get a credit cards and me a pro license........I just don't trust them :oops: :shock:
mcbeth
Contributing member
 
Posts: 45
Joined: Wed Jun 27, 2007 10:01 pm

Postby Rummy » Sat May 31, 2008 4:17 pm

aaron wrote:Hi McBeth,

mcbeth wrote:I find it easier to work with higher resolution design maps....um unless........there is a setting that allow u to determine the number of segment a design map can have regardless of the size.


How funny you should ask; I'm working on this for the next release. Beta-ish support will be included in the next developmental build.

Cheerio,
Aaron.


Did this make it in?
Rummy
Contributing member
 
Posts: 49
Joined: Wed Jan 31, 2007 2:28 pm

Postby DeathTwister » Sun Jun 01, 2008 6:58 pm

Hahaha Funny this is a post right now guys as I just happen to have some of this very need myself. I am going to post a new post on game engines in just a few as soon as I upload th took, then when you look at the post you can see where I did not use the water, but just used the textures where I wanted the water to be. Now I can I guess make a flat plain like everyone else, or like what I had in mind to do was get a mesh, well not a mesh, but a .png, .jpg, .bmp, or TGA (depending on what is needed) out as a mesh like I did for the post. Then I can put after I do the texture maps for it I can add Shaders that I think will interact with the terrain better then if I just use a flat terrain , I think, but worth doing. Besides the Game Studio engine A7 treats the water like it does terrains so it should be awesome when done, so I am very interested Aaron in this whole area now that I have an engine that can work this way with water /winks....very very cool.

Anyway I should have it posted in 30 or less so maybe want to go take a quick peek at it at least then, to see what I am getting at. This is just the first terrain and is only a 512 map, I have 32K aka 2048 maps ready to go, but am using this as a test level for now, maybe a small real level later.



:twisted:
User avatar
DeathTwister
Dearly missed
 
Posts: 562
Joined: Thu Dec 15, 2005 12:30 pm
Location: Klamath, CA.

Postby Aaron » Mon Jun 02, 2008 8:38 am

Hi Rummy,

Rummy wrote:Did this make it in?


Yes, albeit in a rather beta-ish form. The wizards still assume a fixed HF/DM ratio of 64, but you can manually select the ratio in the menu:

Image

The above options will (re)generate the heightfield with the selected resolution ratio, ranging from 8x to 256x. Smaller ratios will give you finer control through the design map (good for small maps), whislt larger ratios will give you broad-brush control (good for very large maps).

I'll add a HF/DM ratio selector to the relavant wizards some time before the next stable release.

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

Postby DeathTwister » Mon Jun 02, 2008 2:53 pm

Cool /smiles
User avatar
DeathTwister
Dearly missed
 
Posts: 562
Joined: Thu Dec 15, 2005 12:30 pm
Location: Klamath, CA.

Postby Aaron » Wed Jun 11, 2008 12:58 pm

Hi All,

Getting back on topic...

To export the water map as a mesh, first download and install the new atConvertWaterToHeight plugin. This plugin requires the latest dev build of L3DT (v2.5.4.4, 10th of June 2008), so download and install that first if you haven't already.

Next, select the 'Extensions->atConvertWaterToHeight->Convert water map to heightmap' menu option. In the settings window, use the defaults and press OK. After this L3DT will show you the water height map. Finally, use the 'File->Export->Active map' menu option to export the water height map as an X or OBJ mesh file.

Please let me know if you have any problems.

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

Next

Return to Feature requests

Who is online

Users browsing this forum: No registered users and 14 guests