Panda's perlinNoise function

Hi everybody!

I have a quick question about panda3D’s built in noise function.

(GOAL)
I’ll use the noise to create more natural look in 3d model’s facial animation. I just want to add very subtle movements over the existing animation. Then I’ll do some survey about believability.

Since panda has already have a noise noise implemented I thought it would be great to use it. However I couldn’t manage to control range that noise function return values. (for example: I want to be able to say, generate numbers between 0.5 and 0.8) Currently it returns numbers between -1, 1.
So my main question is how does this perlinNoise in Panda3D works exactly and what I can and can’t do?

Secondly I am using task and sending the task.time to the noise I created to get the natural movement, if you think there is a better way to do it I would love it hear it.

Thanks alot!

You can scale the return value yourself into the range you want, e.g. (noise() + 1) * 0.5 will convert -1 … 1 to 0 … 0.5.

(multiply by .25 for 0-.5 range :slight_smile:)

Er, right. Sorry.

David