Any idea when this will be filled in? http://unity3d.com/Documentation/Manual/HOWTO-Lightmap.html
Just curious how to go about that. I’m currently baking shadows in my 3d app, does that null the lightmap shader?
Any idea when this will be filled in? http://unity3d.com/Documentation/Manual/HOWTO-Lightmap.html
Just curious how to go about that. I’m currently baking shadows in my 3d app, does that null the lightmap shader?
Ouch, looks like we forgot to fill in that doc page! I think it was meant to explain the actual process of baking; if you are already baking then probably you already know that.
Regarding lightmaps: if you bake them into your base textures, then just use the ordinary shaders. Of course then you can’t tile the textures or reuse them in different places easily.
Lightmap shaders are for the usual case where you have secondary lightmap texture (and separate UVs for it). If you have just the secondaryt alpha texture with illumination, but the same UVs, then Illuminated shaders can be used as well.
This is something I’m keen to investigate too.
AC
Aras,
I was wonderingif you could please get us the info. on the missing lightmap tutorial from the manual. I am VERY new to realtime stuff and I am struggling all the way around with lightmapping to Unity from Maya. Not seeing the light yet…
Gary Haus
Two drums and a cymbal fall over a cliff.
Badum Chsh!
(Seriously though, that was bad)
Maybe the professionals amongst you like to share how they lightmap their scenes… ?
I’ve made my own workflow using hdr-like lightmaps:
I set up lights shadows (in Cinema4D), bake the lightmap as 96 bit psd (or hdr) file. Then I turn down “exposure” to -4 in Photoshop and convert the file to a Unity friendly 24 bit psd file.
Now I rewrite the lightmapped shader:
SetTexture [_LightMap] {
Combine texture}
SetTexture [_MainTex] {
combine texture * previous quad}
By adding “quad” I kinda undo the underexposure in Photoshop but it does make sense though:
That way I can make textures brighter than just 100% of the diffuse texture and bring nuances to overexposed areas (works awesome when making photorealistic stuff like blooming floors/walls etc.).
I’m pretty new when it comes to making games and writing shaders - but that’s a pretty neat solution I’ve found for my needs so far.
Now I’d like to hear from you !
Here’s a sample of what I’m talking about
http://michaelsklenarik.de/test/sample.jpg
As you can see - no difference between the self illuminated texture (left) and the lightmapped version (right). (actually the white frame on the left is just an accident that doesn’t have anything to do with my method)
Here’s a closeup:
http://michaelsklenarik.de/test/01.jpg
On top is the blurry, self illuminated baked texture - below is a good sample of what I described in my prior post: The diffuse texture (fishbone oakwood floor) with the lightmap applied
can have superbright areas and is yet highly detailed !
In the middle: the base texture. Just to show that the lightmap DOES brighten the texture.
PS: if someone has a good solution on how to bake area shadows plz tell me
They still look very blocky.
This is a . I cannot find this tutorial page. It’s linked from the tutorial .pdf, but the page is still blank.
I did a Maya specific lightmapping tutorial for the now defunct Unity Magazine (I hope it sees the light of day in the future). Lightmapping in Unity requires 2 UV sets (or for basic planar mapping you can get away with tiling the primary texture and overlaying the lightmap). Maya has no problem with exporting multiple UV sets in the FBX format… to my knowledge the only other 3D apps that can do this right now are Modo and 3DSMax (C4D 10 is really close). Suffice to say you need one of these higher end 3D apps and a solid knowledge of UV mapping to work out lightmapping in Unity.
HTH
blender (via fbx export) can as well now ; )
Lately, in C4D, I’ve just been using Object Bake…, which creates a surface color map, baking textures, illumination and shadows together. Then you can either use it in a diffuse, bump or vertexlit shader in Unity or in a lightmap shader along with a simple UV-mapped texture to create the illusion that you have a complex UV map plus a lightmap. The only problem I’ve encountered is the blockiness or pixellation of the textures that Mike referred to. For that, you can just increase the map size in Object Bake and start with high-res textures. I’m still experimenting with that. Unfortunately, C4D doesn’t do vertex baking the way Maya does, so you have to use workarounds.
Hey AntennaTree…is there anyway you can share that tutorial again? Or do you know if the Unity Magazine can be purchased from that time?
If Tom doesn’t put out the mag in the next few weeks I’d be more than happy to just post the thing. It is strictly a Maya specific tutorial though so it’s of little use to people using other 3D apps. Plus I’m admittedly not too practiced at writing tutorials so while I find it pretty straightforward, other people that I had testing it for me found certain steps confusing.
I think doing anything technical can be overwhelming the first few times, but I found learning to lightmap eventually became easier. The thing is Maya is huge! Having access to a fast machine made it seem easier too.
Is Maya (.mb,.ma) the only file format to support multiple UV’s for unity? I tried exporting to fbx and maya indicated that that wasnt exporting properly.
Any changes in Unity 2.0 as far as file support/Multiple UVs?
AC
I’ve exported plenty of FBX files directly from Maya and the multiple UV sets stay intact when bringing them into Unity. In fact I just did this for the Explosivo contest (I manually exported everything out to FBX so everyone could properly open up the project folder). I have an AO map on the main bathroom mesh and it works just fine as an FBX.
I actually just reread my tutorial (I did that thing 4 months ago) and it is indeed a shitload of steps that need to be carefully followed. Targos helped out quite a bit trying to make it more straightforward. I haven’t been in contact with Tom for months so unfortunately the changes I made to it haven’t been updated yet.
Thanks for the confirmation Ethan, the error was about illum not being a valid blend mode or something very similar. I wasnt sure if I could say if I was a beta tester or not 8)
The tutorial is very thorough, and gives people all the tools they need. Whether its on the Unity mag or posted elsewhere, it will give Maya users a new lease of life, and will answer all those nagging lightmapping questions. theres a bit to cover, and I dont think I wouldve learned it anywhere else(affordable).
Stay tuned, and hold out a bit longer folks, a complete solution is waiting in the wings.
Or PM Thomas directly. Nothing like a bombardment of pesky emails to move things along. Im looking forward to it going public as I have a question for its author.
AC
I was under the impression that Maya files aren’t supported by Unity per se, but that Unity launches Maya in the background and exports them that way? In the same way that it doesn’t “really” support .blend files from Blender, but invisibly launches Blender in order to export them to Collada. In any case, fbx files exported from Blender support multiple UVs.
–Eric
Yeah, but if you manually export the FBX files from Maya (instead of letting Unity do it in the background) it does matter a little bit since you have control over the export settings. When you’re sharing out projects or packages it’s best to manually export the FBX versions to slim down the file size and to stop that annoying “error” message of “Maya not found” or whatever it says. Some people have said that Unity will crash (or hang for several minutes) while trying to interpret Maya files, even if there is an FBX version present in the Library/Temp folders.
I threw this up just now … hope it can help
http://forum.unity3d.com/viewtopic.php?p=43098#43098
Jaz.
Cool jaydubs, nice tutorial, but it doesn’t really deal with multiple UV sets as far as I can see. That’s really the key when using lightmaps with Unity.