gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Textures on a mesh

#43558 - iainprice - Tue May 24, 2005 4:48 pm

I have a mesh that I have made from a few hundred triangles. I have been using the textured cube demo and have got most of it working except textures...

The demo does a texture on each triangle, how do I apply a texture to my whole mesh? You know, cover it like a blanket ofver the whole thing...

Cheers for your help,

Iain.

#43565 - Lord Graga - Tue May 24, 2005 7:06 pm

Are you running on real HW? The current emulators has a very lacking texture support.

#43577 - iainprice - Tue May 24, 2005 9:10 pm

Both... I am playing around on the emu but always test stuff on the hardware... but the code I have for textures is from the cube demo, so I want to know how to modify it.....

#43814 - iainprice - Thu May 26, 2005 11:58 pm

Does anyone know how to use a large single texture over a surface made of several triangles.....

#44443 - LunarCrisis - Wed Jun 01, 2005 9:31 pm

You apply a texture to a mesh by applying a seperate piece of the texture to each face, which is a pain to do manually. If you are doing anything more complicated than a cube (which it appears you are), then you are going to want to use a 3d modelling tool to make a "UV mapping" for it, which is, as you said, taking a texture and wrapping it around the mesh like a blanket. Unfortunately, I don't know of any thing to export from these programs into something the DS can read.

I'm currently working on an export script for blender that will export mesh/uv data/textures from blender, but it's nowhere near ready for release yet.

www.blender3d.com
www.blender.org
_________________
If a tree falls in the forest and no one is there to hear it, why the heck do you care?

#44455 - dovoto - Wed Jun 01, 2005 11:54 pm

I have some maya obj converter code about somewhere (it is a pretty popular format). I will look for it this weekend.
_________________
www.drunkencoders.com

#44948 - iainprice - Mon Jun 06, 2005 10:13 pm

I have written a somple conversion program that takes a lwo from,ightwave and views it using a modified version of the cube demo. I don't know how to modify the code to make a UV map... the cube demo just uses an array of four points for each vector and has some sort of texture pack for each point. Does the UV map bear any resemblance to the ormals for each poly?