View topic - Input needed for better scalar texturing

Input needed for better scalar texturing

Post here questions about using YafaRay materials, texturing and procedural models.

Input needed for better scalar texturing

Post Wed Jan 27, 2016 11:33 am

Hi

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.

Image

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.
Attachments
mapping glossy strenght.zip
(521.9 KiB) Downloaded 207 times
User avatar
Samo
 
Posts: 3092
Joined: Tue Dec 20, 2005 10:39 am
Location: Spain

Re: Input needed for better scalar texturing

Post Mon Mar 28, 2016 5:35 pm

Hi David

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?
User avatar
Samo
 
Posts: 3092
Joined: Tue Dec 20, 2005 10:39 am
Location: Spain

Re: Input needed for better scalar texturing

Post Tue Mar 29, 2016 8:03 am

Hi,

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.

Regards
surena
 
Posts: 109
Joined: Sat Apr 26, 2014 6:37 am
Location: Spain

Re: Input needed for better scalar texturing

Post Wed Mar 30, 2016 8:53 am

Hi

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.
User avatar
Samo
 
Posts: 3092
Joined: Tue Dec 20, 2005 10:39 am
Location: Spain

Re: Input needed for better scalar texturing

Post Wed Mar 30, 2016 5:16 pm

Hello,

I will take a look at this.
User avatar
David Bluecame
 
Posts: 460
Joined: Mon Jan 21, 2013 12:42 pm
Location: Spain


Return to Materials and Texturing



Who is online

Users browsing this forum: No registered users and 3 guests

cron