Vertex Painting in Lightwave: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Epifire (talk | contribs)
No edit summary
Epifire (talk | contribs)
No edit summary
Line 7: Line 7:
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.
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.


[[File:Vertex Paint Tut 001.jpg]]
[[File:Vertex Paint Tut 001.jpg|800px|]]


== Step 2: Importing and Painting in Lightwave ==
== Step 2: Importing and Painting in Lightwave ==
Line 17: Line 17:
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.
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.


[[File:Vertex Paint Tut 005.png]] [[File:Vertex Paint Tut 006.png]]
[[File:Vertex Paint Tut 005.png]] >> Hit Edit and Create Vertex Color Map from this drop down >> [[File: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.
 
[[File:Vertex Paint Tut 007.png|1000px|]]


== Step 3: Final Model and Material ==
== 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.
[[File: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.
[[File:Vertex Paint Tut 008.jpg|1000px|]]

Revision as of 05:05, 15 August 2017

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.

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.

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.

>> Hit Edit and Create Vertex Color Map from this drop down >>

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.

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.

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.