Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing material of Volume spot at creation?
#5
(08-10-2023, 06:53 PM)_RicO Wrote: Your solution did work, but I didn't realize it would be called each frame. I thought the callback was called only every time a volume spot is added. Is that possible?

The idea, is that I need to make sure the material is the "selected" color, and want to "fade in" (adjust color alpha) the volume spot mesh every time a new one is created. So it would make for a smooth "volume spot" spline animation.

The OnRefresh event is not triggered every frame, but only when the generator/module is refreshes. If no input changes (the spline, the placed object, etc.) the event is not triggered.

For complex behaviors regarding the materials, you can code your own logic which would keep track of the number of placed objects, and apply the fading when appropriate. Such logic would be triggered in the OnRefresh listener.
Please keep in mind that when refreshing, all the created objects are removed then added. This means that there are no guarantees that the object at position P pre-refresh stays at the same position post-refresh.
The generator uses pooling, so removing/adding objects should not have a significant performance impact.
Please consider leaving a review for Curvy Splines, this helps immensely. Thank you.
Reply


Messages In This Thread
RE: Changing material of Volume spot at creation? - by _Aka_ - 08-11-2023, 09:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Replace deform mesh on volume spots Kokoriko49 1 2,484 06-09-2025, 06:49 PM
Last Post: _Aka_
Photo Volume Spots problem with spacing Bond007 3 2,805 01-20-2025, 12:27 PM
Last Post: _Aka_
  Duplicate Volume references become null joebain 5 3,575 11-18-2024, 10:46 AM
Last Post: joebain
  Nested Spline Volume Spot Instantiation merobbins5 3 3,152 07-26-2024, 09:58 AM
Last Post: _Aka_

Forum Jump: