Vertex Painting in Lightwave

From The DarkMod Wiki
Revision as of 05:05, 15 August 2017 by Epifire (talk | contribs)
Jump to navigationJump to search

Here we'll discuss from start to finish, a Vertex Color Map on a model converted from Dark Radiant brushwork. Software you'll be using are Dark Radiant and Lightwave Modeler. How you procure a copy of Lightwave is entirely up to you; I happen to be using Lightwave Modeler 11.5 for this tutorial. It's worth noting that Lightwave saves it's model data into the proprietary binary file type LWO. LWO is one of two primary formats supported to run in the Doom3 engine (the other being ASE). This painting method can be done in either format but LWO is by far a superior type as it usually only amounts to mere kbs of data for multiple files.

This tutorial already assumes you know how to create levels and manage brushwork in Dark Radiant. After covering this tutorial you should cleanly be able to add in material blending to your levels, with no modeling skills required.


Step 1: Prep and Export Brushwork

Here I already have a prepped small space done up in DR. It's important that you do you texture and scale the surface properties to your liking. When we export this data in the OBJ script, this will be used as your UV data in Lightwave. When ready to export in DR go Scripts>ExportOBJ and be sure to center objects.

Vertex Paint Tut 001.jpg

Step 2: Importing and Painting in Lightwave

Now it's time to head to Lightwave and open your OBJ file you've exported. First thing you'll want to do is press F5 to bring up the Surface Editor panel. Two things you'll want to do is check smoothing on and find a good value (I use 60 degrees) and then press rename in the top right corner to specify the material name you want to embed in the saved LWO. Here I use vertex_blend_test for my example material name and it must be devoid of typos to match the name we'll declare in the MTR later.

Vertex Paint Tut 002.png

Next we're going to paint black and white vertex colors to define material blending. To find the painting window you'll have to go to the Map tab and find Vertex Paint under Color.

Vertex Paint Tut 005.png >> Hit Edit and Create Vertex Color Map from this drop down >> Vertex Paint Tut 006.png

Here's an example of how your mesh should look when painted. Be sure you use solid white and black and only grays on vertexes where you want softer blending to be present. Once complete save and exit the paint window.

Vertex Paint Tut 007.png

Step 3: Final Model and Material

Finally we just need to triangulate the polygons (since TDM can't render straight quads) and then save your new mesh to your desired output folder. To Triangulate the mesh simply go to the Multiply Tab and press Triple. You can now save the file to it's output directory. Note: LWO is Lightwave's native format and will save a working model for TDM by default.

Vertex Paint Tut 004.png

A short rundown here on the material composition. This is a material I put together from stock assets so you can plug this right in (or modify it) to your heart's content!

vertex_blend_test { surftype15

   	description "grass"
   {

blend bumpmap map textures/darkmod/nature/foliage/leaves_small_local VertexColor //This is white coverage

  	}

{

       blend diffusemap                                                    

map textures/darkmod/nature/foliage/leaves_small

       VertexColor                

//This is white coverage

   }


{ blend bumpmap map textures/darkmod/nature/dirt/dry_earth_stones_local inverseVertexColor //This is black paint in coverage

  	}

{

       blend diffusemap                                                    

map textures/darkmod/nature/dirt/dry_earth_stones inverseVertexColor //This is black paint in coverage

       }

}

Save that into an MTR and make sure that name matches with the one you chose in the Surface Editor. If all goes well you should be able to pull of some more natural looking blends like this.

Vertex Paint Tut 008.jpg