Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Suggestion / Idea  OBI7 Surface Texture Rendering (Lava) discussion
#17
(21-05-2024, 09:25 AM)josemendez Wrote: The advection model is optimized for foam-like stuff, where the pulsing at rest is used to hide texture repetition. Open up ObiFlowMapping.cging and comment out lines 17 and 18:

Code:
flowUV1 += (time - phase1) * jump;
flowUV2 += (time - phase2) * jump + 0.5;

That should improve the resetting look.


Wind in fluids is scaled by the fluid's atmospheric drag.


Your IndirectOpaque shader is set to "transparent" in URP. Set it to opaque for it to render correctly behind transparent objects.


I'm unable to reproduce any performance drops. Could you share a capture of your profiler in timeline mode, during one of these hiccups?



For your specific use case you could look into driving the particle's color using userData. You just copy the contents of the userData array to the color array, making any conversion you deem necessary. Particle color gets passed on to the mesh vertices, so you could then write a custom shader that uses the color of the particles to drive texture emission and cool down the lava.

Note it is not possible to access arbitrary per-particle data from a shader. The reason is only vertex data is accessible to a shader, and for things like userData (or other particle properties like mass or density) to be directly accessible from a shader they would need to be averaged during fluid mesh construction and packed into the vertex format.

Currently, fluid vertices store fluid velocity, normal and color. It's not within our plans to add more data to the vertex format, as storing more data would increase the size of vertices and hence the memory usage of chunks, making it harder to have larger amounts of fluid. For this reason we've strived to keep the vertex size as small as possible: color is compressed and normals use octahedral encoding.


This is already possible, you can change the mesher's material type from Opaque or Transparent to "Custom", and provide an entirely custom material. Note that the shader you use still needs to access vertices in a specific way since Obi uses a compressed vertex format for fluids. See the manual for an example of a minimal shader (scroll to the bottom of the page):
http://obi.virtualmethodstudio.com/manua...ering.html

Thanks for all the answers. I think with those infos I can make my lava cool now Gran sonrisa 
Btw currently I'm on other tasks, will post more when I get back to the project.
Reply


Messages In This Thread
RE: Bigger foam with Alpha dissolve - by spikebor - 08-05-2024, 04:47 AM
RE: Bigger foam with Alpha dissolve - by spikebor - 08-05-2024, 08:18 AM
RE: Bigger foam with Alpha dissolve - by spikebor - 08-05-2024, 08:30 AM
RE: Bigger foam with Alpha dissolve - by spikebor - 08-05-2024, 08:35 AM
RE: Bigger foam with Alpha dissolve - by spikebor - 08-05-2024, 03:56 PM
RE: Bigger foam with Alpha dissolve - by spikebor - 10-05-2024, 08:57 AM
RE: Bigger foam with Alpha dissolve - by spikebor - 16-05-2024, 05:17 PM
RE: Bigger foam with Alpha dissolve - by spikebor - 21-05-2024, 03:04 PM