Posts: 39
Threads: 10
Joined: Oct 2017
Reputation:
0
Hi,
I am trying to use 2D mode in a vertical plane, when I rotate the emitter and particle system, it fails in simulation. The flow is not accurate and distributes all around in a very high speed. However there's no problem with emitter in horizontal plane. The only solution I achieved was to change the mode to 3D and update solver, however I really want to use 2D mode. So, I am waiting for your precious advises, thanks a lot.
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
07-11-2017, 12:31 PM
(This post was last modified: 07-11-2017, 12:31 PM by josemendez.)
(07-11-2017, 08:38 AM)mimarilker Wrote: Hi,
I am trying to use 2D mode in a vertical plane, when I rotate the emitter and particle system, it fails in simulation. The flow is not accurate and distributes all around in a very high speed. However there's no problem with emitter in horizontal plane. The only solution I achieved was to change the mode to 3D and update solver, however I really want to use 2D mode. So, I am waiting for your precious advises, thanks a lot.
If I understand you correctly, you're trying to simulate 2D in a plane other than XY. 2D mode only works in the XY plane, like Unity's own 2D mode. All particles are projected to this plane during simulation.
Let me know if you mean some other thing. cheers!
Posts: 39
Threads: 10
Joined: Oct 2017
Reputation:
0
(07-11-2017, 12:31 PM)josemendez Wrote: If I understand you correctly, you're trying to simulate 2D in a plane other than XY. 2D mode only works in the XY plane, like Unity's own 2D mode. All particles are projected to this plane during simulation.
Let me know if you mean some other thing. cheers!
Yes , I exactly mean the same thing. So, is there any workaround to run simulation in other planes. I really need this, since 3D mode gives inappropriate results for me. Thanks a lot.
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(07-11-2017, 01:27 PM)mimarilker Wrote: Yes , I exactly mean the same thing. So, is there any workaround to run simulation in other planes. I really need this, since 3D mode gives inappropriate results for me. Thanks a lot.
Unity won't let you use 2D mode in any other plane but XY, so I see little use for it.
Anyway, you can set the solver to simulate in local space, and then rotate the entire simulation space to whatever orientation you need. However this may be a bit hacky for your purposes. To do it:
- Parent your emitter(s) under the ObiSolver transform.
- Enable "simulate in local space" in the solver.
- Rotate the solver to orient the simulation to any plane you wish (doesn't even t need to be aligned to the world's axis).
- Optional: you might want to rotate the gravity direction accordingly, as it is still expressed in world space.
Posts: 39
Threads: 10
Joined: Oct 2017
Reputation:
0
(07-11-2017, 02:33 PM)josemendez Wrote: Unity won't let you use 2D mode in any other plane but XY, so I see little use for it.
Anyway, you can set the solver to simulate in local space, and then rotate the entire simulation space to whatever orientation you need. However this may be a bit hacky for your purposes. To do it:
- Parent your emitter(s) under the ObiSolver transform.
- Enable "simulate in local space" in the solver.
- Rotate the solver to orient the simulation to any plane you wish (doesn't even t need to be aligned to the world's axis).
- Optional: you might want to rotate the gravity direction accordingly, as it is still expressed in world space.
Hi,
I have tried it and no success. The flow seperates into two from the middle and it doesn't interact with the solid objects.
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(08-11-2017, 11:16 AM)mimarilker Wrote: Hi,
I have tried it and no success. The flow seperates into two from the middle and it doesn't interact with the solid objects.
Hi,
Can you give a more accurate description of why you need 2D fluid on a plane other than Unity's 2D plane? Maybe there's an easier solution than this to your actual problem.
cheers,
Posts: 39
Threads: 10
Joined: Oct 2017
Reputation:
0
(08-11-2017, 01:14 PM)josemendez Wrote: Hi,
Can you give a more accurate description of why you need 2D fluid on a plane other than Unity's 2D plane? Maybe there's an easier solution than this to your actual problem.
cheers,
Hi,
I just need to rotate emitter. I have to use it in both horizontal (xy) and vertical , thats what I need exactly. However when I rotate it, 2D mode doesnt work properly and particles scatter around. As I said the only solution was changing 2D mode to 3D, but I dont prefer that for some reasons. So, please give me an advice, and the example scene is again von karman sample. I really need it and it shouldnt be so complicated, thanks a lot.
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
08-11-2017, 06:14 PM
(This post was last modified: 08-11-2017, 06:18 PM by josemendez.)
(08-11-2017, 05:16 PM)mimarilker Wrote: Hi,
I just need to rotate emitter. I have to use it in both horizontal (xy) and vertical , thats what I need exactly. However when I rotate it, 2D mode doesnt work properly and particles scatter around. As I said the only solution was changing 2D mode to 3D, but I dont prefer that for some reasons. So, please give me an advice, and the example scene is again von karman sample. I really need it and it shouldnt be so complicated, thanks a lot.
If you rotate the emitter around the Y axis while in 2D mode, particles will of course scatter around since you're emitting them outside of the XY plane where the simulation happens. 2D mode will only perform the simulation using 2 dimensions (X and Y), will completely ignore motion/forces/collisions in the Z axis. In 2D mode you're supposed to rotate the emitter in the Z axis only.
If you want to rotate the emitter both around the Y and the X axis but still want the particles to react to colliders around it in 3D, you need to use 3D mode. There's just no way around it.
Posts: 39
Threads: 10
Joined: Oct 2017
Reputation:
0
08-11-2017, 07:28 PM
(This post was last modified: 09-11-2017, 09:48 AM by josemendez.)
(08-11-2017, 06:14 PM)josemendez Wrote: If you rotate the emitter around the Y axis while in 2D mode, particles will of course scatter around since you're emitting them outside of the XY plane where the simulation happens. 2D mode will only perform the simulation using 2 dimensions (X and Y), will completely ignore motion/forces/collisions in the Z axis. In 2D mode you're supposed to rotate the emitter in the Z axis only.
If you want to rotate the emitter both around the Y and the X axis but still want the particles to react to colliders around it in 3D, you need to use 3D mode. There's just no way around it.
But, I think simulate in local space should work for this type of needs. So, may I run the simulation in YZ or XZ with 3D mode but with 2D mode settings? I am trying to find a workaround, but if you say its not possible, than I will of course pursue with 3D mode. The reason that I dont want to use -3D is that particles do not follow surfaces like expressed in the Coanda effect. So the simulation seems not realistic. I have tried everything to make 3D more accurate but I couldnt. When the particles interact with surface they reflects as a sharp path. They do not bend and do not take into account viscosity parameter. This is why I need 2D, thanks a lot.
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
09-11-2017, 09:39 AM
(This post was last modified: 09-11-2017, 09:49 AM by josemendez.)
(08-11-2017, 07:28 PM)mimarilker Wrote: But, I think simulate in local space should work for this type of needs. So, may I run the simulation in YZ or XZ with 3D mode but with 2D mode settings? I am trying to find a workaround, but if you say its not possible, than I will of course pursue with 3D mode. The reason that I dont want to use -3D is that particles do not follow surfaces like expressed in the Coanda effect. So the simulation seems not realistic. I have tried everything to make 3D more accurate but I couldnt. When the particles interact with surface they reflects as a sharp path. They do not bend and do not take into account viscosity parameter. This is why I need 2D, thanks a lot.
Hi there,
Unity only supports 2D mode in the XY plane. Even though you can perform Obi's simulation in local space in any plane, colliders are only considered as their projection in the XY plane. For this reason, using 2D mode to simulate collisions in 3D is not going to work. You cannot mix 3D collision detection and 2D simulation.
The Coanda effect can be easily reproduced using surface stickiness in the collision material. I fact one of the sample scenes included (FluidViscosity) reproduces it in full 3D, also using a quite viscous fluid. See 0:40 in the following video:
In the collision material you can specify friction and stickiness separately, so you can fine tune forces both in the normal and tangential directions to the surface. You can make a slippery but hydrophilic surface (low friction, high stickiness), or a very rough but hydrophobic surface (high friction, low stickiness), for instance. For more reference, see the last bit of this: http://obi.virtualmethodstudio.com/tutor...sions.html
|