Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
Math behind Graph Bias adjustment

Math behind Graph Bias adjustment

2003-11-20       - By Kelly Brock

 Back
Reply:     1     2     3     4  

I can see two possibilities here, unfortunately the description is
relatively vague since it says "most" values will shift.  Anyway, the first
one is the easier one, remap the range of the curve to the range 0 to
1-bias.  This does not "sound" like the answer but you can check it
relatively simply I imagine.

The other, more useful version that I can think of is the bias/gain
functionality described by Ebert (think it was Ebert at least, may be
Musgrave, no references around here to double check it):

const float LOGP5     = -0.693147f;

const float Bias(const float value, const float bias)
{
 return powf( value, logf(bias)/LOGP5 );
}

const float Gain(const float value, const float gain)
{
 if( value < 0.5f )
   return Bias(2.0f*value, 1.0f-gain) / 2.0f;
 return 1.0f-Bias(2.0f-2.0f*value, 1.0f-gain) / 2.0f;
}

This is very similar to the other suggestion of using a gamma function, and
in fact may give identical results in certain ranges of inputs.  Graph the
equation for 0, .25, .5, .75 and 1 to get an idea of the shape.  It's a very
useful function in this sort of "tweaky" area, though you may need to remap
the bias range to match their definition.  Of course they may be using
something completely different, it's worth a try though..

Kelly Brock
The Sims Console Group
Maxis - Electronic Arts

> -- --Original Message-- --
> From: maya-dev-bounce@(protected) [mailto:maya-dev-bounce@(protected)]
> On Behalf Of Helmar Gerhardt
> Sent: Wednesday, November 19, 2003 5:40 PM
> To: maya-dev@(protected)
> Subject: Math behind Graph Bias adjustment
>
> Hi,
> I'm trying to figure out the mathematics behind Maya's ramp graph input
> bias adjustment. The fluidShape node use a lot of them. Maya's description
> to the input bias control is as follows:
>
> Opacity Input Bias adjusts the sensitivity of the selected opacity input
> used. Input values of 0 and 1 will always map to the start and end of the
> opacity curve, although the bias determines where in the curve a value of
> 0.5 will index. For example if one used density as an input, and one
> wishes the material to become opaque at a density of 0.001, then the
> density bias can be used to shift most of the curve into this density
> range. Instead of cramming several values at the beginning of the ramp one
> can use the full range. If the input bias is 0.0 then a value of 0.5 will
> map to the exact middle of the opacity curve.
>
>
> Anyone know the math to implement this functionality? It would be much
> appreciated. Thanks.
>
>
> Regards,
>
> Helmar
>
>
>
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---
> List-help: <mailto:listar@(protected)?Subject=help>
> List-archive: <http://www.highend3d.com/maya/devarchive/>



-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---
List-help: <mailto:listar@(protected)?Subject=help>
List-archive: <http://www.highend3d.com/maya/devarchive/>