Jump to content

Blender collada export with multiple UV layers (what is the "active uv layer"?)


Rik Gervasi
 Share

You are about to reply to a thread that has been inactive for 463 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi All,


Although i have been creating mesh with Blender for quit a while, i still have trouble exporting a blender model with multiple UV layers to SL. This I know:

- Having multiple UV maps is fairly common if you work with different textures/materials that need their own separate UV maps

- The blender collada exporter contains several options that optimize an export to collada for SL

- SL understands only one UV map


The really big question for me is: how do you tell the collada exporter which specific UV layer it needs to include? The collada exporter option "Only Active UV Layer" has something to do with it, but... what in my model is "the active UV layer"? Maybe I am overlooking something extremely simple and straightforward, but i sincerely have no idea.


My workaround is simply by making a copy of my model, deleting all UV maps except the one that i want to include in the collada export.


Anyone else struggling with this?


Any reactions or answers are highly appreciated,

Have a wonderful day :-)

Link to comment
Share on other sites

[edit: Sorry, i misunderstood first]: The active Layer is the UV layer that is currently selected from your UV Layer list in the Object Data Properties section. The active layer is marked with a blue background. It is also the active layer that you see when you open the UV Editor.

---

It should be the active UV Layer (as the option label tells). If this is not so, then please file a bug to the Blender bug tracker at:

https://projects.blender.org/tracker/index.php?group_id=9&atid=498

And please add an example blend file which shows the problem. We will surely take care :matte-motes-asleep-2:

Link to comment
Share on other sites

Hi

 I'm not quite sure if I have Understood your question correctly so ...........

As you already know the mesh can only have one UV map assigned to it.

The mesh can have up to 8 materials and each of those materials can have its own layer on that UV map.

Once the mesh with multiple materials has been unwrapped you can then select by material and save each UV layer one at time so they can be textured separately.

(Or you could Unwrap each material one at a time and save the UV layer that way)

When your mesh is rezzed inworld you then edit and select by face (material) and add that materials texture to that face.

Cube and cone  mesh .png

If you already know this then ............ hey ho ! it may help someone else  :)

 

Link to comment
Share on other sites

Hi Gaia, tysm for your quick reply.

I think the problem is possibly my lack of understanding of what the "active UV layer" actually is. When i go to the mesh properties of my model, i have a list of UV maps there. How can i know (or set) which one of them is the "Active UV layer"? This list does however enable me to set the "active rendering layer" (with the little camera icon to the right of it), should that be the UV layer that will be included in the collada export? It doesnt seem that way, from my experiences i can only conclude that:

- The "Active UV Layer" setting in the collada export only influences which textures will be included in the export, not which UV map will be included in the export.

- The UV map that will be included will be either the first one in the list if you have more than one UV map in your model, or if you have just one UV map it will obviously include that one in the export.


Does anyone recognize the above? :-)

Ty again!

Link to comment
Share on other sites

Hi Aquila, thank you for your reply

You are correct, you could unwrap different parts of your model in one UV map, and let them overlap, like shown in the pics you included. But, for convienence (well i thought it was convenient) i created a different UV layer for each material. Take for example a bottle of wine, where you have a cork texture, a bottle texture and a label texture: you have 3 materials, 3 textures and 3 UV maps. Now i want to bake everything into one consolidated texture/uvmap (blender 2.49 used to have a consolidate script which did that automatically but it can still be done 'by hand'), this produces a 4th consolidated UVmap and that is the one i want to include in my collada export, but that doesnt seem to happen when i set that one as the "active rendering layer" in my UV map list.

I hope i am making sense here :-)

Link to comment
Share on other sites

Yes, it is the UV map that is selected as "active rendering layer" which should be exported when theoption isenabled. If this is not the case then this is a bug and needs to be reported.

Regarding the separation of UV maps: You can keep all parts in one UV Layer and take care to assign different parts of your mesh to different textures in the UVEditor. Just in case you need 'knowhow': This video explains how to do it:

    http://blog.machinimatrix.org/from-uv-map-to-multiple-textures/

 

Link to comment
Share on other sites

You must have at least one UV map that has all the materials, because SL will only import one map. Aquila's post here and Gaia's tutorial explain how you can still use the full UV space for each material (Aquila) and bake the textures to different images although you have one UV map, where the UV islands for different materials overlap (Gaia).

What Blender are you using? I am still using 2.66, where the "Only Active UV Layer" doesn't work* unless you have the first UV map in the list selected. This is because it tells the <polylist> tags to use the selected map, but still only exports the first. That leaves the reference in the <polylist> pointing to a map that isn't there. That produces the know effect of a garbled random UV map. I thought it was fixed in later versions. If you have the multi-material map first in the list and have it selected when you export, this will work ok even in 2.66.

If you turn the "Only Active UV Layer" option off, the collada does contain both (or more) UV maps, so that the references do now point to something valid, but the <polylist> now refers to both. SL doesn't know which one to use, so it selects (I think, for two at least) the laast one. This will not work as you expect unless that's the one you wanted.

* {Gaia; this is the one I sent you the IM about,a while ago}

Link to comment
Share on other sites

"... I am sure it will help some folks along the way."

I second that. Aquila is very good at explaining things in ways people can understand easily. This contrasts starkly with my explanations that often leave people more puzzled than they were to start with. Thank you Aquila. Are you going to make a collection of your posts available somewhere?

Link to comment
Share on other sites

Hi Drongle, thank you so much for your reply, it now starts to make sense to me... i am using blender 2.68a and if "Only Active UV Layer" which didnt work in 2.66 also not works in 2.68a, that would perfectly explain why i experience what i experience.

Also thank you Aquila and Gaia for your helpful responses.

For the time being i will either just use one UV map or, if i want to use more UV maps i ll just make sure that the one i want to include in the collada export is the first one in the UV map list.

Cheers

Link to comment
Share on other sites

Hi Chic,

Don't they have a mesh forum at that other place who's name can't be mentioned ?  :)

A few weeks ago I came across this and thought of you :

. Before watching this I had almost no idea how video editing was done and now i'm thinking , "give me the clips and i'll edit them to create the next blockbuster movie". lol 

Just wondering have you ever tried using Blender to edit your machinima ?

 

Hi Drongle

I only know simple !

If people started making "collections" then there would be no need for the mesh forum ! and then what would we do :)

 

 

Link to comment
Share on other sites

  • 6 years later...
You are about to reply to a thread that has been inactive for 463 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...