5
$\begingroup$

I would like to procedurally emit particles (fluid mode) from the 'steepest' parts of animated 'waves' created by a Ocean modifier to attempt to emulate foam and splashes. I assume frame by frame normals values could be used, but cant figure out how.

So how would I go about procedurally weighting a mesh based on the face angles of an animated mesh? (ocean modifier in displace mode).

$\endgroup$
4
$\begingroup$

While this isn't impossible to do with blender at the moment, but its not something you can do easily, and doing this via a script would be very slow.

It would involve 2x modifier stack calculations per frame change.

  • Add a frame-change-post handler.
  • this handler must update the scene - scene.update() so the data it deals with is valid before you start to operate on it.
  • get the final calculated mesh and inspect its normals.
  • modify the original meshes vertex groups how you like.
  • throw away the copy of the mesh, only generated to inspect normals.
  • tag the mesh to be updated mesh.update_tag()
  • and run scene.update() again.

So officially this kind of thing isnt supported, and what I have suggested is very much a hack. Ideally modifier plugins would much more easily allow this functionality.

$\endgroup$
  • $\begingroup$ Thank you for your thoughtful reply. I will take a look at a scripted soultion. Cheers $\endgroup$ – PRP Jun 17 '13 at 21:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.