msNDS 3D render engine

Post Reply
pslDev
Posts: 5
Joined: Thu Jun 13, 2013 10:40 am

msNDS 3D render engine

Post by pslDev » Mon Jun 17, 2013 12:01 pm

Hi everyone,

As I said in another post, I'm developing, as a final project, a 3D engine for the NDS using libnds. The main objective of the project is to see and try the

posibilities of the 3D engine of the console. For that purpose I'm making the engine, that implements some intresting features beyond textured poligon drawing.

These are:
  • color per vertex + materials + texture (cpv can be used to simulate a texture)
  • render multipass: texture pass + 2nd texture pass + reflection pass (configurable order of 2nd texture an reflection passes)
  • Skeletal animation: transform animation and vertex sampling animation
  • Texture animation with sub-images
  • Billboarded objects (spherical/cylindrical)
The engine works with a model format created specificly for this project that converts a Milkshape ASCII file into one that holds the model data in DS fixed point formats (msNDS -> MilkShape to NDS :)). Additionally, this format holds some render and animation options.

I share an example that shows what the engine is capable. The controls are:
  • L/R change the model to render
  • SELECT changes the control mode between "model mode" (where you can zoom in (B)/zoom out (A) and move the model (arrows)) and "render options mode" (where you can enable/disable (A) some render options selecting theme with up/down and change some values with left/right)
The options available for each model depend on the model data.

If you take the time to try the example and you see any bug, please let me know.

Hope you like it!
Attachments
msNds_v3.part2.rar
(93.36 KiB) Downloaded 618 times
msNds_v3.part1.rar
(250 KiB) Downloaded 592 times

t377y000
Posts: 52
Joined: Wed Jun 02, 2010 3:14 am
Location: United States

Re: msNDS 3D render engine

Post by t377y000 » Sat Jun 22, 2013 7:53 am

hey what are you useing to animate?
also how did you put the animations with just libnds?

i used blender in the past with nitro engine, but later versions of blender md2 format exporting seem to be broken.

update: it appears part 2 is broken when i tried to extract it.

pslDev
Posts: 5
Joined: Thu Jun 13, 2013 10:40 am

Re: msNDS 3D render engine

Post by pslDev » Sat Jun 22, 2013 7:30 pm

I use MilkShape 3D to model and create the animations and export it to milkshape ascii format. This file is converted to a format we have specified in this project, wich holds all the model data, including the animation info. We have implemented 2 types of animation:
  • transform animation: for every joint of a skeleton, its translation and rotation in every frame are stored, so in render time i just have to translate and rotate the mesh assigned to this joint according to the current frame value. this system only works when a mesh (and its vertices) are controled by 1 joint.
  • per vertex animation: when a vertex is controled by multiple joints (skinning animation) the format converter detects it and stores each vertex position at every frame. So i have to update the vertex position frame by frame.
So i just animate using glTranslate and glRotate

t377y000 I just downloaded the files and extracted correctly... try downloading again...

Concerning the engine: I' ve implemented it as a library of functions that acts as a layer between the user and libnds. So, to render a model it is as simple as loading the model and its textures and calling the render function with the render options wanted and some functions of animation and render control. If anyone is interested and wants to take a look, when finished the first version I would share the code (well, I have to ask about this to my project director).

As I said recently in other post http://devkitpro.org/viewtopic.php?f=6&t=7235 I' m having troubles to implement the reflection effect, so if anyone knows about this, please help me! It's the last feature I have to implement to finish the project :D

pslDev
Posts: 5
Joined: Thu Jun 13, 2013 10:40 am

Re: msNDS 3D render engine

Post by pslDev » Sat Jun 22, 2013 8:46 pm

To make things easier here is a link to the example file:

https://www.dropbox.com/s/b6z5btq32tcrq0x/msNds_v3.nds

t377y000
Posts: 52
Joined: Wed Jun 02, 2010 3:14 am
Location: United States

Re: msNDS 3D render engine

Post by t377y000 » Sun Jan 12, 2014 11:55 pm

so when were you to release this engine? would be nice to test out.
is this like nitro engine?

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests