Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 MaT227 · Aug 08, 2012 at 11:58 AM · lightinglightmaplightmapping

Unity3D and Lightmapping

Hello everyone,

I saw many threads talking about lightmapping in Unity with Beast.
I am currently working on a project that need lightmapping at runtime, I mean baking at runtime not in the editor, because of not pre-built level. For me there is two solution for that :
- A realtime light mapping like this : http://www.youtube.com/watch?v=cp2fPwQPkUg.
- A calculating time like in the editor but at runtime.

Of course I am open to any ideas. I though about integrating Beast in Unity runtime but I don't know if it's possible.
Should I make my proper lightmap generator ?
Can I simulate the lightmapping system with some shaders, vertex coloring... tricks ?

Build: WebPlayer
Unity: 3.5 Pro

Thanks a lot for your help and your ideas !

Comment
Add comment · Show 4
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 Kryptos · Aug 08, 2012 at 01:24 PM 0
Share

The purpose of lightmapping is to prevent shadow calculation at runtime by baking at creation time.

So lightmapping at runtime would be just realtime shadowing. Or I don't understand your question.

Do you ask that because you generate levels procedurally?

avatar image MaT227 · Aug 08, 2012 at 01:37 PM 0
Share

It's a kind of procedural level generation. I know the aim of lightmapping. For me there is two choice. - First, a kind of realtime lightmapping like this : http://www.youtube.com/watch?v=cp2fPwQPkUg - Second, the Unity3D baking calculation system. But I don't know how to achieve those.

avatar image Bunny83 · Aug 13, 2012 at 05:12 PM 0
Share

You should have been clearer in your question. Lightmapping is always ment to be used at runtime. You want to generate lightmaps at runtime which is unusual and not that easy.

avatar image MaT227 · Aug 14, 2012 at 05:59 AM 0
Share

I edited my question, I think it's clearer now. thanks for your advice.

1 Reply

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

Answer by create3dgames · Aug 10, 2012 at 08:14 PM

Unity does not have that capability, as far as I know. Just use realtime dynamic shadows in Unity Pro.

Comment
Add comment · Show 4 · 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 MaT227 · Aug 13, 2012 at 04:55 PM 0
Share

I think the only solution is to write my own runtime lightmapping system, no ?

avatar image Bunny83 · Aug 13, 2012 at 04:57 PM 0
Share

Yes, Unity uses Beast which is part of the Editor to bake lightmaps. It is not available in the runtime. So, if you want to bake lightmaps at runtime, you have to do it yourself or find a third-party framework. I would guess there should be some out there.

What frameworks you can use depends on if you want target the webplayer (that means only 100% managed code) and maybe if you have pro (if you want to use a native code library)

avatar image MaT227 · Aug 14, 2012 at 08:11 AM 0
Share

The target build is WebPlayer what are the limitations ? Can I use dlls, lib ? Can I use a C dll/lib ?

avatar image Bunny83 · Aug 14, 2012 at 12:52 PM 0
Share

No, never!
How can you even think about that :D. Native code can be anything. It would be crazy to allow a webplugin to automatically download content from an unknown source and execute native code. The only thing you can use in the webplayer are pure managed code assemblies. Unfortunately microsoft decided to give them the same file extension as native code libraries: DLL. They did the same thing with dos exe files and windows exe files... That's why you still have a dos stub at the beginning ;).

A pure .NET / $$anonymous$$ono / CIL library can be used without any problems as long as you included all dependencies. Be careful, there are mixed-mode assemblies which are essentially managed code libraries, but they use unsafe code and maybe just wrap a native code library. Such assemblies won't work. It has to be written purely in managed code. $$anonymous$$eep also in $$anonymous$$d that not all namespaces are available in the webplayer. System.IO for example won't work. If an assembly depends on it doesn't mean automatically you can't use the assembly, but if the assembly tries to use System.IO stuff you get an security exception.

See this page for a complete list of all namespaces and classes / functions which are available.

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

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Lightmapping - Lightmap Resolution 1 Answer

A node in a childnode? 1 Answer

Baked Lightmap: Parts of scenes appear too dark 0 Answers

Lightmapping - Shadow power 1 Answer

Lightmapping doesn't work 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