[Bf-committers] Cmir texture modulation

Ton Roosendaal bf-committers@blender.org
Thu, 4 Sep 2003 13:22:39 +0200


Hi Alfredo,

I guess you just discovered a bug... I will make a note to add this in  
the tracker, when it's up again.

We also abuse the cmir channel for environment mapping. Although an  
envmap can be used as a regular texture, when you assign it to the  
'mirror' color, an exception starts working, making mirror color  
overriding (and blending with) the result of traditional shading. I  
should review if this is nicely working for all options the texture  
channels allow in Blender...

Further, you might have noticed this system is pretty primitive, based  
at a simple early 90ies design. Something like wavk's shader editor is  
not possible with that system, also the first inclusions of 'shaders'  
in Blender clearly show the limits of the current core rendering loop.

It is uncertain yet how much work will be done during the next year for  
this. When sufficient coding energy goes to it, we could schedule an  
overhaul of the renderer for 2.5. But maybe it's just too much work,  
then we better work straight at something to call '3.0', and put our  
energy in making support for external renderers like Yafray working  
smoothly.

-Ton-


On Wednesday, Sep 3, 2003, at 22:52 Europe/Amsterdam, Alfredo de Greef  
wrote:

> 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
> _______________________________________________
> Bf-committers mailing list
> Bf-committers@blender.org
> http://www.blender.org/mailman/listinfo/bf-committers
>
>
------------------------------------------------------------------------ 
--
Ton Roosendaal  Blender Foundation ton@blender.org  
http://www.blender.org