Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Colorless liquid particles (URP).
#11
Someone can correct me if I'm wrong, but I think

1) You set in the corresponding ObiEmitterBlueprints' Capacity field
2) Easiest way is to just set the lifetime to be a large value
3) For a rough estimate, you can count the active particles through ObiEmitter.activeParticleCount. You can take a look at IObiParticleCollection and ParticleImpostorRendering for more info.
Reply
#12
(25-10-2021, 12:15 PM)Volchok Wrote: 1) Where to set the number of particles?
2) How to make the particles not disappear but just stay in the cup, filling it.
3) How do I calculate the volume of fluid in a cup?

CreepGin's answers above are correct, just for completeness:

1) Yes, you set your blueprint's capacity. Link to the manual: http://obi.virtualmethodstudio.com/manua...rials.html

2) When setting the emitter's lifetime to a *very large value*, note you can actually set it to infinite by typing the word "Infinity" into the numeric field, and pressing enter. This trick works with any numeric field in Unity, not just Obi's.

3) Count particles if you want a rough estimate, if you want the actual volume in cubic meters then multiply by the volume of a spherical particle: 4/3 * PI * (radius)^3.
Reply
#13
(25-10-2021, 04:04 PM)CreepGin Wrote: Someone can correct me if I'm wrong, but I think

1) You set in the corresponding ObiEmitterBlueprints' Capacity field
2) Easiest way is to just set the lifetime to be a large value
3) For a rough estimate, you can count the active particles through ObiEmitter.activeParticleCount. You can take a look at IObiParticleCollection and ParticleImpostorRendering for more info.

Thanks! I'll try to experiment.  Sonrisa

(25-10-2021, 04:49 PM)josemendez Wrote: CreepGin's answers above are correct, just for completeness:

1) Yes, you set your blueprint's capacity. Link to the manual: http://obi.virtualmethodstudio.com/manua...rials.html

2) When setting the emitter's lifetime to a *very large value*, note you can actually set it to infinite by typing the word "Infinity" into the numeric field, and pressing enter. This trick works with any numeric field in Unity, not just Obi's.

3) Count particles if you want a rough estimate, if you want the actual volume in cubic meters then multiply by the volume of a spherical particle: 4/3 * PI * (radius)^3.

Thanks! I will try.  Sonrisa
Reply
#14
I am having the same issue as the OP except that it's still not working for me. Here's the steps I tried in a new project:

- create new URP project with Unity 2021.1.28f1
- import Obi Fluid, clicked "Yes to all" in the conversion dialog
- imported Burst
- got warnings in playmode: referenced script (Obi.BurstColliderWorld) missing (and one other)
- manually imported com.unity.collections
- I can run the sample but everything is pink
- Edit => Render Pipeline => URP => Upgrade (all) materials
- Scene runs, console does not log anything, but fluid is not rendered (btw turning on particles works as discussed above)

How do I get Obi to display fluids in URP?
Reply
#15
(15-11-2021, 05:29 PM)DeprecatedHuman Wrote: I am having the same issue as the OP except that it's still not working for me. Here's the steps I tried in a new project:

- create new URP project with Unity 2021.1.28f1
- import Obi Fluid, clicked "Yes to all" in the conversion dialog
- imported Burst
- got warnings in playmode: referenced script (Obi.BurstColliderWorld) missing (and one other)
- manually imported com.unity.collections
- I can run the sample but everything is pink
- Edit => Render Pipeline => URP => Upgrade (all) materials
- Scene runs, console does not log anything, but fluid is not rendered (btw turning on particles works as discussed above)

How do I get Obi to display fluids in URP?

I'll record a video and link it here so you can see which steps I'm taking in case I missed anything.

Did you set up URP fluid rendering at all? This is not mentioned in your steps, and will result in fluid not being rendered. You should follow the steps on the manual:
http://obi.virtualmethodstudio.com/manua...ering.html

Quote:-Add a ObiFluidRendererFeature to your pipeline's renderer feature list.
-Enable Opaque and Depth textures in your pipeline.

Or this video:
Reply
#16
(15-11-2021, 05:47 PM)josemendez Wrote: Did you set up URP fluid rendering at all? 

Oooooooh ... okay ... I didn't know about that. Thanks for the quick response! I'll look into that.

TBH assets that I know which require setup remind the user about that with a popup or similar so there's no RTFM questions. Something to consider for a future update. Guiño
Reply
#17
(15-11-2021, 06:07 PM)DeprecatedHuman Wrote: Oooooooh ... okay ... I didn't know about that. I'll look into that.

TBH assets that I know which require setup remind the user about that with a popup or similar so there's no RTFM questions. Something to consider for a future update. Guiño

The problem with this is that different use cases require different setups: setting up for the built-in pipeline, setting up for URP with fluid surface rendering, setting up for URP with flat fluid rendering, setting up granular rendering in either pipeline...are all done in slightly different ways. Imho if we added popups for all those you'd be thrown back into MS Office's Clippy experience ("it looks like you're writing a letter, can I help?")  Guiño

In cases where there's only one possible setup, popups are indeed a good idea. However if there's only one possible setup, it's even better if the engine sets it up automatically (which is what we try to do).
Reply