x


How does Unity read Blender UV channels order for correcting mapping?

I realized that if I create two UV's in the Blender, Unity automatically reads the first UV channel as "Base" and the second as "lightmap".

And bumpmap?

I created Difuse, Normal Map (Bump) and Lightmap in Blender, each one with its respective UV map channel. Consequently, now in Unity, I need to use the channels Base, Bump and the lightmap of "Lightmapped / Bumped Diffuse" shader. How should I organize my UV's in the blender so that the unity read each one for each channel of the shader? The Unity reads more than two UV channels of blender? How does this reading of the relationship between Blender's UV's and shaders channels of Unity?

more ▼

asked Jul 29 '10 at 12:12 AM

Lucio gravatar image

Lucio
1 1 1 5

(comments are locked)
10|3000 characters needed characters left

1 answer: sort newest

Unity can only use 2 UV sets.

more ▼

answered Jul 29 '10 at 12:25 AM

Eric5h5 gravatar image

Eric5h5
80k 41 131 518

It would be much better if the normal map read the second UV (the same of lightmap) and not the first. For thus we would have a much better optimization since we could use small tiled textures for the first UV. The way it is today, we can not use tiled with normal map texture and lightmap. But we have to create a bigger texture for diffuse with several pieces of tiled texture duplicated. Do you agree? Have any other solution to use small tiled texture for diffuse with bumpmap and lightmap?

Jul 30 '10 at 05:42 PM Lucio

@Lucio, I don't really understand what you're trying to do, but you can use either set of UVs to do whatever you want. You're not stuck with the built-in shaders; you can alter them and use custom shaders for any purpose.

Jul 30 '10 at 07:03 PM Eric5h5

Hi, @Eric5h5! What I'm trying do explain is clear explained in this image http://www.4shared.com/photo/eKIBn0g-/unity.html

I realize that unfortunately we do not have this interface I suggested in this shader. The solution is that even what you said. But I'm still beginning to study the creation of shaders. Could you tell me more specifically what and where should I look on the definition of uv map by custom shader code? Thank you!

Aug 02 '10 at 08:10 PM Lucio

@Lucio, if you look at the Lightmap-VertexLit shader, where it has the BindChannels section, that would probably be the sort of thing you'd apply to a custom bumped diffuse shader, which you'd use as a pass in a custom Lightmap-Bumped shader.

Aug 02 '10 at 09:44 PM Eric5h5
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x720
x236
x56
x51
x48

asked: Jul 29 '10 at 12:12 AM

Seen: 2486 times

Last Updated: Jul 29 '10 at 12:19 AM