Kuribo64
Views: 19,854,548 Home | Forums | Uploader | Wiki | Object databases | IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search
03-29-24 06:19 AM
Guest:

0 users reading TUTORIAL: How to get a obj. file in Whitehole. [TUTORIAL] | 2 bots

Main - Archived forums - SMG documentations and tutorials - TUTORIAL: How to get a obj. file in Whitehole. [TUTORIAL] Hide post layouts | New reply

Pages: 1 2 3 4
blank
Posted on 07-25-13 07:14 PM Link | #28948
None of those materials has any textures. A material has to have a line with map_Kd or else any mesh using that material will be skipped.

I pwned U!
Posted on 07-25-13 07:42 PM Link | #28951
How and where do I add that line? Also, do I just type in the words "map_Kd" or is there also other information that has to be inserted?

blank
Posted on 07-25-13 08:50 PM Link | #28959
Each material starts with a line starting with newmtl and continues until the next line beginning with newmtl. Anywhere between those two lines add the line

map_Kd texture_file_name

I pwned U!
Posted on 07-26-13 06:39 PM Link | #29042
Here is the edited .mtl file:

# Blender MTL File: 'None'
# Material Count: 10

newmtl Color_000
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.800000 0.800000 0.800000
Ks 0.165000 0.165000 0.165000
Ni 1.000000
d 1.000000
illum 2
map_Kd Color_000

newmtl Color_002
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.621177 0.621177 0.621177
Ks 0.165000 0.165000 0.165000
Ni 1.000000
d 1.000000
illum 2
map_Kd Color_002

newmtl Color_007
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.181961 0.181961 0.181961
Ks 0.165000 0.165000 0.165000
Ni 1.000000
d 1.000000
illum 2
map_Kd Color_007

newmtl Color_009
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.000000 0.000000 0.000000
Ks 0.165000 0.165000 0.165000
Ni 1.000000
d 1.000000
illum 2
map_Kd Color_009

newmtl Color_A01
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.800000 0.000000 0.000000
Ks 0.165000 0.165000 0.165000
Ni 1.000000
d 1.000000
illum 2
map_Kd Color_A01

newmtl Color_C04
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.800000 0.640000 0.480000
Ks 0.165000 0.165000 0.165000
Ni 1.000000
d 1.000000
illum 2
map_Kd Color_C04

newmtl Color_D02
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.800000 0.640000 0.156862
Ks 0.165000 0.165000 0.165000
Ni 1.000000
d 1.000000
illum 2
map_Kd Color_D02

newmtl mesh0110mat
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.511373 0.511373 0.511373
Ks 0.165000 0.165000 0.165000
Ni 1.000000
d 1.000000
illum 2
map_Kd mesh0110mat

newmtl mesh0111mat
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.511373 0.511373 0.511373
Ks 0.165000 0.165000 0.165000
Ni 1.000000
d 1.000000
illum 2
map_Kd mesh0111mat

newmtl mesh0124mat
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.511373 0.511373 0.511373
Ks 0.165000 0.165000 0.165000
Ni 1.000000
d 1.000000
illum 2
map_Kd mesh0124mat



However, I do not think that I did this the right way because I am still getting an error.

[image]

I pwned U!
Posted on 07-27-13 07:30 PM Link | #29121
Sorry, the image I used did not post correctly. The new error is similar to the one that I had before, but instead of saying, "material (material name) has no diffuse texture map, skipping" it said, "could not load image (color or material name) used by material (color or material name), skipping." By "texture_file_name" did you mean the names that I took the spaces out of in Blender? Do I just list those file names after the map_Kd under the colors that they use?

blank
Posted on 07-28-13 06:49 PM Link | #29220
By texture file names I meant the names of the image files used for textures. You have to include the entire file name, including extension (such as .png for PNG files).

I pwned U!
Posted on 07-30-13 03:26 PM Link | #29319
Well, what I did was instead of using images for textures, I just colored it in by selecting a color from a list in SketchUp, and then chose sections of the model to fill in with it. I looked in the folder for SketchUp and I found the color files that I used. They had a .skm extension, so I added that to the names after the map_Kds, but I still came up with the same error, even after copying the .skm files to the Python33 folder. Does this mean that I need to recolor the model with images? Also, do textures for the models need to be in the Python33 folder in order for everything to work?

blank
Posted on 07-30-13 07:36 PM Link | #29323
Models has to be textured (not just colored). Where the textures have to be depend on the model, but usually they have to be in the same folder as the OBJ file or in a sub-folder.

I pwned U!
Posted on 08-04-13 11:31 PM Link | #29571
Now I used 16X16 images for the textures, but I am still coming up with an error. Now it says:

C:\Python33>python.exe obj2bdl.py M.BISON nsyzc.obj
Traceback :
File "obj2bdl.py", line 61, in
for line in open:
FileNotFoundError: [Errno 2] No such file or directory: 'M.BISON'

Here is my new .mtl file:

#
## Alias OBJ Material File
# Exported from SketchUp, (c) 2000-2012 Trimble Navigation Limited

newmtl _2
Ka 0.000000 0.000000 0.000000
Kd 0.803922 0.803922 0.803922
Ks 0.330000 0.330000 0.330000
map_Kd M.BISON_nsyzc_2.png

newmtl mesh0111mat
Ka 0.000000 0.000000 0.000000
Kd 0.639216 0.639216 0.639216
Ks 0.330000 0.330000 0.330000

newmtl _4
Ka 0.000000 0.000000 0.000000
Kd 0.996078 0.870588 0.172549
Ks 0.330000 0.330000 0.330000
map_Kd M.BISON_nsyzc_4.png

newmtl _5
Ka 0.000000 0.000000 0.000000
Kd 0.941176 0.827451 0.717647
Ks 0.330000 0.330000 0.330000
map_Kd M.BISON_nsyzc_5.png

newmtl _3
Ka 0.000000 0.000000 0.000000
Kd 0.266667 0.266667 0.266667
Ks 0.330000 0.330000 0.330000
map_Kd M.BISON_nsyzc_3.png

newmtl mesh0110mat
Ka 0.000000 0.000000 0.000000
Kd 0.639216 0.639216 0.639216
Ks 0.330000 0.330000 0.330000

newmtl _1
Ka 0.000000 0.000000 0.000000
Kd 0.929412 0.109804 0.141176
Ks 0.330000 0.330000 0.330000
map_Kd M.BISON_nsyzc_1.png

newmtl _6
Ka 0.000000 0.000000 0.000000
Kd 1.000000 1.000000 1.000000
Ks 0.330000 0.330000 0.330000
map_Kd M.BISON_nsyzc_6.png

newmtl mesh0124mat
Ka 0.000000 0.000000 0.000000
Kd 0.639216 0.639216 0.639216
Ks 0.330000 0.330000 0.330000

newmtl _7
Ka 0.000000 0.000000 0.000000
Kd 0.000000 0.000000 0.000000
Ks 0.330000 0.330000 0.330000
map_Kd M.BISON_nsyzc_7.png

Maybe there should just be a thread on this site where people having trouble with using this program can submit their textures and .obj, .mtl, .kcl, and .pa files so that the people who do know how to set everything up properly can do the conversions and post the converted files on that thread for people to use.

blank
Posted on 08-05-13 07:02 AM Link | #29593
Posted by I pwned U!
M.BISON nsyzc.obj


Did you completely miss the part about spaces in file names?

I pwned U!
Posted on 08-05-13 03:29 PM Link | #29598
I tried it without spaces on all of the file names, but instead I had this error:

C:\Python33>python.exe obj2bdl.py M.BISONnsyzc.obj
Traceback :
File "obj2bdl.py", line 88, in
for line in open,'r'>:
FileNotFoundError: [Errno 2] No such file or directory: 'M.BISON'

shibboleet
Posted on 08-05-13 03:45 PM Link | #29601
blarg.
Can I just see the obj, mtl, and textures please? I would like to take a look at what you're not doing.

____________________
a

blank
Posted on 08-05-13 03:48 PM Link | #29602
Posted by blank
You can't just rename the files, as the OBJ file still references the the MTL file with spaces in its file name. The problem here is that whatever tool made that OBJ file allowed for the MTL file to have spaces in its name, which it shouldn't.

The easiest fix for this would be if you simply don't use spaces in the file name when exporting your model to an OBJ file.

I pwned U!
Posted on 08-07-13 04:08 PM Link | #29669
Oh, I am sorry, when I put ">" followed by ":" after the 'r', it turned them into an image for some reason. I did not mean for that to happen. Also, never mind, I tried it again and I finally have a .bdl file. Now I will try to replace Mario's .bdl with it and if everything works, then I will also use the same technique to import models from Skyward Sword. Thanks for all of the help!
Pages: 1 2 3 4

Main - Archived forums - SMG documentations and tutorials - TUTORIAL: How to get a obj. file in Whitehole. [TUTORIAL] Hide post layouts | New reply

Page rendered in 0.030 seconds. (2048KB of memory used)
MySQL - queries: 26, rows: 218/218, time: 0.013 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.