Tutorials/Lightwave 3D exporting lightmaps

From Quest3D

Jump to: navigation, search

Contents

Getting Lightmaps from lightwave to Quest 3d in a separate texture stage.

This tutorial is made to show you how to get lightmap from Lightwave to Quest 3D in a separate texture stage. The advantage of having your diffuse map and lightmap in a separate texture stage is that you can have overlapping in you UV map for the diffuse (saving space), you can tile you Diffuse map if needed and you can easily adjust the diffuse map without having to render the lightmap again.

Quick steps

1 Make two UV sets for your object. The first is for you diffuse map and can have overlapping UV coordinates. The second 1 is for the lightmap and can not have overlapping UV coordinates.

2 Bake your lights to a white texture using the lightmaps ( non overlapping) UV set.

3 Import both UV sets on a separate copy of the object into Quest 3d.

4 Transfer the Lightmap UV set to the other object Using the merge UV set channel tool.


Full explanation

Step 1


As a example I made this very basic scene in Lightwave modeler. It’s a cube and a plain, nothing special.

Diffuse UV Set
Diffuse UV Set
Lightmap UV Set
Lightmap UV Set
Channel Tools
Channel Tools
Merge UV Tool
Merge UV Tool
Final
Final

Since this scene contains a cube with the same picture on all sides of the cube, Make UV overlap, making the resolution higher. Then make a second UV set with no overlapping (I used the atlas map type for this) On this particular object the resolution for the diffuse map will be about 9 times higher then the resolution of the lightmap. Now Complete the diffuse map as you like and save your scene.

Step 2

Now load your object into Lightwave Layout, put the surface color on pure white and remove the diffuse map. Add the Surface Baker Shader and for the UV set Pick Lightmap. Now set up your lights and render, the surface baker shader only 1 thread when rendering so if you prefer you can use the Surface Baker Camera witch does support multithreading.

Step 3

So now we have 1 object with 2 different UV sets and textures, to get them into Quest 3D we have to import the object 2 times, one time for the diffuser map and 1 time for the lightmap. So assign the diffuse map to you object with the correct UV set and export it to a .x file. Now assign the lightmap to the object with the correct UV set and export it.

Step 4

Now we have 2 objects in Quest 3D 1 with the diffuse map and 1 with the lightmap. We are now going to copy the UV set from the lightmap object to the diffuse map object so we have 2 different textures and UV sets on 1 object.

To do this go into object mode and control + click both objects. Now right click on 1 on the 2. Now select Channel Tools > Merge UV sets

To make the surfaces easier to recognize I named them all ( RMB on the surface in object mode > Channel Properties)

Make Sure the lightmap object is on the left, if not press “Swap <==>”.

Now set the texture stage you are going to import the UV set to, to 2.

To transfer the UV set, LMB on the Box surface in the left object/row then LMB on the same surface but in the right object/row.

Now click on “Copy UV Selection =>”. Do the same for the plain surface.

Now you can got to the second texture stage of the box surface and select UV set 1 and assign the lightmap texture. Under blender mode (advanced) put the Op to modulate. Do the same for the plain surface and we are finished, you can now remove the lightmap object.

Used Plugin

For this tutorial I used the DSTORM .X exporter (it also works for Lightwave 9). You can download it here:

You can find all the information about installing and managing plugins in the help files of lightwave or look here.

Personal tools
Navigation