Hi Artur,

nice theory, problem is that bumpmapping uses up all inputs by itself. You
forget that we want to incorporate lighting, too.

A bumpmapping stage takes the normal map as a texture input for the first
register and the blend color (or the object color, maybe, didnt try this,
thanks for the hint), interpreted as an artificial lighting vector, as input
for the second register, the third register being empty/unused. So, there is
no way to get anything "into" a bumpmapping stage, neither object color, nor
texture, nor lighting. Consequentially, bumpmapping has to be the very first
stage in single-pass rendering.

Now that you have the bump-map, how to get light + texture into the picture
using a single stage (most standard cards feature just 2 hardware stages)?
This is what I have been thinking about. Normally, you start with the first
stage having OBJECT_COLOR in register #1 and the texture in #2, giving a
shaded textured model. Then, you can apply effects (shadow maps etc). using
the second stage. Problem is, with the bumpmapping stage having no input (so
no PREVIOUS_TEXTURE_STATE_STAGE), this is not possible, you need an
operation which mixes two inputs. And thats what I've proposed.

Hope I've cleared my input up some,

Wolfgang

-----Ursprungliche Nachricht-----
Von: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]]Im Auftrag von Artur Biesiadowski
Gesendet: Donnerstag, 30. Mai 2002 15:03
An: [EMAIL PROTECTED]
Betreff: Re: [JAVA3D] Loaders for Java3d: Cautioning, and: A bunch of
questions.


Wolfgang Kienreich wrote:

> It nearly works now:
> bumpmapping goes into the first stage, then the second stage uses
> interpolation to add (texture * objectcolor)+ (bumpmap*(1-objectcolor))
with
> the bumpmap being inverted first by usign ONE_MINUS_SRC_COLOR.

Why do you do this in such way ? I have just read a bit about dot
bumpmap, and for me it seems that you should use just
stage0 = bumpmap dot object_color
stage1 = stage0 * texture
and put direction to light in color data of each vertex.

Artur

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to