[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:
DOT3 texture combined with primary color 2. Modulate with base texture
Add a scaled DOT3 texture combined with primary color for glossy effect
[This message has been edited by WhatEver (edited 06-09-2002).]
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.
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.
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.
ahh I thought you were using Register Combiners. Maybe you want to use seperate specular color extension, and setup material surface as shiny. Dunno how this all fits together with bump-mapping though.
Checkout the Dot3 demo in my previously unreleased section on my website. There might be something in there. I fiddled with a load of TexEnv stuff, to give it a kind of glossy finish.
You can always calculate the lighting yourself. Do all your lighting calculations and the resulting rgb value you can just pass to opengl (with lighting disabled). Then you can do the specular to an arbitrary power. I am not sure what opengl does for specular lighting (the equation I mean). I really never use opengl lighting I just always did my own lighting, either in C with my own math or in register combiners.
I don’t know what it’s called, but I do do the lighting using the primary color channel. In order for my DOT3 bumpmapping to work, I have to use some algorithm, that without the DOT3 bumpmap, would make my surface look like a rainbow.
I really need to learn register combiners badly. It seems a lot of you use them for certain effects…first I need to understand the TexEnv stuff though.
> Specular = DOT3 Bumpmap of sand
> Diffuse = DOT3 Bumpmap of sand
> BaseTexture = sandy texture
Note that DOT3 bumpmap for Specular is different from DOT3 bumpmap for Diffuse. The DOT3 for diffuse is between the normal and the light. The DOT3 for specular is between the viewing vector reflected through the normal’s surface and the light (which can get simplified to DOT3 between normal and half angle between viewer and light with a simple transformation).
Diffuse is when a surface doesn’t reflect any light, instead it sort of absorbs light.
Specular is when the surface reflects the light…and that’s what Phong is.
I guess I didn’t understand the terms. All I’m trying to do is get areas on my bump mapped surface to turn white when the refected surface is looking right at the light.
I’m doing the Phong color setup but it only makes a texture draw at its fullest intensity and fullbright instead of white.
I actually don’t even understand what those TexEnv commands are even doing, except combining the primary color with the DOT3 bump map and resulting with a grey texture. For some reason if you use the next texture unit it’s blended with the grey bumpmap…but why? If I use a third texture unit it replaces the second texture unit…I want the third texture unit to be added to the first two so I can get my glossy surface…I’m possitive it would work too.
[This message has been edited by WhatEver (edited 06-11-2002).]
I just looked it up at both dictionary.com and in my OpenGL book. Specular and diffuse is what I thought they were, I just didn’t quite know how to explain it in my post.
Let me give it another try .
Diffuse causes a surface to be it’s fullest intensity when the light position is perpendicular to the surface.
Specular causes a surface to reach its fullest intensity when the half vector generated from the eye pos and light pos is perpendicular to the surface.
According to this site I just found; what we’re actually doing in OpenGL is Gouraud lighting, because we’re dealing with light on a per vertex basis. It says phong is the light being calculated on a per pixel basis.