[Bf-committers] Cmir texture modulation

Alfredo de Greef bf-committers@blender.org
Wed, 3 Sep 2003 13:52:44 -0700 (PDT)


This is the first time I ask a question here, and I'm
not sure this is the right place to ask such a
question either, if so, just tell me to go
elsewhere...

Anyway, the problem is cmir texture modulation. As you
may or may not know I'm working on yafray integration
in Blender, this also meant implementing Blender's
texture mixing in yafray. No problems sofar,
everything works the same as in Blender except for
cmir, which seems to have a life on it's own in
Blender. Specifically, a material with two texture
channels both set to cmir modulation, when the mixing
mode for both is 'mix', no problems, works fine.
However, when the second texture is set to 'mul', no
texturing is done at all. This seems not really
unsual, until I took a closer look at the first render
material (R.matren in do_material_tex(), texture.c),
before any modulation is done, this has the mirror
color set to black regardless of the material mirror
color setting. Maybe not unusual still, but when the
second texture is set to 'add' or 'sub' mode, it
suddenly has color values much greater than one
(5000-30000 in the tests I tried). Trying to track
this down in the Blender sourcecode I can't find seem
to find anything causing this, the rendermaterial
seems to be a copy of the object material, but for
some reason with cmir and using different blendmodes,
the mirror color contains values which seem to come
out of nowhere.
Anyone know the cause of this? Or is it me missing
something? I also tested this with other blender
versions, all had the same problem (of course I could
only check this visually), so it is not because of me
having changed anything in the Blender code.
Again, I don't know if this is the right place to ask
and I tried a long time to find the answer myself
before asking here, but I can't find the solution.

Alfredo


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com