hey all,
I'm having few problems with maya's realtime (viewport) lighting. I wanna use realtime lights rather than render to better display how my asset would be lit in a game. this is my first time lighting so please bear with the noob questions:
1. intersecting geo doesn't block light. the porch overhang isn't blocking light even though only the 3 front porch lights are on (selected).
2. shadows aren't casting. this is probably just a matter of ticking a box somewhere but I can't find it!
3. all my lights won't work at the same time. they each work individually when I select them and I have 'use selected lights' on, but when I select 'use all lights' only a few of them work.
4. high quality rendering turns the scene black.
[insert black image here]
the asset (the house) is sitting on a flat plane under a giant dome. all my lights are point lights with an intensity of 4.0-6.0 and a linear decay rate. not sure if that's the right kind and/or settings to use but that's what gave me the best results so far. I also have a directional light casting blue moon lighting over the entire scene but it only works when selected ><
Replies
High quality usually just fails like that on consumer ATI cards, and only sorta works on Nvidia consumer cards.
Realtime shadowing... I don't think I've ever gotten that working in maya. And geometry just plain DOESNT block light in the viewport, and only does in renders if you turn shadowing on. Raytrace is better, but depth map is quicker.
What you CAN do is bake your lighting to a texture or vertices then add that lightmap on to the egeometry in a variety of ways.
heres how(textures) (its gonna be a bit tedious but it will work):
1: make a copy of your geometry.
2: switch to rendering mode and select Transfer maps from the Lighting/shading menu.
3: add one object to the target meshes section and its coresponding duplicate to the source section.
Remove whatever default maps are there, and click the shading, or lighting button. Pick your texture size you want and click bake.
DO this for each separate object in the scene, but be sure to put all the maps somewhere easy to find.
More tedium: Create a material for each separate object. Import the lightmap for that object. Create a multiply node from the general utilities section under file->create.
Link the diffuse file for the object to one input of the multiply node, and the lightmap to the other, then link its output to the color input of the object's material.
Repeat for each object.
Baking to verts should be simpler, though I forget the exact steps for that. The results won't be as crisp as light maps, but it should save a lot of time.
If maya had better CGFX support I'm sure one of the assorted technical people around here would just write a shader that supported all this in real time.
Sometimes lights get sorted out and doesnt link with objects. In this case i go to the object, select it an reapply the same material, light comes again. This unfortunaly its a bug.
If I remember, maximum lights on maya viewport is 8 for each object, if you setup a light with quadratic you may get more lights showing because of decay. I didnt test this out yet, but that works on every engine, even in Unreal you cant have too many dynamic lights. What I would do on your case is baking vertex lighting as Vailias said and use 2 dynamic lights.
one final question though, how do I get a lamp/lightbulb to look like its actually emitting the light. placing the point light inside the geo blocks the light, and placing it outside casts shadows/doesn't light the opposite side.
I tried turtle a while ago for baking AO maps. it's really good, but I didn't get into it cuz I wasn't really rendering anything back then. without a doubt my trial period is expired =/
do ppl still use vertex shading/lighting even on current-gen games? wouldn't that conflict w/ dynamic lighting? or do they treat it more like a poor-mans AO?