Page 6 of 7

Re: create 3d and include

Posted: Wed Mar 23, 2011 3:49 am
by zeromus
Don't underestimate your own valuable contributions

Re: create 3d and include

Posted: Wed Mar 23, 2011 2:11 pm
by lazyprogramer
My contributions are valuable? I didn't know that!

Re: create 3d and include

Posted: Wed Mar 23, 2011 2:44 pm
by elhobbs
lazyprogramer wrote:My contributions are valuable? I didn't know that!
I didn't know either ;)

sorry, you cannot say stuff like that and expect people to just let it go...

Re: create 3d and include

Posted: Wed Mar 23, 2011 3:35 pm
by Jordan_Gray
wow, this is totally off-topic :D

Re: create 3d and include

Posted: Sun May 08, 2011 4:47 am
by Lokiem
Swinging this back toward the topic. I have several questions, for any more experienced programmers.

1. Given that the NDS lacks an FPU, it's nearly impossible to have a model without float values, but even so, is the cost of using floats for model data negligible, or should you do an approximation converting the floats to ints?

2. Earlier in the thread it was mentioned for keyframe, bones (matrices) and bones (quats) as options when it comes to animation. Taking the best solution of bones (quats) is the cost on the CPU more effective than using multiple models in steps of the animation? Basically, a question of cost in CPU cycles vs cost in memory.

This isn't just about loading a model and animating it, so ideally, consider it in practical use for a game, the memory footprint and the CPU cycles become much more precious when it's not just about that singular model and animation.

Since I'm already asking this much, I may as well throw in this final question:

3. File format, .obj is a beautiful format when it comes to simply loading the model data, most other formats seem to hide away the data, or show it in a much less tidy manner. Is there a file format which can be exported from 3DSMAX which contains both animation data and model data, ideally in ASCII? Best file format I've seen that looks almost as tidy as .obj is .x and as far as I know, 3DSMAX doesn't export to .X.

Re: create 3d and include

Posted: Mon May 16, 2011 6:52 pm
by zeromus
1. you must do computations with fixed point. the cost of using floats is apalling.

2. using multiple models for animation steps would definitely cost less cpu. however you will run out of ram really fast. if you just have one object with a couple of anims it could work. just do the math, nummodels * meshsize * numframes and watch it hit 4MB in a moment.

3. i recommend exporting every possible format from max until you find one you like. since youll have to write your own nds importer anyway for animation data, you may as well pick whatever export format seems pretty on disk.

Re: create 3d and include

Posted: Wed May 18, 2011 12:31 am
by WinterMute
I could have sworn 3DS Max had an obj exporter tbh but the other option is to write an NDS exporter for Max

Re: create 3d and include

Posted: Wed May 18, 2011 2:11 am
by Jordan_Gray
WinterMute wrote:I could have sworn 3DS Max had an obj exporter tbh but the other option is to write an NDS exporter for Max
I was gonna say, hasn't anyone come up with a standardized method of making/using 3D models in DS games? I would think that, considering the long amount of time and the large amount of people devving, it would have been done in at least one way by now....

Re: create 3d and include

Posted: Wed May 18, 2011 7:41 am
by eradsoft
I think the only "standard way" to use 3D on the ds is via display lists,
i.e. a list of commands for the 3D FIFO that are issued to it in a chunk.
That could be a good option for single texture static meshes, there you can
issue colors, vertices, normals, texture coordinates and probably most
of the commands the 3D FIFO admits, I found an old document about it:
http://www.btinternet.com/~ahcox/DS/nds.pdf
The difficulties arise when you consider animation, you could have:
*Non conected meshes linked and animated with transformations inbetween them
*A display list per frame, that could allow deformations or any type of modifiers your modeller includes (memory expensive)

I am also looking for some "upper-level" method:
I have a student working in a project to use MilkShape 3D for modelling for the DS.
MilkShape is a simple (and somewhat unstable) low poligon modeller I use in my
Computer Graphics classes: http://chumbalum.swissquake.ch/
The project tries to convert from MilkShape ASCII to DS display lists and
later consider animation which is bone-based in MilkShape, where just experimenting.
This ASCII format is simple and we already can render it in a PC using
OpenGL and SDL. We also have a full featured converter to VRML that expandes
the functionality via comments in the MilkShape meshes, materials and joints,
providing sensors, animated textures, multiple animations per skeleton
and control over a great number of details.
I we arrive to a useful outcame we will share the code.

Re: create 3d and include

Posted: Tue May 24, 2011 1:19 am
by Lokiem
WinterMute wrote:I could have sworn 3DS Max had an obj exporter tbh but the other option is to write an NDS exporter for Max
3DS Max does have an obj exporter, however, obj's don't store animation data. Wish it did, but it doesn't. I have been looking into most file formats exported from 3DS Max, and had a look at writing exporters, there are solutions and now I just have to choose which to do.
Jordan_Gray wrote:I was gonna say, hasn't anyone come up with a standardized method of making/using 3D models in DS games? I would think that, considering the long amount of time and the large amount of people devving, it would have been done in at least one way by now....
I did use a tool that converted 3ds max files into .bin's which could be loaded at compile time as display lists, however animation isn't an option there, unless you do as eradsoft said and use less than desirable means to get animation. The tool was bugged and zeromus helped me out with that before, fixing the lighting issue it had. :P

When I get around to it, I'll let people know what solution I came to for animation.