Views: 23,173,158 |
Home
| Forums
| Uploader
| Wiki
| Object databases
| IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search |
12-12-24 10:03 AM |
Guest: |
0 users reading TUTORIAL: How to get a obj. file in Whitehole. [TUTORIAL] | 1 bot |
Main - Archived forums - SMG documentations and tutorials - TUTORIAL: How to get a obj. file in Whitehole. [TUTORIAL] | Hide post layouts | New reply |
blank |
| ||
Normal user Level: 26 Posts: 79/129 EXP: 98719 Next: 3556 Since: 07-08-12 Last post: 3572 days ago Last view: 2545 days ago |
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! |
| ||
Normal user Level: 8 Posts: 3/9 EXP: 1762 Next: 425 Since: 04-12-13 Last post: 4144 days ago Last view: 3093 days ago |
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 |
| ||
Normal user Level: 26 Posts: 80/129 EXP: 98719 Next: 3556 Since: 07-08-12 Last post: 3572 days ago Last view: 2545 days ago |
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! |
| ||
Normal user Level: 8 Posts: 4/9 EXP: 1762 Next: 425 Since: 04-12-13 Last post: 4144 days ago Last view: 3093 days ago |
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. |
I pwned U! |
| ||
Normal user Level: 8 Posts: 5/9 EXP: 1762 Next: 425 Since: 04-12-13 Last post: 4144 days ago Last view: 3093 days ago |
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 |
| ||
Normal user Level: 26 Posts: 81/129 EXP: 98719 Next: 3556 Since: 07-08-12 Last post: 3572 days ago Last view: 2545 days ago |
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! |
| ||
Normal user Level: 8 Posts: 6/9 EXP: 1762 Next: 425 Since: 04-12-13 Last post: 4144 days ago Last view: 3093 days ago |
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 |
| ||
Normal user Level: 26 Posts: 82/129 EXP: 98719 Next: 3556 Since: 07-08-12 Last post: 3572 days ago Last view: 2545 days ago |
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! |
| ||
Normal user Level: 8 Posts: 7/9 EXP: 1762 Next: 425 Since: 04-12-13 Last post: 4144 days ago Last view: 3093 days ago |
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 |
| ||
Normal user Level: 26 Posts: 83/129 EXP: 98719 Next: 3556 Since: 07-08-12 Last post: 3572 days ago Last view: 2545 days ago |
Posted by I pwned U! Did you completely miss the part about spaces in file names? |
I pwned U! |
| ||
Normal user Level: 8 Posts: 8/9 EXP: 1762 Next: 425 Since: 04-12-13 Last post: 4144 days ago Last view: 3093 days ago |
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 FileNotFoundError: [Errno 2] No such file or directory: 'M.BISON' |
shibboleet |
| ||
Fire Mario DROP TABLE users; Level: 124 Posts: 1832/4661 EXP: 21443070 Next: 393531 Since: 07-07-12 Last post: 1580 days ago Last view: 593 days ago |
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 |
| ||
Normal user Level: 26 Posts: 84/129 EXP: 98719 Next: 3556 Since: 07-08-12 Last post: 3572 days ago Last view: 2545 days ago |
Posted by blank |
I pwned U! |
| ||
Normal user Level: 8 Posts: 9/9 EXP: 1762 Next: 425 Since: 04-12-13 Last post: 4144 days ago Last view: 3093 days ago |
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! |
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.018 seconds. (2048KB of memory used) MySQL - queries: 28, rows: 220/220, time: 0.008 seconds. Acmlmboard 2.064 (2018-07-20) © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |