position bias

I figured I would post this and get some other heads on the idea of getting position BIAS in max.

I've come across several sites that had some explanations and formulas for it.
here is the most common one I found.

BIAS = ∑nt=1 | Dt - Ft | / n

Id liked to get this translated into 3ds max. It's a common thing I've come across on several forums with unanswered solutions.

mybox = box length:5 width:5 height:5 wirecolor:black --new box
 
objCount = 10
 
for i = 1 to objCount do
(
	box_copy = copy mybox
	box_copy.pos = [(i*objCount), 0, 0]
	box_copy.wirecolor = [i*objCount,0,0]
)
AttachmentSize
ref.jpg48.88 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
JokerMartini's picture

This is what I have so far.

This is what I’ve got so far. If you open the max file I’ve attached and selected the little pile of spheres and run the script it will work.

Aside from that the script is not stream line enough. If you change the sphere count it does not work properly. Hoping to get some other opinions or help.
Thanks

startPos = $Sphere013.pos
endPos = $Sphere009.pos
selObjs = (selection.count)
clearlistener()
for i=1 to (selObjs) do 
(		
	userPerc = 66.6666666666
	PerVal = userPerc*.01
	PerChange = (PerVal/selCount)*(i+1)
	print PerVal
	print PerChange
	Part1 = (endPos-startPos)
	Part2 = (i as float)/(selObjs+1)*PerChange
	PosPerct = (startPos + (Part1*Part2))
	print PosPerct
 
	Obj = Selection[i]
	Obj.pos = PosPerct		
)
AttachmentSize
testbias.max 192 KB

John Martini
Digital Artist
http://www.JokerMartini.com (new site)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.