Itoo Software Forum

Author Topic: need help with scripting such effect in 5.0.2  (Read 750 times)

TP4705

  • Newbie
  • *
  • Posts: 9
need help with scripting such effect in 5.0.2
« on: November 24, 2015, 01:38:00 PM »
I saw a nice sneak peek of 5.0.0 where a ball was dragged through the grass field. Grass was affected by the ball depending of distance, angle, etc. Like a simple collision engine.

Since I am new in this scripting (I can script in krakatoa magma, stoke and genome, but it is more node based approach) i struggle to write this effect for fpp5. I know how the algorithm should work, but I am a total goon in fpp syntax, even with docs provided.

The algorihm would be:

Take selected geometry as deformer > measure distance from deformer's surface > rotate myself away or along tangent of the deformer (+ multiply angle value by a factor provided by user).

Sounds easy, but there are many details that I can't even know how to start.
thanks for eventual help

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1490
Re: need help with scripting such effect in 5.0.2
« Reply #1 on: November 24, 2015, 01:43:10 PM »
Hi!

This script is included as an example in our documentation. You can download and analyse the .eff file to help understand how it's created, there are also some details on the page about the functions, variables and parameters. Check it out here.

Let me know if you have any questions about it.

Many thanks!

Paul.
« Last Edit: November 24, 2015, 01:45:18 PM by Paul Roberts »
Paul Roberts
iToo Software

TP4705

  • Newbie
  • *
  • Posts: 9
Re: need help with scripting such effect in 5.0.2
« Reply #2 on: November 24, 2015, 07:49:02 PM »
Amazing repository! Asked for one, got dozen.

One question:
Is there any particular folder for eff files (scripts/forestpack? ) to be placed to have them at hand in forest effects UI?

thanks

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1490
Re: need help with scripting such effect in 5.0.2
« Reply #3 on: November 24, 2015, 08:07:57 PM »
No, you can save them anywhere. Once the .eff file has been loaded the code is stored in the FP object itself.

Later on when we add the effect browser you may want to organise them more but the scene is not dependent on the file once it's been loaded.

I hope that helps.

Cheers!

Paul
Paul Roberts
iToo Software