Textures on 3DS meshes

Blitz3D Forums/Blitz3D Beginners Area/Textures on 3DS meshes

Tobo(Posted 2008) [#1]
Dear all,

Is there a knack to adding a texture to a .3ds mesh?

No matter how I scale the loaded texture or the model, the entity I've created always appears as a single colour!

Many thanks.

Tobo.

PS. Searched - couldn't find anything.


big10p(Posted 2008) [#2]
Have you set the UVs correctly?


Tobo(Posted 2008) [#3]
I'm afraid I have no idea what a UV is.


Pirate(Posted 2008) [#4]
tobo,
check out ultimate unwrap3d...you can google it...awesome program...


Tobo(Posted 2008) [#5]
Unfortunately, i can't export without buying it. Catch 22 there, I'm afraid.

Could someone tell me what a UV is please? I still don't know.


mtnhome3d(Posted 2008) [#6]
a uv is a coordanate system on the mesh that tells where a 2d image is supposed to be displayed. instead of just having a texture work and look nice you need to unwrap the uvs. i don't know what modeler you use but there is usually an uv unwrapper in it.


PowerPC603(Posted 2008) [#7]
A UV coordinate is used to define which part of a texture is pasted onto your model.

It's the same as XY coordinates on a bitmap.
Let's say you have a texture (bitmap file) of size 200x200 pixels (this is not a power of 2, but in this example it will suffice).
If a vertex has the UV coordinates set to 0,0, then this vertex is pasted at location 0,0 (the pixel at the upper left corner).
A UV coordinate of 1,1 will paste the vertex at location 199,199 (the pixel at the lower right corner).

So let's say you have this texture (just created one quickly using paint):
http://users.telenet.be/vge/downloads/Texture.bmp

And you have a triangle with 3 vertices and their UV-coordinates:
http://users.telenet.be/vge/downloads/Triangle.bmp

The uppermost left vertex has UV coordinates set to 0.1, 0.1.
This means that this corner of the triangle is positioned at 20, 20(0.1*200) on the texture.
The second vertex (the uppermost right vertex) is set to 0.6, 0.6.
This vertex is then positioned at 120, 120 (0.6*200) on the texture.
The last vertex is set to UV coordinate 0, 1, so this corner of the triangle
is positioned at the lowerleft corner of the texture (0, 199) => (0*200, 1*200).

When you would draw this triangle over the texture, then you would have a triangle which has this area of the texture pasted onto it:
http://users.telenet.be/vge/downloads/Face.bmp


Zeotrope(Posted 2008) [#8]
Hi Tobo,

"the entity I've created always appears as a single colour"....does this mean it's all white? Untextured?

Not sure if you have too much info here. I mean, if you dont understand UV Co-ords...thats cool. The problem could be much simpler (and also may not be)

1st rule is to check that the object's texture is in the same directory as your model / mesh. If you created the model / mesh in 3ds-Max, by default, the texture needs to be the same dir.

Make sure max didnt alter your texture name on export. This can occur, if memory servs me right, if the texture name holds more than 8 characters. Max will abreviate this.

Check these things before you move on to the complexities of UV stuff. May save you time.

Just a thought!


Nate the Great(Posted 2008) [#9]
I had a similar problem. It all depends on what 3d program you use.


SLotman(Posted 2008) [#10]
3ds does not include textures. It's exported with UV maps only - so you have to load the texture and apply it to the mesh manually.


Nate the Great(Posted 2008) [#11]
It is easy to UV map if you use blender.

Here is a link

http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/UV_Map_Basics


Gabriel(Posted 2008) [#12]
3ds does not include textures.

Yes it does.


Nate the Great(Posted 2008) [#13]
http://www.blitzbasic.com/Community/posts.php?topic=79036


Zeotrope(Posted 2008) [#14]
I think Tobo's been UV overloaded!


Ross C(Posted 2008) [#15]
UV's are hard to understand if your new to 3d as such. Alot of modellers i've used don't even mention how they work. You get a U and a V slider and some option to apply the texture planar or cylindrical etc. I used this one modeller for a long time, and got pretty good with it (still use it now), but it never exported correct UV's into any format, other than it's own.

It wasn't till i came to blitz and messed with 3d i found out what they were :o)