Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: color index with material properties

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2011
    Posts
    5

    color index with material properties

    i want the various index with ambient,diffuse,specular and shininess properties to light the materials with different colors
    for example
    GREEN
    ambient:0.0, 0.0, 0.0
    diffuse:0.1, 0.35, 0.1
    specular:0.45, 0.55, 0.45
    shininess:.25
    i want to know other color specification.from where i can get this.

  2. #2
    Senior Member Regular Contributor
    Join Date
    Oct 2010
    Location
    France
    Posts
    458

    Re: color index with material properties

    Don't use index color, it's old and useless now.

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2011
    Posts
    5

    Re: color index with material properties

    sir,i am not asking for the index.i am asking for the values of ambient,diffuse,specular and shininess values of different colors.

  4. #4
    Senior Member OpenGL Lord
    Join Date
    Mar 2015
    Posts
    6,671

    Re: color index with material properties

    i want to know other color specification.from where i can get this.
    That's not how it works. What you call "green" would still be "green" if you changed the diffuse value to be 0.1, 0.4, 0.1. Color names do not specify a specific wavelength of light; at best, they specify a range of actual wavelengths and colors. There is no one configuration that represents "green." There are configurations that would be seen as various shades of green, but none of them have any greater claim to that name than any others.

    The color of a surface depends on its reflective properties (as specified by the material parameters) and the lighting environment. It is entirely possible for a "green" surface to appear grey if you shine a "red" light on it.

  5. #5
    Junior Member Newbie
    Join Date
    Mar 2011
    Posts
    5

    Re: color index with material properties

    The color of a surface depends on its reflective properties
    can u plz tell me the property of surface which make it red,or ble or green or any other color ....i want that properties of material
    thanks

  6. #6
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: color index with material properties

    RED:
    diffuse:1.0, 0.0, 0.0
    BLUE:
    diffuse:0.0, 1.0, 0.0
    GREEN:
    diffuse:0.0, 0.0, 1.0
    etc...
    To find your exact color, you can use any 2D painting tools such as Gimp to play with settings until you find your color.

    For the other parameters, it depends on the type of material.
    Most material have white specular, only some metal paints are colored.

  7. #7
    Junior Member Newbie
    Join Date
    Mar 2011
    Posts
    5

    Re: color index with material properties

    thanks for ur reply

    but i m searching for material property in light ie. its diffuse,specular and ambient and shininess to make the material colorful

  8. #8
    Senior Member Regular Contributor
    Join Date
    Oct 2010
    Location
    France
    Posts
    458

    Re: color index with material properties

    Check for material color database, or use a modeler like 3DSMax.

  9. #9
    Senior Member Regular Contributor
    Join Date
    Jan 2011
    Location
    Paris, France
    Posts
    281

    Re: color index with material properties

    Hi,

    They are different colors that are used by OpenGL

    the ambient color (when the surface isn't lighted)

    the diffuse color (when the suface is lighted with a "big" angle)

    the specular color (when the normal and the vector defined by (light-position) have a little angle the surface is hightlighted)

    We can add

    the refracted color (when the normal is "negative", it's an index into a "translucent mocaic")

    It's seem that colors materials properties can be shared with different ambiants, diffuses, speculars and refractives colors in each entry

    They can be "unified" into a palette with the more 16 ambients colors first, diffuses materials after, speculars materials after and specials refractives colors at the end of the palette

    Ambient colors are the more near the "black material"
    (cf. index is near 0)

    Diffuse colors around "grey values"
    (cf. index is between say 16 and 12

    Speculars colors near "white values"
    (cf. hightlighed, when indice is > 128 but < 240 for example)

    The finals entries on the colormap store the refractives colors (colors 240..256) for handle refractive parts of this "mosaic picture"


    Each facet on the mosaic is identified with a specific fragment ID shared in a 256 LUT

    The palette store 256 differents (ambiant/diffuse/reflect/refract) colors/pixel shaders IDs, where each entry select a "specific/programmable" fragment shader ID to use.



    @+
    Yannoo

  10. #10
    Senior Member Regular Contributor
    Join Date
    Jan 2011
    Location
    Paris, France
    Posts
    281

    Re: color index with material properties

    Arts, why the material/color index method is useless ???

    Ok, it's effectively very old

    But not as useless as this ...
    (this can be used for simple toon shading too for example)

    And with a palette, we have the possibility to select the good "color/material" into a palette => this can to be an advantage for to select the four colors/materials to be interpolated into a futur extented DXT compression that handle directely the ambiant, diffuse and specular term (in this case each palette entry isn't only a RGBA color, but a "colored material properties" that have a RGBA ambiant term, a RGBA diffuse term and a RGBA specular term).

    Using only one indexed texture that can work with an ambiant/diffuse/specular palette (cf. a texture with width*height 8 bits index values + a palette of 256 entries with distincts ambiant/diffuse/specular RGBA terms) seem me very more economic is size (in fact something like 12x) that to use 3 width*height textures filled by 32 bits rgba8888 values ...

    This can certainly to be make with a fragment shader ?
    @+
    Yannoo

Page 1 of 3 123 LastLast

Similar Threads

  1. VBOs and material properties
    By gmseed in forum OpenGL: Advanced Coding
    Replies: 8
    Last Post: 12-02-2011, 11:12 AM
  2. Nurb surface - Material properties
    By Netra in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 03-04-2002, 10:38 AM
  3. Loading material properties - please help !
    By Morglum in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 09-06-2001, 12:07 AM
  4. Help - material properties
    By Ady in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 10-27-2000, 06:41 AM
  5. Help: Material Properties
    By sbw102 in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 05-20-2000, 03:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean