PDA

View Full Version : Unity: 2 (or more) texture on 1 object


Wilfrick
06-01-2011, 01:24 PM
Hi,

I'm building an appartment and I want that each wall of each room has its baked texture.

The problem is that if I create a layer each surface all warks fine (inside unity I will see a lot of objects). But of course I want to have only 1 layer, so I will have a lot of surfaces on a single object inside unity too.... but unity show me correctly only the first surface... all other are mapped wrong, stretched, turned...

Inside inspector view I see all the materials, all the textures, but inside scene view there is a disaster.

I tried to build only 2 surfaces, for test... the same error: first texture is ok, second wrong. Inside lightwave I see all ok. If I build 2 layer, first with first surface and second with second surface unity shows all ok.
Crazy thing!!! I can't build a castle with 1000 surfaces and create 1000 different layers! (for example...). And I really think that unity can use a lot of textures on a single object, because if I select the object I see the list of all the materials with all the textures (inside inspector view).

Maybe the FBX export has a big bug?

Thankyou
Bye

Wilfrick
06-01-2011, 05:27 PM
I search and search but don't find a really good explain.

But I load the FBX inside other software and I see... there is the bug!
So I take a software that can convert a lot of format, I load the LW file and save in FBX from it (of course I needed to rotate and scale the object) and now it work inside unity, with all the textures that I want, only in 1 layer.

So it is really a bug of lw FBX export!!!

toeknee
06-02-2011, 10:23 AM
I would ask why do you need separate textures. I thought that you could only use one texture per object. I think that that is a limitation. The way I worked this out was to create separate UVs for every surface and us photo shop to bring in very high quality textures. after I made the object I added one more UV this was an Atlas UV for the whole object. I then baked out the one UV and took that to photo shop. In photo shop I copied and pasted all the different textures that I made in there position on the UVed texture. I know that this is a strange way to do it but it gives you total control over the quality of your textures. If you find a better way please post it. I would love to know a easier way myself.
I hope this was some what helpful. Good luck.

Sekhar
06-02-2011, 04:31 PM
I search and search but don't find a really good explain.

But I load the FBX inside other software and I see... there is the bug!
So I take a software that can convert a lot of format, I load the LW file and save in FBX from it (of course I needed to rotate and scale the object) and now it work inside unity, with all the textures that I want, only in 1 layer.

So it is really a bug of lw FBX export!!!

Where did you export from? I've exported many objects/textures/UVs from Layout to Unity without any issues; export from Modeler however gave me trouble.

Wilfrick
06-03-2011, 09:33 AM
Toeknee
I need a lot of UV because my object is an appartment, I stay inside with camera, so if I use only 1 UV I need a superbig resolution, it is impossible... For realtime it is good to have the textures at 512x512, maybe 1024x1024... for a good quality every wall need a texture, if I keep all the walls with only 1 UV I will see big pixels.

Sekhar
I'm using lw 10. I tried with 9.6 and it hasn't the bug, all is ok. So now I model in lw10, build my scene in lw10 but I export FBX in lw 9.6 (fortunately this object no need animations, bones and so on... it is only a static object so the lw9.6 fbx export is good).
(ok, really I'm using lw10.1, I know I can't write in public forum about it but when I wrote here I never thought that it was a lw bug, always thought that it was an unity limitation and need a solution, so I asked what you do to solve it).