Export to xyz format ?
13 posts
• Page 1 of 1
Export to xyz format ?Is there any method to export the heightfield map to xyz ASCII format?
Hi Seafire,
The bad news is that L3DT doesn't yet have an XYZ exporter, but I can add it to the to-do list. In the mean-time, you might like to try the DirectX '.x' exporter, as this writes an ASCII file that contains the X/Y/Z vertex points, which you could probably manually edit into the desired format for XYZ. Alternatively, you can try a little script I've written that will export the heightfield in an ASCII xyz point list [script follows at end of post]. I'm not sure if it's exactly the format you want, but if not, please reply here with the first few lines of an example file so that I can get the gist. The output of the script as it stands looks like:
To run the below script, select the 'Extensions->ZeoScript->Run script' menu option, and paste the code into the window. Please note that the script requires L3DT release 2.7 or later. If you do not have this version, I suggest you update now. Please also note that since this is a script, and not a compiled plugin, the exporter will be extraordinarily slow. It might take an hour or more to do a 1024x1024 pixel heightmap. It may also appear to hang or stop updating the progress bar, but don't worry, it's just not responding to Windows messages whist it exports the file. Anyway, I suggest you try this with a tiny map first (e.g. 128x128 heightfield pixels or less) before you use it in anger on a larger map. If the output turns out to be not what you wanted, please let me know, and I'll adjust it accordingly. If it is what you want, then I'll bash together a compiled plugin to write the XYZ format properly and much, much more quickly. Please let me know how it goes. Best regards, Aaron. PS: The script is:
Hi Seafire,
I can't start work on the 'official' plugin until I know the structure of the file format. Do you have an example XYZ file, by any chance? Alternatively, do you know of a published specification for this format? According to a quick Google, the 'XYZ' file extension is used for a couple of different (obviously incompatible) file formats, and without knowing which one you want, there's not much point in starting on a plugin. Cheerio, Aaron.
Aaron thank you for your interest. I'm developing new terrain for the simulator VBS2. It requires elevation data in XYZ ASCII triplet format. It also requires a 'satellite ' image (or other texture data) as PNG 24-bit RGB format which I don't think will be a problem for L3DT as it stands. I really hope a plug in can be created. VBS2 is a product of Bohemia Interactive Australia.
Hi Seafire,
I have a plugin for you to test. Firstly, you'll need to update to the latest developmental build of L3DT, which is v2.7 build 3, now on the downloads page under the 'developmental builds' heading. You can install this side-by-side with the stable release without one affecting the other. Secondly, download the XYZ plugin from here: http://www.bundysoft.com/wiki/doku.php?id=plugins:fileio:l3dtio_xyz If you've not installed plugins before, instructions are here: http://www.bundysoft.com/docs/doku.php?id=l3dt:userguide:extensions:install In the absence of any example files or detailed knowledge of the format requirements, I've made a few guesses about the XYZ format, including:
Best regards, Aaron.
Thank you again for the program. It succeeded nicely in exporting an '.xyz' file that I was able to import into the program that I would then utilize to finalize (ie place objects, roads etc ) onto to the terrain created in L3DT. I'm having some trouble though once in the program. It converts the xyz file to a .pew file. Instead of displaying a nice heightfield map I see a featureless light blue screen, and what makes it worse is the hideous shade of blue it is. Any ideas are welcome and I'll continue to work in the program which is called Visitor3. Again I really have to commend your support. It amazes me that you are more help from across the opposite side of the world than I could probably get in person from any shop down the street. Agin, thank you for your trouble,
Mike
Please disregard the above post. After some additional work I was able to get the L3DT xyz file into Visitor 3 without any problems at all; it worked beatifully. Your xyz conversion plug in was perfect. I'm loudly singing the praises of your product to others in the VBS 2 world. The next task is now to begin work on importing a texture image to serve as a 'satellite image' which the engine uses to set terrain surface textures. The resolution of the image should be either 1,2,4,8,16, or 32 meters/pixel. Is there a way in L3DT to set this parameter on the texture image ? The other question I have is , how can we combine the water image map with the texture map so that we have all of the water properly textured wuth the land in the same image ? Again you help is greatly appreciatted.
Hi Seafire,
In L3DT, the spatial resolution of the texture map depends on the resolution of the heightfield, and the texture/heightfield size ratio. For example, if you use a horizontal scale of 16m/pixel for the heightfield (as set in the heightfield size wizard), and a texture/heightfield ratio of 8 (as set in the texture wizard), you will get a texture resolution of 2m/pixel.
L3DT doesn't bake the water texture onto the heightfield, as these are two separate surfaces. I suspect you could do this in Photoshop, or else a plugin could be written. Cheerio, Aaron.
Thanks for your reply, so if I understand this correctly there is no way to have water textures on the texture map ? Where there is water there is only the 'sand' type texture ? I apologize if this is a a noobish question, just trying to understand.
Hi Seafire,
In short, no, there is no current way to bake the water surface texture onto the terrain texture. The reason is because it would look wierd and wrong from any angle other than directly above. Consider the image below: In this cutaway you can see the water texture on the water surface, and the terrain texture on the terrain surface beneath the water. If you were to bake the water surface texture onto the terrain texture, you would end up with a very strange looking seafloor that looked a little like the surface but was non-flat and in the wrong place. If you really do want the water surface texture baked onto the terrain texture, I could do this on the condition that I also bake the water height onto the heightfield, thereby eliminating the mismatch between a flat water texture on a non-flat seafloor surface. It still wouldn't look as good as a separate semi-transparent water surface with a water texture (see above image), but at least it wouldn't be as obviously wrong as mapping one surface's texture onto another. Would this do? Best regards, Aaron.
Aaron thanks for your help. For VBS 2 what I need is just a flat '2d' image with both dry land and water textures on the same image to serve as a 'satellite image' for the Visitor 3 software to then create its own suface textures. Your surface textures, both land and sea/water look great and would suffice for the satellite image without any problems and they would only really to be in the 2d perspective as far as my needs. Again thank you so much for your time and effort, how you find time for it all amazes me.
13 posts
• Page 1 of 1
Who is onlineUsers browsing this forum: No registered users and 9 guests |