|
|
Getting Direction of Increasing Userdata per-particle |
Posted by: slimedev - 19-11-2023, 06:37 AM - Forum: Obi Fluid
- Replies (4)
|
 |
I'm trying to store Vector3 "directions" in Userdata to do per-particle pathfinding. This direction is calculated from userdata "Input", so together they fit into one Vec4. Custom code also allows multiple Vec4s per Particle.
I'm stuck and have debug vectors pointing in unexpected directions, and would like some advice before I go trying more things 
(PS: I may use Direction/Differential/etc to mean the same thing, pardon me)
In this video, userdata "Input" receives value of 1 at the particle nearest the Blue Cursor.
With target in the center, I expect all the Green Lines to point Inwards, and some sort of do but not quite....
At 0:10 I move the Cursor around in a Circle, and the expected radial symmetry is just not there...
Differential of Center Mass vs Input (Vectors) - YouTube
In this video I change between color debug for "Center of Mass" and "PlayerInputDifferential" (Particle colors are normalized vectors)
Note that: CenterMass has unique regions of Purple and Pink, and is very Stable.
But: PlayerInputDiff has Pink in both the Upper Left and Lower Right, and there's some Flickering.
Differential of Center Mass vs Input (Colors) - YouTube
Here's the important formula in the script below, where dataDelta is a float difference in Userdata PlayerInput between two particles.
It seems correct, but invovled guesswork and AI so who knows.
Code: float4 oneDeltaA2B = dataDelta * distA2B / math.length(distA2B);
The custom multiple userdata per particle doesn't seem to be the problem, because all channels seem to dilute/diffuse fine.
Maybe the problem is having one Burst Job use the same userdata for two purposes at once: Regular Diffusion of "Direction" as Userdata AND +/- "Direction" based on another?
I've Tried:
- Considering the above dual-write, only diffuse one Vec4 per-particle and do not diffuse the Vec4 with this Direction in it. This resulted in all particles having Vector3.zero, with some randomish color near where Input userdata was being written. (However, may need to revisit this, because I errantly stopped "Input" channel from diffusing, so obviously "Direction" has no data to derive from elsewhere....)
- Instead of storing Vector3 in Userdata, create new Solver array Vector3[]. In debug color mode, they all seemed randomized (indexing error?). And where previously the +Y half of slime had some purple/blue shades, it seemed half of all directions were now missing. (I have no clue how batching works in Constraints, or why this change of indexing into Userdata Vector4[2*n] V.S. Solver Vector4[n] was off.)
(snip)
Modified UpdateDensitiesJob:
![[Image: VszZAiQDHqpY.png?o=1]](https://gcdnb.pbrd.co/images/VszZAiQDHqpY.png?o=1)
Helpers
![[Image: 6SSDgEfcwRCL.png?o=1]](https://gcdnb.pbrd.co/images/6SSDgEfcwRCL.png?o=1)
![[Image: uMLrqKG02hII.png?o=1]](https://gcdnb.pbrd.co/images/uMLrqKG02hII.png?o=1)
PS: Automod makes pasting code very difficult. Maybe all the {} () [].
Pasting images directly in looks like it works, but Errors because the message is too long, and raw view shows raw data in there.
External image host works once I ctrl-click to copy image link instead of the link they gave me!
|
|
|
ElasticCharacter demo scene is broken |
Posted by: locque - 17-11-2023, 11:28 PM - Forum: Obi Softbody
- No Replies
|
 |
Hi,
I wanted to use this scene as a reference for my own character, but it doesn't appear to work properly. Take a look at this video:
https://drive.google.com/file/d/1NzCH3z1...drive_link
Any idea why this is happening and how I can fix it?
Nevermind, just saw your reply on the asset store about this issue. I really wish the main page would also show replies from the developer on the latest review which was about this exact problem, I thought that meant it was an unresolved issue.
For anyone else experiencing the same problem, you simply have to hit the "Bind Skin" button in the Obi Softbody Skinnner component on the body GameObject.
|
|
|
Color change on collision |
Posted by: Major 2Sips - 08-11-2023, 03:35 PM - Forum: Obi Fluid
- Replies (2)
|
 |
Hello
I am trying to find a way to get the particles to change color individually when they collide with a gameobject that has an Obi Collider. How would a be able to achieve this?
Any assistance will be greatly valued, Thanks
Apologies if this has come up before
|
|
|
Transparent fluid when using Meta quest passthrough |
Posted by: 413866 - 06-11-2023, 09:18 AM - Forum: Obi Fluid
- Replies (12)
|
 |
To enable passthrough on any quest (1,2 and 3). you have to set the background to black in the camera, this is fine because the user does not see this. It can not be any other color then black as that would cause the user to see this color.
The problem arises when you have a transparent fluid in the foreground. It will turn a dark black color because it absorbs this black color from the "invisible" background.
|
|
|
FLUXY - 2.5D FLUID SIMULATOR forum? |
Posted by: khos85 - 04-11-2023, 07:04 PM - Forum: General
- Replies (2)
|
 |
Hi,
I cannot find fluxy support or a section on this forum, where is it? My question is if/when we can get version 1.5 as the video on your youtube of shallow water sim looks cool, I'd like to use/test that please. Can we get it somehow?
Kim
|
|
|
Changing Granular blueprint meshes and textures |
Posted by: Rearden - 04-11-2023, 04:01 PM - Forum: Obi Fluid
- Replies (2)
|
 |
Hey there! I tried to find an answer at FAQ but with no luck, unfortunately.
Could you please help me with my question - Is there any way how I can change apperience of particles from granular blueprint?
So for example, I want to change default sphere for a box or a custom mesh. Also, it will be great if I could change not only mesh, but textures as well in addition to a particle color.
Thanks in advance!
|
|
|
|