RenX Material Editor

From RenegadeWiki
Jump to: navigation, search

This is an in depth look at the texturing of models created for use with the W3d engine. You can create many special effects if you know how make full use of this powerful graphics engine. The material editor in RenX is used to create these special effects such as transparency, reflection, scrolling textures and texture blending.

Contents

The Material Editor

Mat editor.jpg

This is the Renegade material editor; pressing the “M” key in RenX can access it.

Properties

On the right of the material editor window you see these 2 buttons: Prop 01.JPG The one on the top creates a material, and the lower one deletes the current material. To the left of that is a text box called Name: Here you’d put the name of the material you create. Below that is a selection box titled Surface Type: This lets you select the type of hit effect you want on the object with the current material when you are making a renegade material (ex. Setting this to Tiberium Field will give that material the damage properties of Tiberium.)

Below the Surface Type: box is a box that says Pass Count: This is for creating a material that contains multiple textures, each “pass” is like a layer that contains a texture. Still below that is a box that says: Static Sorting Level, this is here because the alpha blend (more on this later) function of w3d is kind of buggy, If the blend mode of a pass in your material is set to Alpha Blend, turning this on may correct some problems of objects appearing in front of each other when they shouldn't.

Pass 1 Vertex Material

Pass1 vertex material.JPG

Above is the Vertex Material for pass 1 here you can adjust the color of the object by modifying the way lighting affects it, the box labeled Emissive is the amount of light this object emits, by changing this you can make an object “glow”. You’ll see three boxes with numbers in them, Opacity, Translucency, and Shininess. By changing the number in the opacity box, you can make something translucent. Below are 2 boxes titled Stage 0 Mapping and Stage 1 Mapping. This is where you can create various texture effects. There’s also a number called UV, which is the channel the pass is on, If you change this and apply a UV map, you can get a different UV map for each pass by changing the channel the UV map affects.

Pass 1 Shader

Pass1 Shader.JPG

Here’s the Shader tab. You can change the blend mode for using the texture's Alpha channel or creating other effects.

Blend Modes

(from the official W3d tutorials):

Opaque: The map or color in its normal state with No Alpha opacity, and No blended overlay.

Add: Looks at the color information in each channel and brightens the base color reflecting the colors behind it, creating the effect of an additive overlay. It creates an opacity value based on the grayscale levels of the map.

Multiply: Looks at the color information in each channel and multiplies the base color by the blend color. The result color is always a darker color. Multiplying any color with black produces black. It creates an opacity value based on the inverted grayscale levels of the map. (Blacks are opaque, whites are transparent)

Multiply and Add: Multiplies the base colors by themselves, lights become brighter, darks become darker. It creates an opacity value based on the inverted alpha levels of the map. (Blacks are opaque, whites are transparent)

Screen: Similar to Add but not burning the brightness levels as much. It creates an opacity value based on the grayscale levels of the map.

Alpha Blend: The map or color in its normal state, If the map contains an alpha channel; it uses the alpha channels grayscale values to establish the opacity of the map.

Alpha Test: The map or color in its normal state, If the map contains an alpha channel, it uses the alpha channel to establish the opacity of the map however, it adjusts the threshold of the alpha channel to make it higher in contrast, no grays just black and white, resulting in harsher edges in the opacity.

Alpha Test and Blend:Combines aspects from Alpha Test and Alpha blend.

Pass 1 Textures

Pass1 Textures.JPG

This is where you the texture is selected, you’ll usually only use Stage 0 Texture, to add a texture file, first check the box next to Stage 0 Texture, click on the box that says None and pick a texture file, (should be in .tga format) click the Display button to show the texture to gmax.

Tutorials

Making a Basic Material

Open the material editor (“M” key) and make new material.

set the surface type to something that best reflects the material you’re trying to make

Click on the Textures tab at the top of the material editor window

Check the box that says Stage 0 Texture.

Click on the large button that says none and select the texture file you want.

Click the display button

Click the Properties tab and Apply material to selected object.


Translucency

Translucency can be used for objects such as glass or water…

After creating a material you want to make translucent, click the vertex material tab

change the opacity to desired level (something less than 1.0)

Click the Shaders tab

Set the blend mode to Alpha blend

Scrolling Textures

Scrolling textures are useful for lights, conveyor belts, anything you want to move. Renegade interprets scrolling textures as tank treads if they’re on the certain meshes of a vehicle model.

Linoffset.gif

Go to vertex material, and where is says Stage 0 mapping, change the type to Linear offset.

In the box labeled args: type UPerSec=x, (x being the speed) or VPerSec=x depending on whether you want your texture to move horizontally or vertically. It should look something like this: S 0 mapping.JPG

note: the args: box is case sensitive

Shiny Textures

Power shiny.JPG

This technique can be used to create realistic “shiny metal” effects. It utilizes a 2 pass material.

Make the first pass a normal texture.

The second pass should have its blend mode set to add and Stage 0 mapping should be set to WS Environment. The second pass texture should be something similar to reflect3.tga

Specular Lighting

An alternate way to make shiny looking textures is to use Specular lighting. Specular lighting only requires the material to have one pass.

To enable this, go into the Vertex material tab, and give Specular a light gray or white color and set the Shininess to 5-10. Go to the Shader tab and enable Sec Gradient

Personal tools