Notifications
Clear all

[Closed] mapAmounts controller bug?

I am trying to assign a controller to multiple standard materials’ bump amounts, but it gives me this error when I assign them within a loop: Runtime error: Property not animatable: bumpMapAmount
When I use the exact same code (aside from object position) outside of a loop, it works perfectly. The code I used to test this is below. Is this a bug? I think I know a workaround for this already (check if the parent controller’s value has changed, then loop through and set all bumpMapAmount values to match that parent value) but I would prefer directly assigning/linking the controllers.

EDIT: I’m using Max 2016

newBox = box length:100 width:100 height:100
newBox.position.x = 0
newMaterial = standardMaterial()
newMaterial.bumpMapAmount.controller = bezier_float()
newMaterial.bumpMap = Normal_Bump()
newBox.material = newMaterial

for i=1 to 6 do
(
	loopBox = box length:100 width:100 height:100
	loopBox.position.x = i * 150
	loopMaterial = standardMaterial()
	loopMaterial.bumpMapAmount.controller = bezier_float()
	loopMaterial.bumpMap = Normal_Bump()
	loopBox.material = loopMaterial
)
3 Replies

the standard material’s #bumpAmount parameter is NOT ANIMATABLE. there is another mechanism in standard materials to animate a texture map amount >> SubAnim:Maps

this subanim has dynamic parameters which created (added) if necessary (actually when a corresponding texture exists and its amount animated). so the way to do it is:

b = box()
m = standard()
m.bumpMap = normal_bump()
m[#maps].bump_amount.controller = bezier_float()
b.material = m

Thanks! But if it isn’t animatable, why would I even be able to assign one outside of a loop? And why does assigning within the loop throw the error when it doesn’t outside the loop?

you can’t… it has to throw the same error.

meditmaterials[1].bumpMapAmount
--- 30.0
meditmaterials[1].bumpMapAmount.controller
--- undefined
meditmaterials[1].bumpMapAmount.controller = bezier_float()
--- Runtime error: Property not animatable: bumpMapAmount

If you do not have this error message, this is an occasion to think about your system settings.