Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Branscombe · Feb 16, 2010 at 11:25 AM · shaderlightmapuv

Assigning differents textures to two differents Uv sets on one object.

Hi everybody I am a new Unity's user and I have lot of questions that need answers :)

I am working on a game that need ligtmaps to get a better render. In Maya , I did 2 Uv set for a mesh, one for the diffuse color (texture) and one different for the lightmap (in this case it's an ambiant occlusion). I found in Unity how to use these maps in a shader (for instance I am using a lightmapped/diffuse Shader).

I would like to know how can I plug a texture in an Uv set and an other texture in the second Uv set?

As I am using texture tilling in some parts of the diffuse color, I need to overlap some Uv's so that's why I created an other Uv set for the lightmap with no overlaping.

Any ideas?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by duck · Feb 16, 2010 at 04:39 PM

If you have model with 2 UV layers, make sure that you have a texture assigned for each layer in Maya (I haven't used Maya, but in general it seems that FBX exporters need to be prompted to save the 2nd UV set by actually having a texture assigned in that layer). Then export your model to your project's assets folder.

In unity, create a new material, and make sure it is using a a shader from the Lightmap Family. then to actually "Plug In" the lightmap texture, make sure the lightmap texture image is included in your assets folder, then select the Material, and drag the lightmap texture from the project pane into the correct texture slot in the material inspector.

Hope this helps! If there are more specific problems that you're having with this process, please add more detail to your question.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Branscombe · Feb 18, 2010 at 12:59 PM

Thank you for your help Duck.

Even if I did not assign a second texture on the second uvSet (or channel for Max user), the fbx exporter saved the 2 Uvset and the lightmap shader in Unity use both as default. (the "rvb diffuse" is automaticly assign to the first Uvset, and the "lightmaped" channel of the shader is automaticly assign to the second UvSet) So everything is working by default.

I would like to know if I can control properties of the lightmap file on the unity's shader (something like intesity, blending mode etc..) It's can be probably done by creatine and editing a new shader, but I have not skill in coding of scripting...)

About Unity shaders, I tried to put a "lightmapped/diffuse/bump" shader and plug in it a diffuse texture color, a lightmap and a normal map as bump value. Everything is working but the bump. It's like the normal map do nothing on the bump channel of this shader, don't know why.

I also have a big problem when I attempt to bake Global illumination with Mental Ray in Maya but I think this is not the correct place to ask that.

(sorry for my english, I am trying to do my best to be clear..) :)

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MaDDoX · May 26, 2010 at 02:23 PM 0
Share

You shouldn't have any trouble baking AO in $$anonymous$$ental Ray, it's all about setting up your radiosity solution (try using a semi-sphere with a material with incandescence = 100%) and using the "transfer maps" option inside $$anonymous$$aya. What's your problem specifically?

avatar image
0

Answer by Fubiou · May 05, 2010 at 03:54 AM

Well, here it is a real problem because, i am not sure why, but if i export lightwaves fbx it will have only one UV map, so if I export to .DAE and convert to FBX using the Autodesks free tool it will have more than one UV map but I must assign the textures by hand in unity, so, how can I do it? In other words, i cannot export lightmaped things from lightwave 3d

: (

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MaDDoX · May 26, 2010 at 02:26 PM 0
Share

Lightwave's FBX support is quite broken, even in 9.6. Anyways, simply exporting 2 UV sets should work. $$anonymous$$ake sure you have both UVs assigned to one texture each, it can be a texture with no properties at all (eg.: diffuse texture with no image assigned to it), but if you don't assign a texture Lightwave won't export the UV set.

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Blend between 2 lightmaps 0 Answers

2 UVs set and need lightmap UV slot 1 Answer

Fixing UV for Lightmap Help me please please please 2 Answers

Using second UV as Lightmap. Slow? 0 Answers

Vertex colour transparency and Beast lightmapping? 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges