Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

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

Thread: (Modulate Bump & Base) + Bump = Specular?

  1. #1
    Advanced Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    California
    Posts
    550

    (Modulate Bump & Base) + Bump = Specular?

    [edited]Wrong terms used, I meant gloss not specular[/edited]

    Is "Modulate Bump & Base) + Bump = Gloss" the right formula for a glossy finish? It seems like that's what it would be anyway, but that would require 3 texture units. Is there any way to accomplish a glossy finish with only 2 texture units? I'm using the primary color to combine with the DOT3 bumpmap texture and then modulating the result with the base color texture...but it's only diffused ...I want wet looking things .

    Also, is there a way to modulate by a certain intensity...just so that the gloss texture can be multiplied by a scale and then added to the buffer?

    Final clarafication:

    1. DOT3 texture combined with primary color 2. Modulate with base texture
    3. Add a scaled DOT3 texture combined with primary color for glossy effect

    [This message has been edited by WhatEver (edited 06-09-2002).]

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Aug 2000
    Location
    Portsmouth, Hampshire, England
    Posts
    1,063

    Re: (Modulate Bump & Base) + Bump = Specular?

    I dont think that sounds quite correct.

    Read this, it's an excellent description of phong specular.
    http://www.whisqu.se/per/docs/graphics10.htm

    Nutty

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    California
    Posts
    550

    Re: (Modulate Bump & Base) + Bump = Specular?

    I'm using phong in my equasion to calculate the light reflecting off of the surface...oh my, I see why I was misunderstood, I meant to say that I want a glossy finish...the phong method I'm using is working perfectly already, I just want areas that are reflecting the light to be white instead of the textures full intensity.

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Aug 2000
    Location
    Portsmouth, Hampshire, England
    Posts
    1,063

    Re: (Modulate Bump & Base) + Bump = Specular?

    Full intensity specular, does not limit at the textures src value.

    Specular is addative, so it whites-out at full intensity.

    Simply put, specular is added on after the texturing, not before.

    Simple equation.
    RGB = (diffuse * base_texture) + specular.

    Old style specular in OpenGL, used to add it on before texturing, which was incorrect, which is why the seperate specular color extension was developed.

    It sounds like you're the total lighting term of diffuse + specular, then modulating buy base map. Instead of diffuse modulate base, then add specular.

    Nutty

  5. #5
    Advanced Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    California
    Posts
    550

    Re: (Modulate Bump & Base) + Bump = Specular?

    Just to see if I understand what you're saying, I could do this then:

    Specular = DOT3 Bumpmap of sand
    Diffuse = DOT3 Bumpmap of sand
    BaseTexture = sandy texture

    RGB = (Diffuse * BaseTexture) + Specular;

    Just seeing your equasion has helped me understand what diffuse really is: scales the base textures rgb values.

    [This message has been edited by WhatEver (edited 06-09-2002).]

  6. #6
    Senior Member OpenGL Pro
    Join Date
    Aug 2000
    Location
    Portsmouth, Hampshire, England
    Posts
    1,063

    Re: (Modulate Bump & Base) + Bump = Specular?

    You could do that, but ideally you want to power the specular value, to sharpen the fallof of the dot product value. The more shiny the surface, the more powering it requires.

    Nutty

  7. #7
    Advanced Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    California
    Posts
    550

    Re: (Modulate Bump & Base) + Bump = Specular?

    How do I power the specular lighting?

  8. #8
    Senior Member OpenGL Pro
    Join Date
    Aug 2000
    Location
    Portsmouth, Hampshire, England
    Posts
    1,063

    Re: (Modulate Bump & Base) + Bump = Specular?

    Multiply it by itself lots of times.

  9. #9
    Advanced Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    California
    Posts
    550

    Re: (Modulate Bump & Base) + Bump = Specular?



    How do you do that with OpenGL though? I'm not using vertex programs, I'm only using TexEnv.

  10. #10
    Advanced Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    California
    Posts
    550

    Re: (Modulate Bump & Base) + Bump = Specular?

    That emoticon bothers me. I always think that it should be a surprised look not a "oh, well, I'm bored of your comment" look.

    It's suppose to be a surprised look .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •