Textures

Started by
2 comments, last by Endar 18 years, 2 months ago
I created a land and dinosaur model with milkshape3d, put a few textures on it but nothing shows up. Dino demo This is my first demo I am trying to complete without looking at any tutorials(or not many) but this texture problem i ran into isn't something I covered. Is there a milkshape3d loader that would allow me to load the texture aswell as the model while keeping it the same difficulty level(or a little bit harder) as the plain loader nehe's tutorial uses? PS. Feedback on the demo would be cool, just remember i only started programming with opengl about 4 days ago. If you run the demo, the only two keys i implemented were to test out and fix the prespective. Left arrow key to turn left, right arrow key for right.
Hello?
Advertisement
Uh, not really sure what you mean, but you'll have to implement a loader for textures at some time, so you might as well write it now. I doubt that there is a combined milkshape-texture loader.

What "plain loader" are you talking about? I know that nehe have a tga loader. Not so sure about a bitmap loader, but it shouldn't be too hard to find.
[size="2"][size=2]Mort, Duke of Sto Helit: NON TIMETIS MESSOR -- Don't Fear The Reaper
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=31 This allows the model to load one texture, I Don't know wether i need to create a full body texture in a bitmap file meaning the head/body/legs/arms..etc are all on the same bmp or would i be able to load the textures using the milkshape 3d materials. When applying model textures to an object in milkshape, the textures get "binded" to the ms3d file so to speak. I am asking is there a way to load the model with the "binded" textures still appearing on the model.
Hello?
/** * Material for a milkshape model. */struct ms3dmaterial{	char name[32];		///< Name of the material	float ambient[4];	///< 4 components for the ambient material component (RGBA)	float diffuse[4];	///< 4 components for the diffuse material component (RGBA)	float specular[4];	///< 4 components for the specular material component (RGBA)	float emissive[4];	///< 4 components for the emissive material component (RGBA)	float shininess;	///< Shininess factor - from 0.0f to 128.0f	float transparency;	///< Transparency factor - from 0.0f to 1.0f	char mode;		///< unused	char texture[128];	///< texture filename (bitmap)	char alphamap[128];	///< alphamap filename (bitmap)};


Yes. You load the texture name at the same time as when you load the materials.

I'm sure you know this already, but milkshape models are generally split up into "groups". So, you have a bunch of triangles here, and they represent the head, another bunch here, which is the torso.

Each should have a material associated with it. The name of the texture for each group is in the material.
[size="2"][size=2]Mort, Duke of Sto Helit: NON TIMETIS MESSOR -- Don't Fear The Reaper

This topic is closed to new replies.

Advertisement