Home
Contact
About
 
 
  LightWave to LightScape to LightWave Guide Part VI
 
 


This tutorial consists of several parts:

 
 

To support the further development of this and other guides please donate so I can buy cheese and such.

paypal

Tom Bosschaert, MSc, MArch
July-14-2008

 
 

What do you need?

  • Lightwave v6 or above (preferably 8.2)
  • Lightscape v3.0 or higher (preferably 3.2)
  • Accutrans 3D (Only for Part IV of the tutorial, read step VI-3a to see why)

 


Tutorial Introduction
Object of this tutorial:

To take the Lightwave objects we created in the previous parts of the model and use Microwave to bake the lighting solution into Image maps as opposed to Vertex Maps.

What do you need?

  • Lightwave v6 or above (preferably 8.2)
  • MicroWave by Evasion3D ($499)

Why Bake the solution?

The vertex maps give us everything we need in order to render the solution as it stands. Usually we don't need to bake the solution to image maps at all, it only takes us time and effort to do so, and potentially degrades the image quality. The solution will hardly render any faster. However when we for instance want to make a VRML walk through, or any other kind of real-time application, its usually best to bake the maps to prevent differences in viewing applications to mess with the vertex maps versus the applied textures (if they can handle it at all).
A second reason for baking the images is that after the images are applied to the model the excessive tessellation of the model is no longer necessary, and we can start optimizing the model, to gain even more speed, and regain some control over the model. Also, image maps are easier to manipulate than vertex maps and therefore if there needs to be tweaking of the GI solution or the textures or something, it can be easily done in Photoshop or an equivalent program.

When do I use this method as opposed to the Surface Baker method described in Part V?

Using MicroWave is the only way you can actually remap the solution to the original model. Using surface Baker is only a workaround, and not a very good one at that. However, MicroWave is expensive. You need to think twice before you buy it just for this purpose. Do you really need the model to be much lighter? For real time applications sometimes the original tesselated model is fine too. However, MicroWave is still much handier to use in that case. Assess the differences by reading both tutorials, and find the option that suits you best.

 

Its all text, no pictures (yet!)

Download the Lightwave scene from Part IV here. (ZIP 2.6 Mb)

So you've got your color vertex mapped highly tesselated but looking good model in Layout, and you want to make this into a lower poly object where the vertex map is discarded and textures are used instead. This will benefit the following areas:

  • Real time application such as Shockwave3D and VRML, much lower poly count
  • Editability of the solution, since image maps are much more editable than vertex color maps
  • Editability of the mesh, since there are no more excessive polygons
  • Organisation, easier to manage materials with image maps

This cannot be done with Surface Baker.
What you do is take the original model that we first had in Lightwave before exporting it to Lightscape. We need to UV map this model properly. Open it in modeler and select the surfaces that you want to have one single texture. Some common sense is usefull here. If you are unfamiliar with UV mapping, there are excellent tutrials out there, but its really quite straightforward. Select the polygons you want to UV map, Make New Map, choose Atlas as a projection method. I always use a huge gap in between the polygons. This will really help later on when 'expanding' the UV map. Also, only create the maps based on surface selection. DO NOT select directly. That will give you lots of trouble later on. so use the polygon statistics panel (w) to select the surfaces per map.
Take notice that every UV mapped polygon that does not directly neighbour an attached polygon can produce nasty black lines when used in VRML for instance (not when rendering in LW). Therefore do not unweld before making the map, but only after making it, so the polygons stay together. Then perhaps organise the map a bit to increase efficiency.
Do this for every set of polygons you feel is handy to have one map. Keep in mind smaller textures are slightly more fficient than larger ones, so prefer 10 2048x2048 textures over 4 4096x4096 for instance. For the test model I think I used 5... ceiling, walls, wooden floor, other floors, chairs and windowframes, stairs.
Oh yes, Microwave doesnt support poly's with more than 4 points, so using the statistics window (w) select all poly's having more than 4 points and triple them. Perhaps use MergeTrigonsX to get them back to quads. Also, make sure there are no 2 point poly's, no crooked geometry and all. so do a unify polygons and delete alone vertices and so forth. Make sure your UV maps are correct and there are no intersecting lines on them (if you have, you need to unweld them poly's in the Uv map).
Once the object is mapped (never mind the material settings, they are irrelevant), save the object as something new, like SimpleHouse_UV.lwo or something.

Now have the scene in which the object resides which resulted from the previous tutorials. Make sure you have your direct lights such as your sun set up properly so that it matches the original position in Lightscape. It doesnt have to be exact, and frankly you can put it anywhere you want, it just sometimes won't look right... up to you. Anyway, you can also have pointlights and other lights added as well.
Also make sure all your materials are the way you want. Depending on what you're going to do with the model after it is baked you might want to considder baking reflections too for small metal objects, such as the frames of the chairs in the tutorial model. If you use it for realtime application, that is what I would do. If you use lightwave to render things, then you can keep the raytraced reflections, and baking reflections is not recommended.
Anyway, if not baking reflections, turn them off in the render options panel. Make sure Shadows are on.

Now yo have a scene which, if rendered from a camera standpoint would see exactly what the baked output will see. We will now use microwave to actually do it.
Save the scene as 'Scene_Microwave.lws' or something, and also save the main objects under a recogniseable name (SimpleHouse_fromLS_Microwave.lwo or something). Now, without closing anything, open the model you saved from modeler (SimpleHouse_UV.lwo) into layout. You will now have two objects in layout that occupy the same space. Go to the object properties of the simplified, uv mapped object and set it to 'Unseen by Rays' and 'Unseen by Camera'. Go tot he object properties of the tesselated model and set it ONLY to 'unseen by camera'.
Now go to the pixel filter plugins dialog (ctrl-F8). Select MicroWave.
As an object you choose the UV mapped object, NOT the object containing the solution! Also select the UV map you wish to bake first.
As a projection type use 'Object' and the direction should be 'To'. Then set a distance of 1 mm or something small. This number will be the tolerance in which MicroWave will allow the distance between the points of the tesselated object and the clean object to be.
Keep the 'Bake Render' option to on.
As a resolution, pick whatever you want. Soemthing like 2048x2048. Make it square of course. Use an expand that is relevant and usefull for the image map. So for 2048x2048 I would expand with 4 pixels. You can turn AA on if you want, but its not as important as in a normal render. I usually do though, as it bakes rather fast anyway. Alpha channel for these maps is useless so choose a 24 bit format like tiff24.
Now set your Image base name, that is recogniseable. Make it the name of the UV map perhaps...
If baking really large textures I would reccomend turning the 'show preview' off. Otherwise it can be fun to watch.
Then, close the microwave panel, and just press F9. You will see nothign in the render window, but the Microwave preview and/or monitor will pop up. Once it is done, the image was saved.
Do this for all the UV maps in the object untill you done them all. Save the scene and objects.
Now save the clean object as 'simplehouse_MWbaked.lwo' or something. Save the scene as 'Simplehouse_MWbakes.lws'. Remove the tesselated object from the scene (yaay), and also all lights. Set the last light to 0.
Now apply each image map that Microwave made that belongs to certain surfaces (see why you should have mapped according to surfaces?) to those surfaces, using UV projection, an dusing the UV map that you used to generate the map in the first place. It should fit perfectly. Do this for all the maps, and voila you're done.

Alternatively, you can even increase efficiency by using lightmaps in combination with the texture maps that were applied. Its roughly the same process though. Ill leave you with this for now, and let me know if you want to know abouyt the lightmaps in time, if you cant figure it out.

Good luck!



Links & other tutorials


If this tutorial proves especially handy for you, would like to support the creation of more of these tutorials and new developments, or would just like to express your thanks, you can make a donation by clicking on the following button, or alternatively just send me an email.



Go To Presentation Resources page


Go to Except Website

This guide is Copyright 2008 Except Design, and written by Tom Bosschaert. Nothing from this website can be copied, transferred, published or distributed in any way without prior written consent from the author.