Wings 3D Development Forum
help: uv/textures/export - Printable Version

+- Wings 3D Development Forum (https://www.wings3d.com/forum)
+-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1)
+--- Forum: Interface & Usage (https://www.wings3d.com/forum/forumdisplay.php?fid=3)
+--- Thread: help: uv/textures/export (/showthread.php?tid=1587)



help: uv/textures/export - kaolin - 02-25-2016

I'm trying to export a model for Unity. I've tried Collada and Obj and 3ds, but I've had no luck getting the textures to actually stick. (I've also tried to load them in Blender, with same failure—no textures).

I've tried Wings3d 2.0.2 and 1.5.4 (the models were built in 1.5.4).

I followed the pagoda productions tutorial ~ http://www.pagodaproductions.com/tiki/Wings3D%20UV%20Mapping.html

Everything looks fine in Wings3d.

I've tried with "make internal" and "make external" on the textures.

Any thoughts on something obvious I might be missing? Or how I might start figuring out what's wrong? Is there a limit to the number of materials/textures I can use? Could I have screwed up the UV/attachment by editing the models? Partially lost the attachment to the materials by renaming something wrong? (the materials are definitely attached to the faces, the faces are definitely showing the textures, in the wings3d editor...). Is there a second step I should be doing to copy textures around? Should I just get some sleep and everything will be clear in the morning? Smile


RE: help: uv/textures/export - Marcin Maćkowiak - 02-25-2016

Hey there,

I play only with .obj between wings -> unity. So let me help you with it Smile

- All textures of your project MUST be in the same folder where exported file is.
- For best result import everything immediately. I mean textures and .obj together (you can drag and point them into unity).
- .mtl file MUST be imported with .obj!
When you do it separately remmember to reimport everything in unity.

If you did everything right there should be no more problems.

- If there is still no result you can play with inspector
[Image: Inspector_zpsadteyam7.png]
- The last chance to fix your problem... Maybe try to name object in Geometry Graph the same as exported file.

Give me feedback Smile

Regards
Marcin


RE: help: uv/textures/export - kaolin - 02-25-2016

Thanks!

Should I expect Wings3D to export the textures into the same directory as the obj + mtl, or do I need to match those up manually (should I have my wings3d model in the same directory as all my exports for simplicity? I was trying to keep things clean by exporting obj into an obj subdir, collada into a collada subdir, etc.)

When I right-click "import new assets" in unity, it lets me select the obj but not the mtl. (and if I drag the mtl in from Finder, Unity doesn't know what sort of thing it is). And It doesn't let me select more than one thing (so I can't select the obj and the textures together).

If I drag the obj and textures in, I can open the imported obj and manually assign the textures, and the UV looks correct, but that's kind of a pain.... (actually, it looks like everything is disconnected enough so that so long as I leave my updated materials inside of unity alone, I don't have to worry about them being overwritten by new imports...)

Possibly related/unrelated... I have 3 copies of an object in wings3d all using the same material/texture, but when exported to obj and then imported into unity, they all get new materials (in Wings3D I have one material, Rod, and one texture, Rod_auv.bmp, .... with objects Rod1, Rod2, Rod3, and Rod4. In Unity, they get materials Rod1_Rod, Rod2_Rod, Rod3_Rod, ... should I be naming all four objects "Rod"?).

Sorry for the barrage of questions, and thank you!! Smile


RE: help: uv/textures/export - Marcin Maćkowiak - 02-26-2016

Yes, you have to export .obj with textures into the same directory.
.mtl file containing texture map information for the object.

Lets do it step by step.
- Try to name everything like on the picture,
- Make all Textures Internal,
- Export Obj with textures to the same directory on your computer for me it is "Test".
- Textures MUST be named the same as in Wings so better export them from wings directly and you will be sure it`s done ok,
(If your texture in Wings is named "Brick", but you will import into unity .obj file with texture named "123brick^%@" it won`t work, same for texture format .png .jpg etc...)
- You can name .obj file whatever you want.
[Image: 1_zpshukvlfpz.jpg]

- Create new folder in unity and drag and point .obj .mtl and textures into this folder in unity. For example here is mine "Test" (in unity).
[Image: 2_zps68f8fhvr.jpg]

- Here is an effect.
- Notice that unity insterts the name of object (GG in Wings3D) before material name.

Example:
object name: Test
material name: example
in unity: Test_example
[Image: 3_zpsbv9kr2gn.jpg]

Remember for better performance don't create scene in Wings. Do things in Wings like boxes, buildings, environment etc. and connect together everything in Unity.


RE: help: uv/textures/export - kaolin - 02-26-2016

Thank you SO much! Copying you exactly worked. So I tried a few things and boiled it down to the two main problems I was apparently having, based on your suggestions:

1) You have to choose "internal" on the textures or wings3d won't "export" your textures to a new place
2) You do actually have to drag everything at once (well, you can import the textures by dragging or "import" before you import the obj). But you really do have to drag the obj and mtl together, and you *can't* use the "import new asset" function, because it only lets you select one file, and it doesn't let you select the mtl file at all!

THANK YOU THANK YOU THANK YOU! Biggrin


RE: help: uv/textures/export - Marcin Maćkowiak - 02-27-2016

No problem mate Smile I'm happy it worked!


RE: help: uv/textures/export - micheus - 02-28-2016

Although I don't use much to export to .obj format I had already noticed the .mtl file seems to not include the image file path. So, maybe we could to consider that a bug.

Marcin Maćkowiak, you did a good job here. It's something that could be added to a "How To" series. Wink


RE: help: uv/textures/export - Marcin Maćkowiak - 02-29-2016

(02-28-2016, 09:01 PM)micheus Wrote: Although I don't use much to export to .obj format I had already noticed the .mtl file seems to not include the image file path. So, maybe we could to consider that a bug.
I used to export .obj files I think because of hard edges Smile

(02-28-2016, 09:01 PM)micheus Wrote: Marcin Maćkowiak, you did a good job here. It's something that could be added to a "How To" series. Wink

Sure why not, it`s a good idea and thanks btw! Smile