[SOLVED]How To Load Texture from 3dsMax into Irr?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Read the obj+mtl specs, it's not a trivial file format. But even better use an exporter which supports those formats, or use a different format. Search the net for some examples wuch that you may learn from those.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Thomaskkc wrote:the code can put it in the .obj file ??
where is it put ?
and the systax is just mtllib filename.mtl??
any 3d format (and almost anything) in programming is text in the end. If you try opening the .obj file with a text editor you'll see what I mean, and you'll also see how hybrid's info fits into the picture. :wink:

@hybrid: many thanks for the assistance and the patience! :wink:
Thomaskkc
Posts: 134
Joined: Fri Sep 15, 2006 4:04 pm

Post by Thomaskkc »

I have add this

# Max2Mtl Version 4.0 Mar 10th, 2001
#
# Multi/Sub Material__38 (3) to come
#
newmtl 01_-_Default
Ka 0.6 0.6 0.6
Kd 0.6 0.6 0.6
Ks 0.9 0.9 0.9
d 1.0
Ns 0.0
illum 2
map_Ka Clothing.bmp
#
newmtl 02_-_Default
Ka 0.6 0.6 0.6
Kd 0.6 0.6 0.6
Ks 0.9 0.9 0.9
d 1.0
Ns 0.0
illum 2
map_Ka Clothing.bmp
#
newmtl 03_-_Default
Ka 0.6 0.6 0.6
Kd 0.6 0.6 0.6
Ks 0.9 0.9 0.9
d 1.0
Ns 0.0
illum 2
map_Ka Clothing.bmp
#
# Multi/Sub Material__38 done
#
# EOF

and in the obj file i have add mtllib test.mtl at the end

but why still not load the texture??
The texture path is correct in display
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

don't know if it's properly set. An obj file usually looks like this:

Code: Select all

# Wavefront OBJ file
# Creator: Ultimate Unwrap3D v2.27
# Time: Thu Jun 01 00:15:35 2006
# num_vertices: 21775
# num_uvs: 129460
# num_faces: 42993
# num_groups: 1

mtllib aliens05.mtl

v 2.629843 0.521551 0.000000
v 2.617204 0.519037 0.262320
v 2.579407 0.511519 0.522114
v 2.516818 0.499069 0.776880
v 2.430038 0.481807 1.024164
v 2.319905 0.459900 1.261584
v 2.187477 0.433559 1.486855
v 2.034030 0.403036 1.697807
v 1.861044 0.368627 1.892407
v 1.670182 0.330663 2.068783
v 1.463284 0.289508 2.225235
v 1.242342 0.245560 2.360257
v 1.009484 0.199241 2.472549
...
And I don't see you .mtl file included in the obj file. That's where hybrid means the other info should go.
Thomaskkc
Posts: 134
Joined: Fri Sep 15, 2006 4:04 pm

Post by Thomaskkc »

Thanks~~~

the problems is solved
thx everyone
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

great. I'm adding the "solved" tag to this thread but you could also share with us how you got to fix it. This experience may help other users. :wink:
Gotmilk
Posts: 5
Joined: Wed Sep 27, 2006 7:55 pm

Post by Gotmilk »

erm exuse me i am total n00b on this one. Could u add this thing step by step together so i could follow this read from one post.

Thank you
Post Reply