Raw Materials

Materials are assigned to objects or faces. A material defines the way the faces will interact with light. Basically, the light emitted by a point is the sum of 5 components:
  • The ambient Colour. The colour of the material when no light hit it.
  • The diffuse colour of the material. The intensity of this colour depends of the angle between the lights and the normal of the lighted point.
  • The specular colour. For shiny material, there is a highlight that reflects the lights. The size of the highlight is controlled by the shininess parameter.
  • Transparency. The amounts of light that go throw the object.
  • Reflexivity. The amount of reflection of the world on the object.
When only one object is selected or when some faces of an object are selected, the control panel displays the dropdown button shown on the left. This dropdown button displays the properties of the material assigned to the first face of the selected object or the last of the selected faces. The user can change the material and/or its properties with the 'Edit ...' button. There are three ways to edit/add a material:
  • Option->raw materials... menu
  • Click on the 'Edit ...' button in the material dropdown button
  • Use the in the toolbar.
There are two default materials: 'defaultFlat' and 'defaultSmooth'. These two default materials can not be edited.
The following window is opened each time the user asked to edit materials:

The list on the left is the list of all available materials. The materials can be grouped by adding a prefix and a dot in the material name.
The button 'new' copies the selected material.
The button 'del' removes the selected material. ppModeler asks to the user if he/she really wants to proceed if the material is in used in the current scene.
The button 'Rep. in scene' opens a window where the user can replace one material by another in the current scene.
The buttons 'Load' and 'Save' allow loading and saving materials. This is a quick way to share materials among many scenes.
On the right, there is a preview image. The current material is assigned to a sphere. The user can move the point of view with the mouse (drag) or the keyboard (arrows).
The inputs allow changing the current material properties. They are:
- Material Id: A number automatically assigned to the material by ppModeler. This number cannot be changed.
- Name: The name of the material. ppModeler don't allow two materials to have the same name.
- Clone of: It is possible to define a material as the clone of another one. Then, all the properties of the cloned material are copied form the clone, except the name and the smooth group. It is possible to define groups of faces by this way: a new clone material is created and affected to the desire faces. Then the 'select faces by material...' command can be used to retreive the faces.
The cloneable materials are the ones not already the clone of another material.
- Ambient Colour: The colour emitted when no light hits the material.
- Diffuse Color: The colour reflected when light hits the material. A texture can also be used to define the ambient colour, but at the level of the objects or the faces...
- Specular Color: The colour of the highlight.
- Shininess: The size of the highlight.
- Transparency: The level of transparency of the material. Apply only in raytraced images.
- Reflexivity: The level of reflexivity of the material. Apply only in raytraced images.
- Smooth group: If two faces have the same smooth Group, the edge between the two faces will be soft. If the two faces have a different smooth Group, the edge between the two faces will be sharp. A smooth Group of 0 is flat shading for all faces. There are 254 possible smooth groups. A smooth group of 255 means that the material is smooth with all other material smooth groups whatever they are.
- No shading: If this radio button is on, the meshes with this material will be drawn with the ambient colour (no shading).
- Double Sided: By default, the faces of a mesh are drawn only when viewed from one side (when viewed from the other side, nothing is drawn). When this radio button is on, the faces with the material will drawn everytime, whatever the viewer position.
- Add POV Cmd/ Add RIB Cmd: It is possible to include POV/RIB command into a material. When rendered with POV or a renderman compliant renderer, the command added here will included into the material definition.
There is one unexplained button in the materila definition:.
This button is used to asign a procedural texture to the diffuse color of the material. A procedural texture is a texture that is computed with some algorithm (a ppscript in the ppModeler case). many procedural texture are already defined, and more will come. When a procedural texture is defined for a material, the button in front of the diffuse color change and a preview of the procedural texture is dissplayed in the diffuse button:.
The procedural texture can be removed by pressing the color button of the diffuse property. Have a look to the chapter "Procedural Texture" for deeper explanation about procedural textures. When a procedural texture is asigned to a material, or when the properties of the proceduarl texture are changed, the procedural texture need to be recomputed, and this can be time consuming.