Difference between revisions of "Korman:Materials"

m (Material Options)
(Undo revision 7989 by Zeke365 (talk))
 
(11 intermediate revisions by 4 users not shown)
Line 2: Line 2:
  
  
This tutorial will explain the basics of Blender 2.74's materials and how they'll export with '''Korman'''.
+
This tutorial will explain the basics of Blender's materials and how they'll export with '''Korman'''.
  
  
Line 11: Line 11:
 
The material of an object is essentially the base, or if you add textures, the "underbelly" of the object.  If you'd prefer your object to be a solid color with no detail, you can use just a material.  Otherwise, if you want textures, you start first with a material.
 
The material of an object is essentially the base, or if you add textures, the "underbelly" of the object.  If you'd prefer your object to be a solid color with no detail, you can use just a material.  Otherwise, if you want textures, you start first with a material.
  
An object can also have multiple materials, with each one set to a specifici face (or faces) of an object if you so choose.  Also, if you join two or more objects, all materials (and their mapping) are carried over, or in the case of shared materials, merged.
+
An object can also have multiple materials, with each one set to a specific face (or faces) of an object if you so choose.  Also, if you join two or more objects, all materials (and their mapping) are carried over, or in the case of shared materials, merged.
  
  
Line 45: Line 45:
 
==Material Options==
 
==Material Options==
  
[[file:KorMat04.jpg|right]]
+
[[file:KorMat04.jpg|500px|thumb]]
  
 
===Diffuse===
 
===Diffuse===
  
This is the "base" color of your object.  Generally, this is set to white, but if you'd like to set your object to have a specific tint, you can change this color to something other than white.
+
This is the "base" color of your object.  Generally, this is set to white, but if you'd like to set your object to have a specific tint, you can change this color to something other than white. This color will be combined with the color of any textures used with this material.
  
 
If you'd like your material to show up a bit darker with no tint, you can use a shade of grey.
 
If you'd like your material to show up a bit darker with no tint, you can use a shade of grey.
  
Leave '''Lambert''' alone and leave '''Ramp''' unchecked.
+
Leave '''Lambert''' alone and leave '''Ramp''' unchecked. These settings are not used by Korman.
 +
 
 +
<blockquote>'''NOTE: As of Korman 0.11a, the diffuse color can be [[Korman:Animations#Color_(RGB)|animated]].</blockquote>
  
 
===Specular===
 
===Specular===
  
This option will give your object a "shine" based on your light sources.  This is not the same as a reflection, but it adds a touch of realism to metallic objects.
+
This option controls the "shine" based on your light sources.  This is not the same as a reflection, but it adds a touch of realism to metallic objects. By default, specular effects are not applied to any textures, but you can enable it on a per-texture basis. Don't go overboard though: specular lighting has a slight performance cost at runtime.
  
Adjust the '''Intensity''' slider to the amount of shine you would like. 0 is no shine at all while 1 is the most intense.
+
The color slider here controls what color the shine on your material will be. Typically it's safe to leave this as white.
  
Again, leave '''CookTorr''' and '''Ramp''' alone.  '''Hardness''' is set to 50 by default.  You can leave that too.
+
'''Hardness''' is set to 50 by default, and is used to control the "spread" of the shine. A value of 100 will result in a very focused shine, while a value of 1 will light the object much more broadly. The default value of 50 is a reasonably safe choice for most materials.
 +
 
 +
Again, leave '''Intensity''', '''CookTorr''' and '''Ramp''' alone.
  
 
===Shading===
 
===Shading===
  
'''Emit''' was used in PyPRP to make a material brighter than normal. It can also be used to influence lightmaps by making the material itself a source of light.  Currently, these are not implemented in Korman.
+
'''Emit''' can be used to make your material appear brighter than it would normally be. It causes the material to be lit by the diffuse color, before other lighting is combined. The slider controls how brightly the diffuse color appears: The default value of 0 will cause the material not to add any additional brightness, while a value of 2 will cause the material to combine the full diffuse color.
  
'''Ambient''' is usually set to 1 while '''Translucency''' is 0.  '''Tangent Shading''' and '''Cubic Interpolation''' is not used.
+
'''Ambient''' is usually set to 1 while '''Translucency''' is 0, but these values are not used by Korman.  '''Tangent Shading''' and '''Cubic Interpolation''' are also not used.
  
'''Shadeless''', when checked, will cause the material to be unaffected by any light source or shadows.
+
'''Shadeless''', when checked, will cause the material to be lit with full brightness by a white color.
  
 
===Options===
 
===Options===
Line 77: Line 81:
 
'''Full Oversampling''' and '''Sky''' are not used.
 
'''Full Oversampling''' and '''Sky''' are not used.
  
'''Use Mist''' will determine if an object is affected by the fog set in your Age.  Most often, this is unchecked for things like skydomes so they can be seen through fog.
+
'''Use Mist''' will determine if an object is affected by the fog set in your Age.  If this is unchecked, an object with this material will appear clearly through the fog.
  
 
'''Invert Z Depth''' can be skipped.
 
'''Invert Z Depth''' can be skipped.
Line 83: Line 87:
 
'''Z Offset''' is used for very close-quarters objects.  If two objects are overlapping, you may get clipping.  You can set Z Offset to something above 0 to remedy this.
 
'''Z Offset''' is used for very close-quarters objects.  If two objects are overlapping, you may get clipping.  You can set Z Offset to something above 0 to remedy this.
  
'''Light Group''' will set the material to only be affected by a certain light group during lightmapping or vertex shading.
+
'''Light Group''' will set the material to only be affected by a certain light group during lightmapping or vertex shading '''and''' when exploring the Age.
  
 
All the check boxes to the right can be left alone ('''Face Textures''' through '''UV Project''').
 
All the check boxes to the right can be left alone ('''Face Textures''' through '''UV Project''').
Line 89: Line 93:
 
'''Pass Index''' is very important when organizing objects with transparency.  
 
'''Pass Index''' is very important when organizing objects with transparency.  
 
   
 
   
EXAMPLE: If you want transparent object A to sit above transparent object B without the alpha eating through the object below, object A should  
+
'''EXAMPLE''': If you want transparent object A to sit above transparent object B without the alpha eating through the object below, object A should  have a higher Pass Index than object B, ie Object A = 2 while object B = 1.
  have a higher Pass Index than object B, ie Object A = 2 while object B = 1.
+
 
Generally, new objects have a Pass Index of 0.  If they're solid (no alpha), that should be fine.  Otherwise, set transparent materials to Pass Index: 1 or above.
 
Generally, new objects have a Pass Index of 0.  If they're solid (no alpha), that should be fine.  Otherwise, set transparent materials to Pass Index: 1 or above.
 +
 +
==Shadow==
 +
 +
[[file:KorMat06.jpg|right]]
 +
 +
Added as of version 0.07.
 +
 +
This panel controls how the material receives light. The default settings here are good enough for URU.
 +
 +
The one thing to note here is the '''Receive Transparent''' option. This option is needed for the material to receive shadows from meshes with [[Korman:Transparent_Texture_Shadow|textures that have transparency]].
 +
  
  

Latest revision as of 18:17, 13 November 2024

Disambig gray.png

This is a tutorial page.Versions available: PyPRP; 3ds Max; Korman.
 


This tutorial will explain the basics of Blender's materials and how they'll export with Korman.


Introduction

Any object that you would like to be visible in Korman should have a material. If it's a region, clickable, or anything else you would rather not have visible, materials are not needed. With PyPRP, this would break the export if the object wasn't specifically set as a region or collider, but with Korman, that is not a problem.

The material of an object is essentially the base, or if you add textures, the "underbelly" of the object. If you'd prefer your object to be a solid color with no detail, you can use just a material. Otherwise, if you want textures, you start first with a material.

An object can also have multiple materials, with each one set to a specific face (or faces) of an object if you so choose. Also, if you join two or more objects, all materials (and their mapping) are carried over, or in the case of shared materials, merged.


Materials In Blender

To add a material to an object, first select the Material button in the Properties window.


KorMat02.jpg


Next, press the + to add a new material. Name it anything you'd like.


KorMat03.jpg


Remember that you can add many materials to the same object. Each can have its own textures.

To assign specific faces to each different material, press the Tab key in 3D View to bring up Edit Mode. You will see three new buttons just below the list of materials:


KorMat05.jpg

  • Assign: This will set any selected face to the selected material.
  • Select: This will highlight any face associated with the selected material.
  • Deselect: This will unhighlight any face associated with the selected material.

Press Tab again to exit Edit Mode.


Material Options

KorMat04.jpg

Diffuse

This is the "base" color of your object. Generally, this is set to white, but if you'd like to set your object to have a specific tint, you can change this color to something other than white. This color will be combined with the color of any textures used with this material.

If you'd like your material to show up a bit darker with no tint, you can use a shade of grey.

Leave Lambert alone and leave Ramp unchecked. These settings are not used by Korman.

NOTE: As of Korman 0.11a, the diffuse color can be animated.

Specular

This option controls the "shine" based on your light sources. This is not the same as a reflection, but it adds a touch of realism to metallic objects. By default, specular effects are not applied to any textures, but you can enable it on a per-texture basis. Don't go overboard though: specular lighting has a slight performance cost at runtime.

The color slider here controls what color the shine on your material will be. Typically it's safe to leave this as white.

Hardness is set to 50 by default, and is used to control the "spread" of the shine. A value of 100 will result in a very focused shine, while a value of 1 will light the object much more broadly. The default value of 50 is a reasonably safe choice for most materials.

Again, leave Intensity, CookTorr and Ramp alone.

Shading

Emit can be used to make your material appear brighter than it would normally be. It causes the material to be lit by the diffuse color, before other lighting is combined. The slider controls how brightly the diffuse color appears: The default value of 0 will cause the material not to add any additional brightness, while a value of 2 will cause the material to combine the full diffuse color.

Ambient is usually set to 1 while Translucency is 0, but these values are not used by Korman. Tangent Shading and Cubic Interpolation are also not used.

Shadeless, when checked, will cause the material to be lit with full brightness by a white color.

Options

Traceable should ALWAYS be checked.

Full Oversampling and Sky are not used.

Use Mist will determine if an object is affected by the fog set in your Age. If this is unchecked, an object with this material will appear clearly through the fog.

Invert Z Depth can be skipped.

Z Offset is used for very close-quarters objects. If two objects are overlapping, you may get clipping. You can set Z Offset to something above 0 to remedy this.

Light Group will set the material to only be affected by a certain light group during lightmapping or vertex shading and when exploring the Age.

All the check boxes to the right can be left alone (Face Textures through UV Project).

Pass Index is very important when organizing objects with transparency.

EXAMPLE: If you want transparent object A to sit above transparent object B without the alpha eating through the object below, object A should have a higher Pass Index than object B, ie Object A = 2 while object B = 1. Generally, new objects have a Pass Index of 0. If they're solid (no alpha), that should be fine. Otherwise, set transparent materials to Pass Index: 1 or above.

Shadow

KorMat06.jpg

Added as of version 0.07.

This panel controls how the material receives light. The default settings here are good enough for URU.

The one thing to note here is the Receive Transparent option. This option is needed for the material to receive shadows from meshes with textures that have transparency.


Now that our material is properly set, let's add textures!