Adverti horiz upsell
Maya to Lightscape
Maya to Lightscape
sdb1987, added 2005-09-09 10:04:25 UTC 42,946 views  Rating:
(0 ratings)
Page 1 of 2


Grab the melscript hereExpMulOBJ.zip

A little introduction

With more and more powerful processors becoming available to the average user at affordable prices, radiosity solutions are becoming increasingly popular. Maya, however, does not have a radiosity engine. This tutorial shows how to use Lightscape to render and manipulate a scene modeled in Maya�with a little help from 3D Studio Max.

There are different algorithms for calculating global illumination, producing different levels of complexity and realism. One of the bigger differences between them is the way they trace the light reflecting from objects. The simplest form of global illumination traces rays from the camera until they hit the points of an object. From there the rays are traced until they intersect with a second set of surfaces. It's basically a 1-bounce radiosity solution. Lightwave 6.0, TrueSpace, and SolidThinking use this approach, as does Mental Ray if photon maps are not enabled. Other programs allow the light to bounce between surfaces until it "dies," giving a more precise, scientifically accurate and computationally expensive result. This is the preferred solution when rendering interior scenes. In an interior situation, the light interaction is much higher than in an exterior scene where the light has more time and space to travel and disperse.

The goal of this project was to create a light study of a room with Lightscape for use in an entertainment project. In this situation all the strengths and weaknesses of Lightscape were demonstrated. These are discussed in greater detail in the Notes section at the end of the tutorial.

Modelling the environment

Lightscape only computes the radiosity solution on polygon vertices. To achieve a more accurate simulation, Lightscape goes through a tessallation process called �Preparation� before the lighting computation starts. The tessellation is generated based on the position and number of lights and will increase the vertex count in the areas where the light change is most dramatic.





Lightscape stores the radiosity solution �inside� the vertices. This makes it possible to stop and restart the rendering at any point and, with adequate hardware, to rotate around the scene without having to render any frames. Unfortunately, the Lightscape file grows in size while the rendering progresses and can easily reach several hundred megabytes. The entire scene has to be loaded in to memory to be rendered and/or refined, so if your Lightscape solution file has reached 300 MB in size it will probably take 4-500Mb of RAM to continue rendering the scene. When modelling, keep the polygon count as low as possible.

Many optimizations can be done at "face level" in Lightscape, such as turning off radiosity. It�s a long, tedious, and difficult job with a high poly count and the Lightscape interface is not very flexible or intuitive. If the mesh is especially dense when Lightscape calculates the radiosity solution memory will quickly be filled and render time will be astronomical.

It's best to model everything directly in polygons. Lightscape prefers quads. They help the tessellation process by reducing unnecessary vertices.



- If you don�t see the edges of your object use a low polycount and crank up the smooth angle.

- The Lightscape manual suggests using booleans to avoid polygon intersections and to reduce the vertex count. I find this technique too extreme, but that is just my personal taste. If you don�t mind texturing at a face level, and possibly modifying objects which have become �melted� together, use the Union boolean everywhere it makes sense (like the walls and the floor but not a door and a lamp). If you decide that you don�t want to boolean surfaces, watch out for intersecting polygons. Sometimes Lightscape renders half-intersecting polygons black.





- Check your normals. Lightscape only accepts 1-sided polygons for rendering calculations. If you have to model a piece of cloth or something similar, where both sides must be visible, make two copies of the same object. Separate them slightly and invert the normals of the inner object.



- It is important to build everything in the correct scale. Lightscape is mainly a scientific program, and the light is treated in a very accurate way. If you put a light bulb in a Barbie House the entire house will be illuminated and bright. The bulb in a real house will barely illuminate objects in the same room with the light.

Texture and Shading

Now that we have the model, let�s texture it. The easier workflow from my point of view is building and using the UV of the model. If you have projections or procedural maps, convert them to textures. Unfortunately, Lightscape only has a limited number of material features. Lightscape can only use color maps. No Bump, Specular, Diffuse or Displacement. If you do your final rendering in Lightscape, remember that you can�t use any of these map types. You have to rely on the color map and Lightscape's few material controls.

When the model and textures are ready it is time to import them into Lightscape. The .obj file format supports quads polygons and preserves UV, but unfortunately Maya doesn�t let you export multiple objects. I wrote a simple mel to overcome this limitation. Script
[link]

Load the plug-in to export the .obj and select all the objects that you want to export. Run the script and enter the path where you want to save your Obj. For the next step, you need a little help from 3D Studio Max. It has a free Plug-in for importing and exporting Lightscape files with camera motion, light position, light intensity, textures, shaders etc� https://www2.discreet.com/support/lightscape/ . It even has a free Plug-in that imports Obj files https://www.habware.at/duck2.htm .

Import your models. If you don�t want to do it one by one, you can write a script in Max to do this for you, or use the Okino Polytrans https://www.okino.com/ to open all the .obj's from one directory and save them back as separate objects in one big merged .obj.
Remember to set your export option on "LF". Many applications, including Maya, prefer this format.