News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Lightwave

Started by sittingduck, March 25, 2008, 07:32:21 PM

Previous topic - Next topic

sittingduck

Do anyone know where i can get a parser for Lightwave data written in Masm?

u

There is no parser written in masm. Well, I've coded one, but gave-up implementing some of the more tricky things (which I actually need: multitexturing, weightmapping). Currently I have one, that is in C++ with custom garbage collection XD.
.lwo is a complete mess :) , and it's really bad to make your game use it instead of pre-processed offline data. It simply requires a lot of reallocation, concatenation, rearrangement of arrays.
Please use a smaller graphic in your signature.

sittingduck

Quote from: Ultrano on March 25, 2008, 07:45:18 PM
and it's really bad to make your game use it instead of pre-processed offline data. It simply requires a lot of reallocation, concatenation, rearrangement of arrays.

Thank you.
How about 3DSMAX is that a better option?

u

If 3DSMax outputs ".3ds" files, then maybe it's convenient. Though I don't know if it supports multitexturing, or how convenient the file-format is.

http://www.ultimategameprogramming.com/demoDownload.php?category=OpenGL&page=7
http://www.ultimategameprogramming.com/demoDownload.php?category=OpenGL&page=6

But you need the file-format docs to extend it.
Please use a smaller graphic in your signature.

Draakie

I've been working on a semi-proffesional .3ds (3DSMAX) parser in assembler. I'll post the code
in the OpenGL forum in a couple of days [ need to work on one or two things still].
Should be easy to convert to a .dll or something. Actually wanted to run it past Ultrano first - seeing
as he has become our defacto graphics expert. :lol

Luv's
Draakie
Does this code make me look bloated ? (wink)

daydreamer

Quote from: Ultrano on March 25, 2008, 07:45:18 PM
it's really bad to make your game use it instead of pre-processed offline data.
I wrote an .obj fileimporter for dx9 and I gave up on get it fast because the above and aiming for make a .obj filecompressor instead, because only converting from ascii->binary without all whitespace will reduce filesize by about  2.5times smaller, because this is the bottleneck of loading lots of meshes from disk matters lot more than write it in asm for least amount of time to process it
was thinking of option to let it convert to signed words, signed bytes if precisionloss doesnt matter that much, but especially interesting in the case of implement meshes you modeled in a 3d modeller into your asm demo


u

#6
The only optimal format (speed and size) is one that you directly copy to VBO buffers. Plus contains which ARB shaders to use, and layout of the VBO - where attributes are in the array, and what type they are.
Also, for drawing many models in a scene quickly, some classification of models is necessary. Insomniac Games have classified models in several categories: ufrags, ties,.. each with specific usage depending on how static the model is. The  PDF is "Resistance:FoM debriefing" at http://www.insomniacgames.com/tech/techpage.php

I've attached my .lwo importer, supports up to 8 UV coords/textures per vertex/surface. Uses the same stuff I use in asm ("foreach", lotsa macros,..), so it's rather trivial to port to masm code that is using my macros/libs/style.
I had coded it while not being clear enough on how to optimally use OpenGL shaders, so some overhaul will be necessary soon. [the optimal path with opengl is to use ARB shaders (asm code), which is precompiled from GLSL code with nVidia's cgc.exe]
Ah, face3.lwo (c) Ultrano :P


.3ds looks nice but limited. Anyway, there is no modern modeler centered on shaded-games, so lots of fix-ups have to be done in all cases.
Please use a smaller graphic in your signature.