Post new topic Reply to topic  [ 1 post ] 
The arguments for the mode functions in MultiTexture 
Author Message

Joined: Wed Jun 28, 2006 8:01 am
Posts: 10
Post The arguments for the mode functions in MultiTexture
Hi,

I'm trying to understand the whole MultiTexturing stuff at the moment. I'm quite impressed about what can be done using this x3d-only node. Nevertheless I'm a bit confused when I try to understand the different blending modes. As I'm no 3D expert I'm learning the concepts while learning to use the x3d-specification.
I think the single textures are processed in different stages of the calculation. in each stage we have the cumulated result from all the previous stages and the current texture, which should be processed. The texel value named Arg1 in the spec is taken from my current texture, Arg2 is chosen by evaluating the source field of my multitexture node. By default it's always the value taken from the calculations done so far. But I can also say, I want the diffuse or the specular color from the material field, or, alternatively, the values written down in the color & alpha fields of the MultiTexture node.

So far I hope I understood the whole thing. The fact, that nearly every single browser renders my samples differently confuses me a little bit, but I think, thats the usual browser compatibility topic. But what confuses me the most is, that the specification says, that replace mode returns the value Arg2, which is the source value. But for me "replace" would be to take the value from the currently processed texture rather than from the previous texture. So following the spec, the replace mode would be the same as selectarg2. Now I'm unsure, if I have a false imagination of how replace should work, or if the specification is wrong here, and it should say "Arg1", or, third option, I mixed Arg1 and Arg2, and Arg2 is the current texture. There are indicators for each of those possibilities.

In the example for the second blending mode for the alpha channel, the spec says:

Quote:
The mode value "MODULATE,REPLACE" specifies Color = (Arg1.color × Arg2.color, Arg1.alpha).


So here replace uses the alpha value of Arg1, not Arg2. On the other hand, BS Contact does the same things when using SELECTARG2 and REPLACE. Octaga therefore doesn't. It gives the same result, when I use SELECTARG1 and REPLACE. On the other hand, Octaga does it's own stuff in another point, it takes the current texture as Arg2 and the already computed part as Arg1. That would match the definition of REPLACE in the spec, and my understanding of a replace function, but not the spec definition of Arg1 and Arg2.

To cut a long story short: I'm confused about Arg1 and Arg2 and the definition of REPLACE mode in the spec. Any help would be greatly appreciated as I don't want to write something wrong in my thesis. Despite of that I'm thinking about all this MultiTexture stuff a few days already and found no answer.

TIA,

Oli


Tue Dec 19, 2006 10:02 am
Profile ICQ
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: