Before making a feature request in the bugtracker I would like your input dear users about easier scalar texturing in YafaRay. As it is now, when you use a texture in an scalar material feature, many if not most users don't know that the base value the scalar texture works on should be throttled back to 0 so the scale actually works within the min. and max. range set by base value and "Default value" setting respectively. I would like to know how many users are actually aware of this, how a case like this is handled in other render engines, and how it could be improved to make it easier (less steps f.e.) and more intuitive. Example below.

Also, the way the exporter now works, settings at the bottom of the "YafaRay map to" panel (blend type, negative, stencil, No RGB, Default color) can only work for only one material feature, despite the fact that users could enable more than one feature to map with the same texture channel. This is also an issue of the current system.

We would like your input for better and more standarised ways to handle these questions.

When a scalar texture is used in YafaRay, base value of mapped feature is used to map two values in the XML scene. Imagine I am using a scalar texture for mapping "Glossy amount" and base specular reflection strength is 0.165

When I export said scene in XML file, that value appears two times <glossy_reflect fval="0.165"/> #as expected but also<upper_value fval="0.165"/>

The upper_value fval tag is not documented, do you know what this feature does?

Definitely if Glossy Amount is set to 1 and Blend is set to mix, scalar texture should replace the base value entirely, so the mix is the blend factor between glossy amount and reflection strength, not a multiplier.

If I understand correctly your example.

Also, to be coherent, Reflection strength should be renamed to glossy amount or vice versa.

Yes that should be the default behaviour. Mix mode in fact does an "alpha over" operation on the background texture channel or base value, and that should be also the case for scalar textures. However, I believe that in this case we are supporting a legacy feature but it is badly implemented.

If I remember well, in YafaRay exporter previous to Blender 2.50 and in YafRay, there were in fact two settings called Var and DVar that controlled minimum and maximun range of the scalar texturing, respectively. For instance, if Var=0.20 and DVar=0.80 that would meand minimun and maximun ranges for black and white values in scalar textures, respectively. This workflow was copied from Blender Internal like so many texture related features.

Somewhere along the way Blender Internal dropped Var setting but kept DVar, while YafaRay exporter post Blender 2.50 adopted this strange workflow of doing scalar texturing, in which base value is used to set minimun range for black in scalar textures. That's why I am asking what upper_value fval actually does in XML scenes as I suspect I may have something to do with the problem exposed here.

I would like that we have a clear view about the situation so we propose a rock solid consistent workflow from now on for scalar texturing.