Author Topic: Corona Scatter - temporal stability  (Read 6321 times)

2016-05-30, 11:28:26

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
Hi all!
There were some bug reports on Corona scatter not behaving correctly in animation if the surface on which it scatters is animated - objects would randomly jump around. We fixed this by doing the scatter just in one frame and then deforming it in others - so all objects would "stick" when surface is animated

There are however some questions/issues:
  • If we scatter on a surface and then the surface stretches significantly, the distribution can become non-uniform. Is this OK?
  • What time should the scatter be done in? Always time 0? Or have a control (spinner) for it?
  • Should this mode be always on? Or should there be a checkbox to switch between the old and new way?
  • Avoid collisions: if the surface object moves, then 2 objects that did not colide in frame 0 can start colliding in frame 10. What should we do? If we reject one of the objects, then the "objects popping in/out" problem is back. if we let it happen, then "avoid collisions" can actually permit some collisions.

Let me know what you think, thanks!
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2016-05-30, 11:53:32
Reply #1

Rotem

  • Active Users
  • **
  • Posts: 64
    • View Profile
Last year I implemented a scattering solution for in-house use. My way around the deforming surfaces issue was to allow a mode of distribution which operates in UV space rather than object space.

This was usually needed when the artist wants to scatter objects on a deforming character. By using the UV data to distribute, I could ensure that the distribution would be consistent across different scenes, without requiring the artist to set up frame 0 or -1 as a consistent T-Pose.

Of course, this doesn't solve the collision detection issue which you describe. In my implementation, I left it to calculate collisions for the current frame only which results in objects popping in and out of existence like you describe. I have yet to think of a good conceptual solution for this issue.

2016-05-30, 13:47:48
Reply #2

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8854
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Maybe it's worth to release your solution in to daily builds as it is and let users to test it before giving feedback? It's hard to know if that fix wouldn't break someone's workflow without testing it.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2016-05-30, 13:48:40
Reply #3

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
we dont have it fully implemented yet, and we would like to know your opinion before we finalize it in any way
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2016-05-30, 15:42:09
Reply #4

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
Would it make sense to do something like "recalculate for current state" button which would recalculate scatter for the distribution object in its current state? So if you stretch something, and the scatter becomes too sparse, then you recalculate in the middle of the animation, and you have your compromise.

On/off - I would say that this is progress, so only the new version should stay whatever it is. However, it would be great to keep consistency with the old scenes.

Collisions on animated surface - I would permit collision. Or an on/off checkbox for popping.

Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2016-05-30, 18:16:30
Reply #5

sebastian___

  • Active Users
  • **
  • Posts: 197
    • View Profile
Sounds like doing it this way, using just one frame maybe it will even improve performance.
As Corona scatter is used often for landscaping I think the options described would be fine. I'm not sure when I would need to animate the surface on which the vegetation stands, but maybe if moving slightly - like for an earthquake, the surface would not visually stretch anyway.

Having some objects colliding would be better than having them popping.

Still, having options like a spinner to chose the frame (and animating the spinner), could be used for more than landscaping, perhaps motion graphics and so on.

I think Corona Scatter doesn't have a paint option, that would be more important I think, for individually painting flowers and manually touching and adjusting the landscape.

2016-05-30, 18:23:40
Reply #6

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
If we scatter on a surface and then the surface stretches significantly, the distribution can become non-uniform. Is this OK?
Yes.
You could add options for UV scattering (which I'd also find useful) and a checkbox for un/locking to surface but at some point you would be already halfway to making a forestpack clone.

What time should the scatter be done in? Always time 0? Or have a control (spinner) for it?
Spinner is definitely needed. Not every animation starts at 0.

Should this mode be always on? Or should there be a checkbox to switch between the old and new way?
If you want to keep backwards compatibility you'll either need the switch anyways or forget it all together. I, personally would prefer having it on by default.

Avoid collisions: if the surface object moves, then 2 objects that did not colide in frame 0 can start colliding in frame 10. What should we do? If we reject one of the objects, then the "objects popping in/out" problem is back. if we let it happen, then "avoid collisions" can actually permit some collisions.
Imho calculate collisions on the reference frame only and that's it. See problem of point 1, otherwise you will need more and more options and checkboxes since there is no wrong or right there.
Any sufficiently advanced bug is indistinguishable from a feature.

2016-11-10, 10:46:54
Reply #7

flaviomac

  • Active Users
  • **
  • Posts: 21
    • View Profile
Hi Ondra

Is it possible to implement the ability to have animated maps in scale, position and rotation slots so we can make animated growing plants?