Aller au contenu

Photo

NWN2 Terrain Importer rebuild


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
Celludriel

Celludriel
  • Members
  • 19 messages

Hey,

 

For the past weeks I have been hard at work to recreate the very first NWN2 Terrain Importer (pre YATT).  The original author abandonned it early in the life of NWN2 and didn't leave any source code.  So I had to decompile his DLL and go from there.  The decompiler had made a mess of the code, but with some preseverance I quickly had a first version where you could import a bitmap heightfile and generate a terrain.  It worked but well thats about all it could do.  The most famous feature was the L3DT import that could manipulate height, texture and add grass with trees where desired.

 

Unfourtunatly L3DT hadn't stopped developing either, they made improvements to their file formats, so I was forced to write an entire library in C# (I'm a java developer btw) to read L3DT files.  I could have done a half arsed job and just wrote a library to read those files.  But I wanted to do things right so I also had to write in a way to save L3DT files (which took me about 10 frigging days).  After that I could get back to the importer and finish up what I originally started.  Well I'm at a happy stage now cause it is working !

 

result:

NWN2%20Terrain%20importer%20L3DT%20resul

 

 

However it is terribly slow, and I had to kill a few features to make sure it would stay managable.  Using a bitmap picture for the attributes like texturing, trees and grass is out.  It now only works with a modern L3DT project.  Old L3DT projects will only work if the attribute map is of the new format.  The way the new attribute map format worked was just not in line with how a bitmap would work and I had to take concensus.  The Mosaic feature is also out but I have plans for that one.

 

I have some finishing up to do, disable the features that are out for instance so you can't crash the plugin by being stubborn and still trying to do it the old way.  This is currently on my todo list

 

todo

====

- disable removed feature controls

- move code to a new visual studio form project (the decompiler made a mess of things and I can't alter the GUI)

- attempt to improve performance by drawing the map in one big syncronized action instead of three now

- reintroduce mosaic feature in one way or another, with each mosaic creating a new area and closing the previous generated one + autosave between mosaics

- open source the entire thing so the source code will never be lost again !

 

for those impatient people that want to try it out again : http://users.telenet...rter 3alpha1.7z

I've included my test L3DT project but in principle you could create your own to try it out.  There might still be bugs !



#2
Morbane

Morbane
  • Members
  • 1 883 messages

so, what version of L3DT is functional with this plugin? will your version-ing change the L3DT version in the future?

 

i'm not entirely clear on how L3DT works, and just scribbling together a BMP sounded great for ending up with a terrain according to intention - but from what you said that ain't happenin any more?

 

texturing is part of the art, so 'auto-texturing' to me is not so important

 

this sounds like a lot of fun for exterior map design - looking forward to updates!

 

:D

 

your example pictured above - even if slow - seems fine - ever seen "terra coppa" plugin - its sloooow - but the community loves it.

 

how dramatic can the heights/depths be?



#3
Celludriel

Celludriel
  • Members
  • 19 messages

so, what version of L3DT is functional with this plugin? will your version-ing change the L3DT version in the future?

 

i'm not entirely clear on how L3DT works, and just scribbling together a BMP sounded great for ending up with a terrain according to intention - but from what you said that ain't happenin any more?

 

texturing is part of the art, so 'auto-texturing' to me is not so important

 

this sounds like a lot of fun for exterior map design - looking forward to updates!

 

:D

 

your example pictured above - even if slow - seems fine - ever seen "terra coppa" plugin - its sloooow - but the community loves it.

 

how dramatic can the heights/depths be?

 

Well I'm developing now with the following L3DT version

 

Version: 11.11 Std release build 1
Build date: 24-Nov-2011

 

as long as Aaron (the developer) doesn't change the file format anytime soon, it will be compatible with many versions of L3DT to come.  However I also authored the C# library to read the L3DT files now, so I will probably maintain it regardless (and open source that one as well, should anything happen, the source is there)

 

I took out the texturing by bitmap, however the heightfield by bitmap is still in there.  You can perfectly create a grayscale image and generate away.  The height steps are currently not configurable but maybe I can make those configurable.  Something to think about, they seem ok though.  Now for an L3DT heightfield it works slightly different

 

(height at pixel in real life meters / max altitutde in the map) * maximum height setting of the plugin

 

To me a value between 10 and 25 works okish.  The example you see here is with setting 10


  • Morbane et rjshae aiment ceci

#4
Morbane

Morbane
  • Members
  • 1 883 messages

bloody excellent - 

 

there are some nice pre-generated maps out there but defining specifics this way will really add to design logic vs storyline.

 

cheers



#5
Kanis-Greataxe

Kanis-Greataxe
  • Members
  • 158 messages

Looking good,  will make things easier for a lot of people



#6
Celludriel

Celludriel
  • Members
  • 19 messages

Well I recreated the GUI from the ground up, cleaned up all the messy code, and open sourced it ... that took me about an entire day :) 08:00 to 00:20 now.  But it's finished and working , last time I tried at least :)

 

http://neverwinterva...importer-3-v123

 

If you find a bug or it doesn't seem to run , let me know so I can check but now ... SLEEP !


  • Kanis-Greataxe aime ceci