create 3d and include

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

Re: create 3d and include

Post by lazyprogramer » Sun Feb 27, 2011 12:55 pm

I tried to use nitroengine and it works, but I didn't try the piece of source with the frame animation scheme yet.
I would use nitroengine, but I have problems with the camera settings: I can't zoom!? I looked in the source code
of the nitro engine camera perspective, but I don't know how to zoom. And I would be very grateful if I could zoom
because my models are very small...

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 » Sun Feb 27, 2011 1:50 pm

I tried to use nitroengine and it works, but I didn't try the piece of source with the frame animation scheme yet.
I would use nitroengine, but I have problems with the camera settings: I can't zoom!? I looked in the source code
of the nitro engine camera perspective, but I don't know how to zoom. And I would be very grateful if I could zoom
because my models are very small...
Perhaps you can put the camera closer to you models by reducing
the near parameter of the gluPerspective() call:
void gluPerspectivef32(int fovy, int aspect, int zNear, int zFar)
Hope this helps
--------------------------------
Welcome, my son, to the machine.
Pink Floyd.

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

Re: create 3d and include

Post by lazyprogramer » Sun Feb 27, 2011 4:42 pm

Doesn't work! If I use it nothing happens...
BTW: Is it possible to load more than 1 model out of the data folder with nitroengine?

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 » Sun Feb 27, 2011 8:20 pm

Doesn't work! If I use it nothing happens...
BTW: Is it possible to load more than 1 model out of the data folder with nitroengine?
I think you should not rely completely in this library, as WinterMute said,
it's quite a long time since it was last updated:

I just did simple testing with the nitroengine and showed very very promising:
  • I could build the library without problems with the updated toolchain
  • All examples I tried to compile did compile though with some warnings
  • Same of the compiled examples provided strange problems:
  • [list]
  • On no$gba I got the "the rom-image has crashed" message
  • On DeSmuME these examples worked but gave a warning; "ARM9: BX using PC as operand"
  • On a real DS these example worked perfectly
[*]The animated models seem to consume too much cpu time[/*]
[*]There are a lot of interesting features like 2D interfaces or some physics[/*]
[/list]
I have no idea if you can load more than a model at a time, but suppose so.
I think this library could be a very valuable source of know-how about 3D on the DS
but not really an alternative to render today.
Last edited by eradsoft on Sun Feb 27, 2011 10:01 pm, edited 1 time in total.
--------------------------------
Welcome, my son, to the machine.
Pink Floyd.

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 » Sun Feb 27, 2011 9:05 pm

Doesn't work! If I use it nothing happens...
BTW: Is it possible to load more than 1 model out of the data folder with nitroengine?
Sorry, concerning the size of the models perhaps it has something to do with the range of vertex
coordinates. I suppose you are familiar with the restriction of vertices in the range of -8 to +8
upon rendering, perhaps you only has to scale the models. Formats like MD2 store vertices with
8 bits, then you have a scaling to fit the model to the real size.
Please inform us when you discover the solution
--------------------------------
Welcome, my son, to the machine.
Pink Floyd.

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

Re: create 3d and include

Post by WinterMute » Mon Feb 28, 2011 12:18 am

I'm impressed that it still compiles.


The crashes and "errors" with emulators are probably an issue with the emulators rather than the code if it works on hardware. I'm forever breaking emulators with libnds updates.
Help keep devkitPro toolchains free, Donate today

Personal Blog

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 » Mon Feb 28, 2011 8:34 am

I'm impressed that it still compiles.

The crashes and "errors" with emulators are probably an issue with the emulators rather than the code if it works on hardware. I'm forever breaking emulators with libnds updates.
This nitroengine seems to be quite a fine piece of work.
I think taking a deeper look at the source is very interesting por anyone who wants
to do something in 3D on the DS.

I found its animated models can be either interpolated or not,
and that animation not only changes vertices and
normals but also texture coordinates :shock:
--------------------------------
Welcome, my son, to the machine.
Pink Floyd.

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

Re: create 3d and include

Post by lazyprogramer » Mon Feb 28, 2011 3:29 pm

Okay, I will have a look at the nitro engine's source maybe I will found some nice stuff then I will tell you!

But first I will look if my models are to big... Does anyone know how to get the vertices coordinates with Blender?
When I want to save my model as a md2 model my program (Blender) asks me for a scale factor
and a texture path! I don't need the texturepath, am I correct?

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 » Tue Mar 01, 2011 8:35 am

But first I will look if my models are to big... Does anyone know how to get the vertices coordinates with Blender?
When I want to save my model as a md2 model my program (Blender) asks me for a scale factor
and a texture path! I don't need the texturepath, am I correct?
I have found another blender to ds exporter by Gabe Ghearing
that may be useful for you: (I have not tested it)
http://ghearing.com/mtutorial/
A python script exports the mesh to Stanford PLY format,
then an standalone application reads the ply file (mainly text)
and allows you to choose what to export into a nds display list:
vertices (mandatory), normals, colors and texture coordinates.
It also asks for texture dimensions and a scaling factor for vertices.
All source is available and you can take a look at:
  • The blender python script to see how to access all geometry details
  • The plytods cpp of the conversor
  • Some interesting hints on the page about using blender to model
    for the ds
I'm afraid no animation is considered. Perhaps you can also dive
into the blender to md2 python script to see how different frames are
accessed.

Of course on the ds you only need to load the texture and bind it before sending
the geometry, I think md2 files have a single texture per model.

Hope this helps
--------------------------------
Welcome, my son, to the machine.
Pink Floyd.

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

Re: create 3d and include

Post by lazyprogramer » Tue Mar 01, 2011 1:46 pm

Thanks, I think this will help me! :D

so this is my to do list:
-install python on my pc
-download the mesh to ply export script
/-download the updated ply export for Blender (http://ghearing.com/mtutorial/)
-create a md2 model
-convert it to a ply file
-convert the ply file with plytods.exe to a binary (http://ghearing.com/mtutorial/)
-include the binary

Is this way correct? Any details I should observe when I include the binary?

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests