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
0
Question by gadavis · Feb 18, 2010 at 04:55 PM · bakedlightingvertexcolor

prelighting using vertex color

I have been prelighting the static parts of my scenes in MAYA for years (some call it 'baking the lights', and having that as the sole lighting for static objects in the engine. On the DS this looks exactly like it does in maya, with "use no lights" selected. (I use dynamic lights only on moving meshes)

In Unity, I am having problems getting the same effect. With no lights in the scene, the color parts show up, but not the brightness.

Please note I am using the "vertex color" shader from the forums.

(Specifically, I have light spilling in a window. I use vertex coloring to darken my floor, and brighten a wedge to mimic the effects of a sunbeam. In Unity I see the colors but they don't seem to 'glow'. I am not using illumination maps. If I need to screen capture an example I can.)

Any ideas how to get my prelighting (baked into the verts) into unity so it mimics exactly what I see in maya?

Comment
Add comment · Show 2
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 duck ♦♦ · Feb 19, 2010 at 05:37 PM 0
Share

Yes, it would probably help if you could supply a screenshot of what you expect it to look like (perhaps from $$anonymous$$aya), and a screenshot of what you're seeing in unity.

avatar image gadavis · Feb 22, 2010 at 03:18 PM 0
Share

Will try suggestions and include screenshots if I am still 'stuck'

2 Replies

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

Answer by duck · Feb 19, 2010 at 05:44 PM

Without knowing which shader specifically you're using, it's difficult to tell - but it sounds a little like it could be that the shader you're using is multiplying at a 1x level, so that it only has the effect of darkening the diffuse texture colour, and a full-white value would leave the diffuse texture at its normal 100% level.

Wheras it may be that you're used to shaders which "double multiply" the value, so that a mid-grey value leaves the diffuse texture at its normal level, wheras a fully-white value has the effect of multiplying the colour values by 2 (in effect lightening those areas where the vertex colour is lighter than mid-grey).

You could check this by having a look in your shader source.

If your shader combine says only:

Combine texture * primary

rather than:

Combine texture * primary DOUBLE

then this is probably the case, and you can probably fix it by adding the 'DOUBLE' keyword. There's also the 'QUAD' keyword, in case you want 4x brightening instead of 2x!

Comment
Add comment · Show 3 · 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 Jessy · Feb 20, 2010 at 12:35 AM 0
Share

Yeah, I figured the lack of "glow" you mentioned was the inability to get overblown highlights. I linked to Eric's shader because his uses Double. Unity's builtin lightmap shaders do not. Nothing that I know of uses Quad, but feel free!

avatar image gadavis · Feb 22, 2010 at 03:14 PM 0
Share

Thank you I will try it this week. Really appreciate the advice.

avatar image gadavis · Feb 22, 2010 at 04:59 PM 0
Share

both answers combined got me what i need, so thanks. I am only allowed to "checkmark" one as correct. But really both helped considerably.

avatar image
1
Best Answer

Answer by Jessy · Feb 18, 2010 at 11:26 PM

I don't know what the "vertex color shader from the forums is", nor do I know what "the color parts show up, but not the brightness" means, but Eric Haines (Eric5h5) added the simplest possible shader that uses a vertex color "lightmap", to the wiki. Is that what you're looking for?

Comment
Add comment · Show 2 · 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 gadavis · Feb 22, 2010 at 03:15 PM 0
Share

Checking this out too... looks like it should help. Deep thanks.

avatar image gadavis · Feb 22, 2010 at 04:59 PM 0
Share

both answers combined got me what i need, so thanks. I am only allowed to "checkmark" one as correct. But really both helped considerably.

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

Is there a bug in Mobile/Transparent/Vertex Color shader 0 Answers

Incorrect transparent rendering 2 Answers

Multiple light baked textures for one mesh/model? 0 Answers

progressive lightmapper not reach 100% CPU 0 Answers

Weird dark spots when baking light 1 Answer


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