Help Is it possible to have Surface Emitters? - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html) +--- Thread: Help Is it possible to have Surface Emitters? (/thread-3003.html) |
Is it possible to have Surface Emitters? - aseem.zhakaas - 02-07-2021 I have a game where i want blood to splash and pour from the part of the body where the bullet hits. Is it possible to give the Emitter a position where it should spawn the fluid particle? RE: Is it possible to have Surface Emitters? - josemendez - 02-07-2021 (02-07-2021, 12:50 PM)aseem.zhakaas Wrote: I have a game where i want blood to splash and pour from the part of the body where the bullet hits. Is it possible to give the Emitter a position where it should spawn the fluid particle? Yes, you can write your own EmitterShape and provide your own spawn point(s). Just extend the ObiEmitterShape class and implement its GenerateDistribution() method to provide your own distribution points. This lets you have multiple points at once. Note each point is comprised of both a position and a direction. Another alternative is simply moving the emitter to wherever the bullet hits. RE: Is it possible to have Surface Emitters? - aseem.zhakaas - 02-07-2021 I had another question, let me know if i should ask it in a separate post. The question is, lets say i have an object that represents Ice and i reduce its scale to make it look like its melting and getting smaller. How can i use obi fluid to show water dropping off of it. Do you have a video reference where obi fluid is being used to do that? Something like this, but not as realistic of course. https://www.storyblocks.com/video/stock/icicle-melts-and-drips-in-spring-hds6gucvbk10trxub RE: Is it possible to have Surface Emitters? - josemendez - 02-07-2021 (02-07-2021, 01:36 PM)aseem.zhakaas Wrote: I had another question, let me know if i should ask it in a separate post. You can simply change the size of the emitter shape as the object grows smaller. To emit fluid from the surface of an arbitrary mesh, you will need to write your own EmitterShape. The built-in ones can emit fluid from the volume of a mesh, or from the surface of an image, but there's no built-in support from emission from a surface. Simplest approach would be to place a distribution point at each mesh vertex, oriented using the vertex normal. |