Hi Melchior,
> > Of course, Melchior, I wasn't complaining :-) Did I?
>
> It was the "Or is that a bug too?" that made me explode. It's not like
> the "material" animation is a bug ridden piece of code. Yes, there was
> a bug, but if the animation doesn't work like you expect it to, it's
> still *far* more likely caused by user error, than a bug. :-}
Oh no, please Melchior, it was not my intention. It was just a simple
question. I am really new to this stuff.
> > I was looking for some suggestions because I find the only documentation
> > available for non programmers (which is the model-howto.html) a little
> > bit confusing regarding factor, offset and -prop stuff.
>
> Factor and offset work the same in all animations that offer it.
> They are applied to a <value> or <property> like so:
>
> (value * factor) + offset [redundant parens added for educational
> purposes ;-]
>
> And <*-prop> does always mean that the contents are supposed to be a
> property path. This is also used elsewhere, and not a "material" feature.
Ok. Let's try it again.
Please spend a short moment in verifying what I undertsand out of the
model-howto.html.
model-howto.html gives this example:
<animation>
<type>material</type>
<object-name>panel</object-name>
<emission>
<red>1.0</red>
<green>0.2</green>
<blue>0.0</blue>
<factor-prop>/controls/lighting/instruments-norm</factor-prop>
</emission>
</animation>
The <factor-prop>/controls/lighting/instruments-norm</factor-prop> tag means
that the value of the property /controls/lighting/instruments-norm is used
as a factor, right?
I assume (I really don't know what the instruments-norm property refers to)
instruments-norm ranges between 0 and 1.
The tags <red>1.0</red>, <green>0.2</green> and <blue>0.0</blue> are the
values used in the above computation. Right?
This example does not make use of any offset so the computation will be
simply: value * factor
The result of this computation will be used as a vector whose values are
assigned to the emissive property of the material of the object named
"panel". Right?
If instruments-norm has intermediate values between 0 and 1, so will the
vector's components of the material's emissive property, and we will have
intermediate levels of reddish (with very little green too) color assigned
to the material's emissivity, right?
Am I saying something correct here or am I totally away from reality?
> I agree that the documentation could use some improvements, but I
> wouldn't say that the examples for the material animation are
> unclear with respect to the difference between <red> and <red-prop>:
>
> <red>1.0</red>
> ...
> <red-prop>diffuse/red</red-prop>
Well, e.g. the statement "The offset is applied before the factor" made me
think the computation would be as : (offset + value) * factor
I am already used to read "a + b * c" as "a + (b * c)" but that statement
was very misleading. So every attempt at getting an offset starting point to
the emissivity variation of an object gave me odd results.
Waiting for comments,
Roberto
--
DSL-Aktion wegen großer Nachfrage bis 28.2.2006 verlängert:
GMX DSL-Flatrate 1 Jahr kostenlos* http://www.gmx.net/de/go/dsl
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel