Jump to content
  • Advertisement
Sign in to follow this  
Structural

What is a material?

This topic is 5471 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Materials describe how polygons reflect light or appear to emit light in a 3-D scene. Essentially, a material is a set of properties that tell Microsoft® Direct3D® (or any API) the following things about the polygons it is rendering.
  • How they reflect ambient and diffuse light
  • What their specular highlights look like
  • Whether the polygons appear to emit light

Share this post


Link to post
Share on other sites
A material often includes more information than that today. A material often includes the textures to use, and in some games, it may also include advanced information about the surfaces it is applied to, such as the "roughness" of the surface (to determine how much friction it has), and the refractive index. A material is basically something that defines the properties of a perticular substance. You might have a material for glass, concrete, wood, etc.

Share this post


Link to post
Share on other sites
Quote:
Original post by Mushu
Materials describe how polygons reflect light or appear to emit light in a 3-D scene. Essentially, a material is a set of properties that tell Microsoft® Direct3D® (or any API) the following things about the polygons it is rendering.
  • How they reflect ambient and diffuse light
  • What their specular highlights look like
  • Whether the polygons appear to emit light

Is a material in a game engine then only for display purposes?
Because when I think of a "material" in the real world I also think of physical attributes, like strength, friction, bouncyness etc etc.

Edit: Nemesis2k answered that question

Share this post


Link to post
Share on other sites
Quote:
Original post by LilBudyWizer
Appearance is a physical attribute.

heh heh... WINNER!!
So in essence a material contains all properties of a material in the real world... that also means mass, no?
So, what about also putting mass per cubic metre in a material, and then only put the volume of an object in a PhysicsObject. Or am I taking things too far now?

Share this post


Link to post
Share on other sites
The DX9 SDK defines


typedef struct _D3DMATERIAL9 {
D3DCOLORVALUE Diffuse;
D3DCOLORVALUE Ambient;
D3DCOLORVALUE Specular;
D3DCOLORVALUE Emissive;
float Power;
} D3DMATERIAL9;


Materials used to hold texture information and can still be implemented to do so, but now one texture is not enough. In terms of rendering, a material only holds the visible physical properties

Share this post


Link to post
Share on other sites
I believe what Nemesis2k2 is refering to is nowadays more commonly known as a material shader? I believe quake3 started calling it that anyways.

-Xim

Edit: Halo calls them shaders as well but they have subclassed the material shaders into types like environment and transparent and glass etc etc...

Share this post


Link to post
Share on other sites
Quote:
Appearance is a physical attribute.

Not really. Appearance is a very abstract term, which is the final result produced by a whole bunch of attributes. At any rate, even if theoretically you could classify it as an attribute, it's not as far as we're concerned. A texture, bump map, or specular properties would be attributes. Appearance is the final result you get once you apply all of these kind of properties.

Quote:
So in essence a material contains all properties of a material in the real world... that also means mass, no?
So, what about also putting mass per cubic metre in a material, and then only put the volume of an object in a PhysicsObject. Or am I taking things too far now?

Mass would be done on a per object basis, not on a per material basis.

Quote:
The DX9 SDK defines


typedef struct _D3DMATERIAL9 {
D3DCOLORVALUE Diffuse;
D3DCOLORVALUE Ambient;
D3DCOLORVALUE Specular;
D3DCOLORVALUE Emissive;
float Power;
} D3DMATERIAL9;


Materials used to hold texture information and can still be implemented to do so, but now one texture is not enough. In terms of rendering, a material only holds the visible physical properties

Of course the DX SDK only defines a material as that. DX covers graphics, not physics.

Quote:
I believe what Nemesis2k2 is refering to is nowadays more commonly known as a material shader? I believe quake3 started calling it that anyways.

You'll find a lot of people have slightly different terminology for the same thing, and what makes up a "material" depends on the context in which it is used. Generally speaking however, from what I have observed, a material is usually defined as I described it, and that's how I myself would define it.

Share this post


Link to post
Share on other sites
Quote:
So, what about also putting mass per cubic metre in a material, and then only put the volume of an object in a PhysicsObject. Or am I taking things too far now?

this could be done, but you can't just rely on an uniform density for a "material", objects can be made of multiple materials, and in games, a material usually describes the surface properties of an object.

people above mentioned physics/graphics properties you can add into materials (by physics and graphics, I mean, in a game engine point of view, in a "reality" point of view, everything would just be physics properties), but there also is the sound aspect (sound emitting material, how the material occludes sound, how it reflects it, interacts with it, deforms it as sound goes through it, etc...)

you can also find in the physics part of a material describtion, what simulation the physics engine should use (for cloth, softbodies, rigidbodies, fluids, whatever). and a bunch of per-material variables specific to each of these simulators...

if you look only on the graphics side, you may want to add much more to add to a material definition than what is in this D3D structure davidx9 posted. this structure only applies to a very limited range of lighting models. it doesn't account for things like microfacets, for subsurface scattering (that can actually depend on multiple sub-materials if you want to make things really accurate (ex: skin layers), but that's completely overkill for actual games), for anisotropic lighting, etc... (not even talking about translucent materials (SSS could be seen as a subset of those))

basically, the definition of material completely depends on your engine and what you plan to do with it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!