Hi polycounters !
I've been doing some 3d work recently and started to put everything into Unity, but as the built-in lightmapper is a pain in the a** to use : I'm planning to do all the non-dynamic light work in 3dsmax.
The thing is, it's my first-time at lightmapping and I'm stuck at some point.
I have this modular block I duplicate, forming the base of my level. This block is made of a single model, using 1 material (1*diffuse, 1*normal, 1*specular) with 2 sets of UVs (Channel 2 is for the lightmap's UV).
Once the lighting work is done, I simply Render To Texture the lightmap for every block of the level, based on Channel 2 UV.
The question is (assuming I'm using Unity), how can I apply only 1 material to a model (all the blocks are exported into a single FBX) and apply different lightmap texture for each element ?
I keep turning this question around and still got no clue. I can't believe the only solution is to create one material per element (which would be stupid).
Could anyone help me on this ?
I can post pics if needed, but I'm just trying to get the main concepts of this.
Thanks.
aur8l
Replies
the specific issue that you are outlining has NO solution in maya I doubt max has one either. In maya only unique geometry can be light-mapped so you either merge(destroy) all your instances or you will have a material per object. Neither of those 2 options are solutions as far as i am concerned.
I'm not trying to use the light maps in max but I'm wondering how I can use external light map on single objects that share the same material.
I think I can do it unwrapping the level in atlas mode. But I still have to figure out how I can apply my max generated light map onto my model in Unity.
Unity's lightmapper worked well when I used it about a year ago. It handled all the lightmap assignments automatically, and made layout tweaks much less painful.
just make sure you got spilts and padding on your ligjtmap uvs anywhere where you don't want bleed.
The built in lightmapper is really painless. Get to love it . There is an add-on for Unity that exposes even more parameters.
For intimate single rooms, I spend a lot of time doing custom lighting in mental ray (using MR materials in Max) and bake out the results, combine with a custom shader and use in Unity. You can also just render out a exr (make sure it is flattened in PS) and use that in Unity on a lightmap enabled shader.