[ Prev | Index | Next ]
Japanese English

Material Settings for 3D Objects

This section explains how to configure material properties for 3D objects. Here, "material" does not refer to surface patterns or textures, but rather to characteristics related to how the object reflects light.

Sponsored Link


Material Parameters

Material and Light Reflection

In the real world, the appearance of an object varies depending on its material. For example, a flat board will look "dry" if it's made of paper, but will look "shiny" if it's made of plastic. There are several reasons for these differences, but arguably the most significant factor is how the object reflects light.

Types of Light Reflection

Light reflection can be broken down into several components.

Take a plastic board, for instance. The surface appears uniformly lit because light hits the plastic and diffusely reflects in many directions, some of which reach our eyes. Meanwhile, the sharp, bright spots (highlights) are caused by specular reflection -- light rays bouncing directly off the surface. As for the areas in shadow, they are often faintly illuminated by scattered light that has bounced through the surrounding air and reached the back side of the object.

3DCG expresses different materials by adjusting the balance of these types of reflections. These adjustable balances are called material parameters.

Let's go through each of the major material parameters.

Diffuse Reflection Parameter

The diffuse reflection parameter controls how much incoming light is diffusely reflected in various directions -- like how light scatters off a sheet of paper.

This parameter significantly affects the perceived "dryness" or "matteness" of a surface. If you want to render materials like cloth or paper, increase this value. For metal-like surfaces, keep it lower.

Diffuse reflection only
Diffuse reflection only
With only diffuse reflection, surfaces facing the light appear bright, while those facing away remain completely dark.

Applying to Models

To set the diffuse reflection parameter for a model, use the setModelDiffuse(...) function:

- Function Format -

void setModelDiffuse ( int modelID, float strength )

Arguments:

  • modelID: The ID of the model to modify.
  • strength: The intensity of diffuse reflection (range: 0.0 to 1.0).

Applying to Polygons

To set the diffuse reflection parameter for a polygon, use the setPolygonDiffuse(...) function:

- Function Format -

void setPolygonDiffuse ( int polygonID, float ref )

Arguments:

  • polygonID: The ID of the polygon to modify.
  • strength: The intensity of diffuse reflection (range: 0.0 to 1.0).

Diffractive Reflection Parameter

The diffractive reflection parameter controls how much light is scattered in the air around the object and curves around to illuminate the back side. Without this effect, the back sides of objects appear pitch-black, like celestial bodies in space.

This parameter behaves similarly to the ambient reflection parameter discussed later, but differs in that diffractive reflection creates a gradient depending on the angle of the light source.

Applying to Models

To set the diffractive reflection parameter for a model, use the setModelDiffractive function:

- Function Format -

void setModelDiffractive ( int modelID, float ref )

Arguments:

  • modedID: The ID of the model to modify.
  • strength: The intensity of diffractive reflection (range: 0.0 to 1.0).

Applying to Polygons

To set the diffractive reflection parameter for a polygon, use the setPolygonDiffractive(...) function:

- Function Format -

void setPolygonDiffractive ( int polygonID, float ref )

Arguments:

  • polygonID: The ID of the polygon to modify.
  • strength: The intensity of diffractive reflection (range: 0.0 to 1.0).

Ambient Reflection Parameter

The ambient reflection parameter adjusts the effect of ambient light -- that is, light coming uniformly from the surrounding environment. In reality, light doesn't always travel in straight lines directly from a light source. Some of it reflects off walls or other surfaces and then indirectly illuminates the object. This surrounding light is called ambient light.

This parameter is used similarly to the diffractive reflection parameter. However, ambient reflection differs in that it has no directional dependency, resulting in a uniform illumination across the entire object.

Ambient reflection only
Ambient reflection only
With only ambient reflection, the entire object is evenly lit regardless of surface orientation.

Applying to a Model

To apply the ambient reflection parameter to a model, use the setModelAmbient(...) function:

- Function Format -

void setModelAmbient ( int modelID, float ref )

Arguments:

  • modedID: Specifies the ID of the model to configure.
  • strength: Specifies the ambient reflection strength, in the range of 0.0 to 1.0.

Applying to a Polygon

To apply the ambient reflection parameter to a polygon, use the setPolygonAmbient(...) function:

- Function Format -

void setPolygonAmbient ( int polygonID, float ref )

Arguments:

  • polygonID: Specifies the ID of the polygon to configure.
  • strength: Specifies the ambient reflection strength, in the range of 0.0 to 1.0.

Specular Reflection Parameter

The specular reflection parameter controls how much incoming light reflects directly off the surface without scattering. This simulates mirror-like highlights often seen on smooth surfaces such as plastic.

By adjusting this parameter, you can control how shiny or glossy a surface appears.

When Only Specular Reflection is Maximized
When Only Specular Reflection is Maximized
With only specular reflection, only the points that satisfy the physical law of reflection (based on light direction, surface orientation, and viewpoint) are brightly lit.

Applying to a Model

To apply the specular reflection parameter to a model, use the setModelSpecular(...) function:

- Function Format -

void setModelSpecular ( int modelID, float ref, float angle )

Arguments:

  • modedID: Specifies the ID of the model to configure.
  • strength: Specifies the specular reflection strength, in the range of 0.0 to 1.0.
  • angle: Specifies the highlight spread angle in radians, typically between 0.0 and 1.5.

Applying to a Polygon

To apply the specular reflection parameter to a polygon, use the setPolygonSpecular(...) function:

- Function Format -

void setPolygonSpecular ( int polygonID, float ref, float angle )

Arguments:

  • polygonID: Specifies the ID of the polygon to configure.
  • strength: Specifies the specular reflection strength, in the range of 0.0 to 1.0.
  • angle: Specifies the highlight spread angle in radians, typically between 0.0 and 1.5.

Emissive Parameter

The emissive parameter controls how strongly an object appears to emit light uniformly from its surface. Its visual effect is similar to ambient reflection, but it remains completely unaffected by the brightness of any light sources.

Applying to a Model

To apply the emissive parameter to a model, use the setModelEmissive(...) function:

- Function Format -

void setModelEmissive ( int modelID, float ref )

Arguments:

  • modelID: Specifies the ID of the model to configure.
  • strength: Specifies the emissive strength, in the range of 0.0 to 1.0.

Applying to a Polygon

To apply the emissive parameter to a polygon, use the setPolygonEmissive(...) function:

- Function Format -

void setPolygonEmissive ( int polygonID, float ref )

Arguments:

  • polygonID: Specifies the ID of the polygon to configure.
  • strength: Specifies the emissive strength, in the range of 0.0 to 1.0.


Sponsored Link



Japanese English
Index
[ Prev | Index | Next ]
News From RINEARN
* VCSSL is developed by RINEARN.

English Documentation for Our Software and VCSSL Is Now Nearly Complete
2025-06-30 - We're happy to announce that the large-scale expansion of our English documentation with the support of AI — a project that began two years ago — has now reached its initial target milestone.

VCSSL 3.4.52 Released: Enhanced Integration with External Programs and More
2025-05-25 - This update introduces enhancements to the external program integration features (e.g., for running C-language executables). Several other improvements and fixes are also included. Details inside.

Released: Latest Version of VCSSL with Fixes for Behavioral Changes on Java 24
2025-04-22 - VCSSL 3.4.50 released with a fix for a subtle behavioral change in absolute path resolution on network drives, introduced in Java 24. Details inside.

Released the Latest Versions of RINEARN Graph and VCSSL - Now Supporting Customizable Tick Positions and Labels!
2024-11-24 - Starting with this update, a new "MANUAL" tick mode is now supported, allowing users to freely specify the positions and labels of ticks on the graph. We'll explain the details and how to use it.

Released Exevalator 2.2: Now Compatible with TypeScript and Usable in Web Browsers
2024-10-22 - The open-source expression evaluation library, Exevalator, has been updated to version 2.2. It now supports TypeScript and can be used for evaluating expressions directly in web browsers. Explains the details.

Behind the Scenes of Creating an Assistant AI (Part 1: Fundamental Knowledge)
2024-10-07 - The first part of a series on how to create an Assistant AI. In this article, we introduce the essential knowledge you need to grasp before building an Assistant AI. What exactly is an LLM-based AI? What is RAG? And more.

Launching an Assistant AI to Support Software Usage!
2024-09-20 - We've launched an Assistant AI that answers questions about how to use RINEARN software and helps with certain tasks. Anyone with a ChatGPT account can use it for free. We'll explain how to use it.

Software Updates: Command Expansion in RINEARN Graph, and English Support in VCSSL
2024-02-05 - We updated our apps. This updates include "Enhancing the Command-Line Features of RINEARN Graph" and "Adding English Support to VCSSL." Dives into each of them!