PDA

View Full Version : single-pass bumpmapping



JohnnyGLman
08-01-2002, 01:01 PM
Is it physically possible to perform either emboss bumpmapping or dot3 bumpmapping with only two texture units in a single pass? I've been messing with combiners, but eventually I just end up needing a third texture unit.

Nutty
08-01-2002, 01:26 PM
Sure it is.

Provided you dont need to modulate with a basemap.

or

You model is tesselated enough to not need a normalization cubemap.

Good high powered specular is hard to come by. By 2 texture units I assume you mean Gf1+2, which only gives you 2 general combiner stages.

It's definitly possible. Just depends how good you want it.

Nutty

davepermen
08-01-2002, 01:46 PM
yes it is. including selfshadowing and approximated specular function with gloss and variable exponent (i said APPROXIMATED http://www.opengl.org/discussion_boards/ubb/smile.gif) of about ^32, including basemap.

and, if you want only half the brightness, even with full perpixelnormalizations of normals and to_light vectors.. http://www.opengl.org/discussion_boards/ubb/smile.gif

but your geometry has to be VERY HIGH tesselated http://www.opengl.org/discussion_boards/ubb/smile.gif

should get this up online again.. nutty can you host it?

Nutty
08-01-2002, 11:11 PM
POwer of 32? In 1 pass, with only 2 combiners?

Sure I'll host it, just mail it to me.

pocketmoon
08-01-2002, 11:55 PM
Originally posted by Nutty:
POwer of 32? In 1 pass, with only 2 combiners?

Sure I'll host it, just mail it to me.

check out the latest article over at gamasutra.

I often find Excel a useful tool for finding polynomials which approximate another more complex function.

PH
08-02-2002, 12:20 AM
I haven't seen that Gamasutra article ( reading it right now ). The author is saying that the 1D dependent texture lookup method won't allow a vector to be renormalized before the lookup. That's incorrect, it's very much possible with pixel shaders 1.4 ( at least it is in OpenGL via ATI_fragment_shader ).

ScottManDeath
08-02-2002, 01:22 AM
Originally posted by pocketmoon:

I often find Excel a useful tool for finding polynomials which approximate another more complex function.




Hi

you can also use newtons approximation for interpolation a function with some known (x,y) pairs. You then get a polynom of (depending how many (x,y)-pairs) you use.

Bye
ScottManDeath

pocketmoon
08-02-2002, 01:43 AM
Originally posted by ScottManDeath:

Hi

you can also use newtons approximation for interpolation a function with some known (x,y) pairs. You then get a polynom of (depending how many (x,y)-pairs) you use.

Bye
ScottManDeath

I'm too lazy!

I just bung the function into a column in Excel covering the range I want, graph it, add a trend line and see what Excell comes up with http://www.opengl.org/discussion_boards/ubb/smile.gif

I have no idea what method is being used behind the scenes!

Nutty
08-02-2002, 02:58 AM
Using a dependant texture lookup for the specular power aint gonna work on gf1+2. Considering his question specifically asked for 2 texture units only, I assume he's targetting below gf3. Gf3 only supports pixel shader 1.1 anyway, it's gf4 that does 1.3 IIRC.

And that would still use 3 textures, basemap, normal-map, and specular lookup. Even without renormalizing the surface->light vector.

Nutty

PH
08-02-2002, 03:47 AM
I was just commenting on the article ( if you were refering to my post ).

To answer the original poster ( assuming he _even_ wants specular ), I would suggest using Mark Kilgards steep specular ramp function ( look for a paper on NVIDIAs site - an old paper from 1999-2000 - cant't remember the name ).
It's simple, efficient, looks better than successive squaring and works on 2 texture hardware. This is probably what Dave is talking about.

Also, have a look at NVIDIAs paper called "practical perpixel effects on 2-texture hardware" ( something like that ). It contains additional bits of very useful infomation.