Hello fellow game devs!
I'm trying to replicate the Jelly Dye Gameplay effect using the Unity engine. Can anyone provide guidance on how to implement this effect? I'm open to discussing it in detail over a VC.
Link to gameplay: https://www.youtube.com/shorts/0jm7vFuDkYg?feature=share
#How do I achieve 3D color filling effect
32 messages · Page 1 of 1 (latest)
I am not an expert or very knowledgable on this, but I am pretty sure it is using shaders.
It would be some kind of fill shader with a ghose mesh, like the mesh starts appearing as we fill it.
Hmm...then how would you explain color interaction when injected the color multiple times at different spots? I think there's some fluid sim. going on, but not sure about how to achieve this effect using that.
Could you outline all the features that you want?
- The color should be filled wherever I touch the mesh.
- If I touch different parts of the mesh then the color should interact with what is already present, you can refer to the video linked.
- 1 mesh will have only 1 type of color.
- Should be able to use it in mobile devices.
- According to my research, this should be some type of eulerian fluid.
i guess this might be helpful : https://assetstore.unity.com/packages/tools/physics/fluid-fx-factory-247099
I don't want prebuilt asset, I want to build it myself.
I doubt it's an actual fluid sim
Maybe pre rendered or just hard coded swirling
Wait no it's probably a fluid sim
Maybe the fluid sim is done at a lower resolution and then rendering interpolates to a higher res with swirls
If you want to build it yourself you can just build the sim?
What is the question
I want to do this inside a 3D mesh, which will run on Android devices. Simply implementing fluid sim won't be a feasible solution as it'd be heavy for mobile devices. The question is how to achieve this without using fluid sim, if the answer is shaders, again, how?
why a 3d mesh?
and also do you want to simulate fluid or not
because the effect looks pretty simulated
doesn't matter if the sim is with shaders or not
- Because it's in the gameplay video!
- I know I should not simulate fluid for a mobile device.
Saw it! I don't think, that'll be applicable here.
What about 2d effect but 3d mesh
If you don't want any actual fluid sim, I'd consider using some sort of voxel representation (3D grid of floating point values meaning 0 -> no liquid, 1 -> full liquid for example) for the container and use flood fill and/or some sort of cellular automata to gradually fill the voxel grid. You could then raymarch against the grid values + add some noise to make it look like an actual fluid. The concept would be essentially same as in this one: https://www.youtube.com/watch?v=ryB8hT5TMSg&t=28s. I doubt you would get it to look exactly as in the example video but something similar at least. Haven't made one myself but I have understood implementing fluid sim yourself is a painful process but with such small container and low resolution requirement, simple fluid sim could potentially be fast enough to work on mobile too but making one sounds tricky enough.
Hmm...seems like a feasible approach, let me dig into this. Thank you @somber siren !
How can I do that? I'm sorry, I'm a noob in shaders.
I mean like you can shade the jello so it looks 3d, but the color fill effect is 2d. Like a texture
Oh! I'll try implement this, if I can!
I'll share the work here if I'm able to achieve it
... I mean it still doesn't solve your fluid problem
Yeah, but something is better than nothing...