[LOD Meshes] ~ C code to create terrain .nif meshes?

Post » Sat Nov 17, 2012 11:32 am

Lately I've been trying to create a program that could read RAW heightmaps and find eligible vertices for a terrain mesh.

This program is more or less working fine. As it is now, it reads an input RAW and, through some simple calcs, it gives another RAW as output. In the output RAW you can see a simplified version of the heightmap, made of points in 6 shades from black to white, that visually reports the key points for a possible 3D mesh depending on the type of terrain feature they represent.

What I lack now is the knowleged needed to convert these vertices in 3D meshes, more exactly in .nif files.

So my question is: is there any place where I could get a tutorial on how to build .nif files through C code?
Or does anybody know how to do that?

I've tried reading Ethatron's Oscape source code, but there are very few references and explanations, which makes the whole thing pretty complicated. Just locating the portion of code where he calcs vertices has been tricky, and it's not said that's the whole thing.
He's also published different versions of the same program without too much of a description or explanation of the required files.

Actually, if anybody's already read the whole thing and knows what file contains the .nif references.....it would help a lot.


Thank you. =|
User avatar
Danny Warner
 
Posts: 3400
Joined: Fri Jun 01, 2007 3:26 am

Post » Sat Nov 17, 2012 3:26 pm

\io\geometry-nif.cpp contains the NIF exporting code. Basically, look for references to NifLib - That's the community maintained C++ library used for all things NIF related.
User avatar
Gavin Roberts
 
Posts: 3335
Joined: Fri Jun 08, 2007 8:14 pm

Post » Sat Nov 17, 2012 9:05 pm

Sounds complicated.....damn me for not being satisfied with what I have.... -.-'


Btw, I LOVE Machinarium and really liked Botanicula.... ^.^
User avatar
Jason White
 
Posts: 3531
Joined: Fri Jul 27, 2007 12:54 pm

Post » Sat Nov 17, 2012 11:23 pm

Have you tried contacting Ethatron directly?

Btw, I LOVE Machinarium and really liked Botanicula.... ^.^
Heh, I'm yet to try out the latter. Guess I better buy it soon.
User avatar
Toby Green
 
Posts: 3365
Joined: Sun May 27, 2007 5:27 pm

Post » Sat Nov 17, 2012 2:43 pm

I dont know where to find his e-mail address....I've only tried contacting him via several sites where he's a member.

And prepare yourself for a shock, because Botanicula has the same gameplay style, but a totally different environment. Actually it's pretty much the exact opposite! ^^
It's beautiful, maybe it just misses the same soundtrack quality. =o
User avatar
GPMG
 
Posts: 3507
Joined: Sat Sep 15, 2007 10:55 am


Return to V - Skyrim