wetmaps as geometry

Post Reply
deadalvs
Posts: 5
Joined: Wed Sep 15, 2010 2:33 pm

wetmaps as geometry

Post by deadalvs » Thu Jan 29, 2015 9:16 pm

hi ..

I'm not perfectly sure about this - I have checked the docs for a bit.

Is it possible to instead of texture based wetmaps, create a wetmap counterpart in actual geometry created by realflow? I mean a 1-polygon thin mesh that 'hovers' a few mm above the actual mesh that is wet and has an actual wetmap assigned to it (mesh-parts that are drying)?

I just ask because some input meshes I want to use are very heavy and UV-unwrapping into the 0-1 space would need very an extreme highres wetmap - very inefficient. So coming from the fluid-sim side would make this much more efficient.

Any input welcome !

Matt

User avatar
Alex
Site Admin
Posts: 143
Joined: Mon Jun 14, 2010 9:35 am

Re: wetmaps as geometry

Post by Alex » Fri Jan 30, 2015 10:14 am

Hi Matt,

Modifying or creating geometry in RealFlow through scripting and graphs can be a bit tricky.
This is the approach I would try:
  • I would start with the original geometry (duplicated).
  • I would set all the UVs of the mesh to (0, 0). I'd use them to store the "wet" value.
  • Next steps are for every frame.
  • Whenever my "wetmap" algorithm detects a hit I'd set that vertex UV to 1. I'd ignore the second component.
  • I would iterate through all the vertices to decrease a little bit the UV value to simulate the decay.
  • export the mesh and use a ramp material to change the specularity, opacity, or whatever fits better in your case.
Alex Ribao
RealFlow Team
Next Limit Technologies

deadalvs
Posts: 5
Joined: Wed Sep 15, 2010 2:33 pm

Re: wetmaps as geometry

Post by deadalvs » Fri Jan 30, 2015 12:40 pm

Hi Alex,

I'm not really a very experienced realflow user, just got a test version from Gus.

Thanks for the input. But I'm not sure to which mesh you would apply this to.


I've had a quick look in the HySPH docs about the 'wet particles' that could be used too, but I want a mesh as an output, not particles.

I assume this doesn't exist, so it would probably be a feature request, right?
I made a quick image here:
https://www.dropbox.com/sh/etp8b3bwr8go ... reRLa?dl=0

The idea would be to have realflow create a new mesh on top of the collider geometry that has the purpose of holding that wet information in a new flat 'sheet/layer' mesh (1 poly thick) that's slightly offset to the collider surface.. this does not exist as a feature, right? (just want to make sure..)

The beauty of this would be to have a complete independent mesh that just defines all wet areas (with the wetness values as a new texture), but be independent of the UVs of the base collider mesh.

User avatar
gus
Site Admin
Posts: 276
Joined: Thu May 27, 2010 2:31 pm

Re: wetmaps as geometry

Post by gus » Mon Feb 02, 2015 1:05 pm

Hi Matt,

Definitely an interesting topic.
Would it work if instead of generating another geometry, the end result was just the polygons in the areas where the wetmaps have a non zero input?
That might be possible.

g-)
...........Gus Sánchez-Pérez..........
RealFlow Product Manager
Next Limit Technologies

deadalvs
Posts: 5
Joined: Wed Sep 15, 2010 2:33 pm

Re: wetmaps as geometry

Post by deadalvs » Mon Feb 02, 2015 6:15 pm

Hey Gus,


Sorry if I was unclear .. That was exactly the idea.

I was talking about a new fluid mesh that only exists in places, where the wetness is > 0. Where there was some wetness, but it dried, the mesh would be dissolved too.

Basically that new mesh should be just 1 poly flat (sitting just slightly on top of any input geometry) instead of having a finite volume and 'thickness' as a standard fluid surface. Notice that it should sit a lot closer to the input geometry's surface than the collision margin of ~ 0.5*particle radius. The reason is of course that the 'wetMesh' should sit VERY close to the actual surface, like 0.1 mm or so (to not introduce weird render artifacts).

See wetMesh.png here:
https://www.dropbox.com/sh/etp8b3bwr8go ... reRLa?dl=0

blue: fluid mesh
orange: wetMesh

This would be awesome .. :)

Matt

Post Reply