create 3d and include

zeromus
Posts: 212
Joined: Wed Mar 31, 2010 6:05 pm

Re: create 3d and include

Post by zeromus » Wed Mar 23, 2011 3:49 am

Don't underestimate your own valuable contributions

lazyprogramer
Posts: 85
Joined: Mon Sep 27, 2010 5:26 pm

Re: create 3d and include

Post by lazyprogramer » Wed Mar 23, 2011 2:11 pm

My contributions are valuable? I didn't know that!

elhobbs
Posts: 358
Joined: Thu Jul 02, 2009 1:19 pm

Re: create 3d and include

Post by elhobbs » Wed Mar 23, 2011 2:44 pm

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...

Jordan_Gray
Posts: 23
Joined: Sat Jun 12, 2010 3:31 am

Re: create 3d and include

Post by Jordan_Gray » Wed Mar 23, 2011 3:35 pm

wow, this is totally off-topic :D

Lokiem
Posts: 4
Joined: Sat Jun 26, 2010 8:46 pm

Re: create 3d and include

Post by Lokiem » Sun May 08, 2011 4:47 am

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.

zeromus
Posts: 212
Joined: Wed Mar 31, 2010 6:05 pm

Re: create 3d and include

Post by zeromus » Mon May 16, 2011 6:52 pm

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.

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: create 3d and include

Post by WinterMute » Wed May 18, 2011 12:31 am

I could have sworn 3DS Max had an obj exporter tbh but the other option is to write an NDS exporter for Max
Help keep devkitPro toolchains free, Donate today

Personal Blog

Jordan_Gray
Posts: 23
Joined: Sat Jun 12, 2010 3:31 am

Re: create 3d and include

Post by Jordan_Gray » Wed May 18, 2011 2:11 am

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....

eradsoft
Posts: 30
Joined: Fri Dec 17, 2010 1:34 pm
Location: Either side of South Bypass, Madrid, Spain

Re: create 3d and include

Post by eradsoft » Wed May 18, 2011 7:41 am

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.
--------------------------------
Welcome, my son, to the machine.
Pink Floyd.

Lokiem
Posts: 4
Joined: Sat Jun 26, 2010 8:46 pm

Re: create 3d and include

Post by Lokiem » Tue May 24, 2011 1:19 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest