Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Neon Jackal: yeah, I have no idea how to do the lights either
- ActionMan: i can probably help you with that
- ActionMan: what are you using to build the map geometry? Unity, or another program?
- Neon Jackal: sketchup, then exporting to fbx and importing into unity
- ActionMan: on the fbx asset in the project, make sure that Generate Lightmap UVs is ticked. That lets you do light baking. Also tick optimize mesh while you're there, and click apply
- Neon Jackal: cool, done
- ActionMan: that's mine for reference
- ActionMan: http://i.imgur.com/fe1g4gs.png
- ActionMan: then in the hierarchy view you can add different kinds of light objects to the scene
- ActionMan: I started off with 3 different directional lights, rotated to face different angles, with very low intensity, just to add some subtle ambient light into the level
- ActionMan: http://i.imgur.com/YDNnSmQ.png
- ActionMan: that will ensure there's no pure black areas anywhere
- ActionMan: then add some point / spot lights around the place later
- ActionMan: that will work in game, but will tax people's GPU's running all the lighting calculations
- ActionMan: To bake the lighting into textures, go to Window->Lightmapping
- ActionMan: in that window, you can click the Object tab, then select lights in your scene to decide if they will cast shadows or not
- ActionMan: You can then go into the Bake tab and fiddle with quality settings (high qualty / more bounces / more rays == better quality but longer baking time)
- ActionMan: then click on Bake Scene and a few seconds/minutes later your scene will be using a lightmap instead of evaluting the lights every frame on the GPU
- Neon Jackal: ahh
- Neon Jackal: fancy
- ActionMan: which means you can use as many lights as you like and it won't affect performance
- ActionMan: lightmaps also let you have 'bounced' light
- ActionMan: so when a wall gets lit directly, it itself becomes an indirect light source
- ActionMan: which looks cool
- ActionMan: fills out your rooms with ambient light magically
- Neon Jackal: yeah, I tried placing area lights in places but it looked odd
- ActionMan: baking should fix them
- Neon Jackal: cool, I'll give all that a crack
- ActionMan: the realtime lighting often does it per-vertex, so on a low-poly mesh it can look crap
- ActionMan: here's my current baking settings:
- ActionMan: http://i.imgur.com/oDOuwKH.png
- ActionMan: i'm still trying to find good quality settings at the moment...
- Neon Jackal: ahh
- ActionMan: lastly, instead of painting lights, you can use emissive materials. In my map, I've made some of the lights as geometry in sketchup and then put a special material on them. In unity, find the material, and change it's shader to Self_illumin/Diffuse, and enter an emission value: http://i.imgur.com/lGg67jG.png
- Neon Jackal: that sounds clever
- ActionMan: I think for them to work well, you have to use 2 (or more) bounces in your lightbaking settings... not quite sure yet. Quite handy for making your area lights in sketchup rather than unity though.
- ActionMan: i might post this transcript on the forums as a crappy lighting tutorial for anyone else who's map making :)
- Neon Jackal: yeah, that's a good idea
- ...
- Neon Jackal: None of the Mesh Renderers or Terrains in the scene are marked as static. Only static objects will be lightmapped.
- ActionMan: ah i forgot that step
- ActionMan: shit
- ActionMan: you have to select the instance that you've made from the FBX file in the hierarchy view, and click the static tickbox (and then yes to propagate static to the children)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement