Notifications
Clear all

[Closed] Change diffuse color depending on velocity

Hi everyone,

i tried to figure out the whole afternoon how it could be possible to change the diffuse color of a material depending on the velocity of an object the material is applied to.

Something like a velocity pass but with manual controls. For instance, every object that stays in place will render black and every object that moves will render white.

I tried the scripted material (supa glass example) but somehow i didn’t manage to get the variable color for each object depening on the velocity.

1 Reply

I wrote something the other day which does something that might help… It just compares the objects position at one point in time further, and uses the distance between these 2 points to control the intensity of the greyscale value of the diffuse.

Will need to be adjusted for your scene, it’s not a true velocity pass but you can then at least make things glow with their speed for instance.


 --time range
   for t = 1 to 100 do
   (
   	at time t (
 for o in selection do
 (
      thespeed = distance (at time (slidertime + 1) o.position) o.position
   	
   
   		thecolour = ((abs(thespeed)) * 100)
   		with animate on 
   		(
   		at time t o.material.diffuse = (color thecolour thecolour thecolour)
   	)
      
   
   	)
   )
)