Notifications
Clear all

[Closed] Math for soft selection/affect region falloff

Anybody know what the equations are for the falloff values used in Max.

A good example is the “Affect Region” modifier and the Inputs that control the Falloff – Pinch and Bubble.

How are these values expressed in code, is it a Gaussian falloff or something simper ?

http://en.wikipedia.org/wiki/Gaussian_function

11 Replies

you could test your hypothesis quite easily with a unit grid, add soft selection select the center vert and move it a unit distance in the vertical. z positions of the other verts should then tell you if you are right. or may give an indication to the math behind it.

you could test your hypothesis quite easily with a unit grid, add soft selection select the center vert and move it a unit distance in the vertical. z positions of the other verts should then tell you if you are right. or may give an indication to the math behind it.

Hi thanks for the reply – that’s exactly what I’ve been doing using the below formulas from this page – http://imdoingitwrong.wordpress.com/2011/01/31/light-attenuation/

I’m using Ephere lab http://www.ephere.com/plugins/autodesk/max/lab/

  • just starting with it and really enjoying it –

Just wondered if the Gaussian was the method used in Max (looks a little heavy)or if there was a standard efficient equation that gave similar results to the existing falloff – range – strength already used.
What do people use for this I guess is another way to ask the same question ?

this is the usual max mix curve(though not the one used of the soft selection ease in ease out.

though you need to change the 3.2 to just 3 !

i needed paste after the http:\ not replace it

I think these are the droids you are looking for


    float AffectRegionFunction(float dist, float falloff,float pinch, float bubble) 
  {
  	float u = ((falloff - dist)/falloff);
  	float u2 = u*u, s = 1.0f-u;
  	return (3*u*bubble*s + 3*u2*(1.0f-pinch))*s + u*u2;
  }	
  

from the SDK documentation meshadj.h

i’ve immediately added it to my script extension

i’ve double-checked (edit mesh, edit poly, unwrap, track view). the formula is exactly right. !!!
the difference is the max clamps values from 0 to 1

it is the 1 – xx(3 – 2*x) when bubble and pinch equal zero, just rearranged a bit.

Page 1 / 2