23 November 2010

Softimage > gile[s] lightmapper> ShiVa3d tutorial

This is a basic tutorial on how to use gile[s] lightmapper with Shiva3d (as much for me as for anyone else).


Lightmaps are useful for getting static lighting onto scenery on low-end Android phones as some do not support per-pixel lighting and also suffer from artifacts when using ShiVa3d per-vertex lighting.

Anyway, this tutorial takes us through a very quick generation of a lightmap in gile[s] v2 (Version 2 is still in beta and will probably remain that way, however v1 seems to have issues in Windows 7 and lacks some v2's feature set):-

Tutorial


1. Build the model in Softimage and export as an obj with the UVs for the diffuse maps already done. Import into giles[s].


2. In gile[s], add a sky, by clicking on the create sky button under the create tab. Click somewhere near your imported model.


3. Pan the scene by see the sky, then select the sky under the model tab and tweak the settings so that the sky is high and bright in the sky (see image).


4. Low-end Android phones (like HTC Hero) can't handle any textures above 256x256 very well, performance is hit quite a bit. In the Top menu > Editors > Lighting Methods editor;  click on the add button at the bottom of the Lighting methods dialogue (icon with a green plus sign) to add a new Lightmap. If you want crisper shadows you will need to add a directional light to the scene also. I'm just going for a daylight ambience in this tutorial.

5. Again, from the editors menu, select Material Editor to call up the materials editor. Select the lightmap you just created under the Lighting Method area of the dialog.

6. In the Light Methods Editor you'll notice the material you added the new Lightmap to has now been placed under the light map in the tree on the left had side. This means that multiple materials can use the same lightmap or each material can have its own lightmap. It's all about finding the right compromise between performance and aesthetic quality.

7. Lastly, choose the GI renderer, you have options of Path Tracer, GPU Radiosity or Ambient Occlusion:-

8. From here on, tweak settings in all the various dialogs mentioned and re-render as you go, until you are satisfied with the results. 


9. Export should be done using *.obj (I've tried others but obj seems the most problem-free). Export will create 3 files: the original mesh, a 2nd mesh with the lightmap UV generated by gile[s] and the lightmap itself in bmp format. Bring all files back into Softimage (or your chosen 3d DCC app) and create a second UV set on the original mesh (property > Texture > Planar UV). Using the texture editor (F7), copy and paste the lightmap UV set from the lightmap UV mesh onto the second UV set of the original mesh. Finally, export the mesh as a DAE file. Import into ShiVa.


10. For the mesh's material, change the Material>Texturing effect to "Modulate", put the lightmap into Effect Map 1 and the Diffuse/Color map into Effect Map 0. Under the lighting tab set Emissive to black, Ambient and Diffuse to White.


Easy.

8 comments:

  1. Anonymous5:16 PM

    chanel outlet Nightfall chanel handbags 5359 Cheap is hot sale online,welcome to our store to buy Black [ URL=http://www.theychanel.com.com/ - chanel and totti [/URL uu8n75 ,we guarantee fast shipping,cheapest price and 100% high quality guaranteed

    ReplyDelete