Vector Field Map

   13360   8   1
User Avatar
Member
5 posts
Joined: April 2011
Offline
Hi!
I want to create a flowmap like in this publication - http://valvesoftware.com/publications/2010/siggraph2010_vlachos_waterflow.pdf. [valvesoftware.com]
Looks like it's vector field baked to 2D map texture. I'm new to Houdini. I learned few tutorials and even already learned to create simple fluids simulations, but I haven't got any closer to the solution of that pipeline. I even can not visualize this vector field… Can you advice?
Thank you!
User Avatar
Member
7709 posts
Joined: July 2005
Online
The screenshots look like just point normal manipulation a geometric grid. The point normal values are probably then just copied into the point colors.
User Avatar
Member
5 posts
Joined: April 2011
Offline
Ok. Lets going another way. How I can visualize vector field and how i can affect it's vectors?
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Visualizing attributes on geometry is only useful when you have attributes to visualize. Attributes come first.

As for directly visualizing a vector field as color on a surface, I can never make sense of them. I'd rather see the actual vectors but hey if you want to see them, that's straight forward.

If it is a default attribute supported by the Point SOP directly, say “N” for surface normals, just enable Color and put $NX $NY and $NZ in to the three color parameters. Now you can see the normals of your surface.

There are quite a few ways to visualize attributes:

Viewport Display Options is one way. You can hit “d” in the viewport. In the first tab, you can turn on any of the default attribute visualization controls. You can create custom visualization options including vectors which is how I would visualize vectors so that they make sense to humans and not game engines.

Remap attributes in to Cd using Point SOP or VOP SOP. Just type in the name of the custom attribute (with the mandatory detail signature) in the Point SOP Cd fields.

See the attached hip file for a couple examples.

Attachments:
visualize_vector_attributes.hip (88.1 KB)

There's at least one school like the old school!
User Avatar
Member
5 posts
Joined: April 2011
Offline
I already understand my mistake.
I use simple geometric grid and paint it's points normals by Comb operation.
User Avatar
Member
5 posts
Joined: April 2011
Offline
Hi! It's me again
For now, I really close to get vector field image.
my setup almost repeat Bronwen Grimes example
http://www.valvesoftware.com/publications/2011/gdc_2011_grimes_nonstandard_textures.pdf [valvesoftware.com]
from page 31

ok.
I already get all this stuff, and more, but I can't get one thing - visualization of flow map.
simply repeat page from doc
http://imageshack.us/a/img705/1323/gdc2011bronwengrimesnon.png [imageshack.us]

“The final result converts the x and y components of the vector field into color much the way we would store a normal map. (C.rg= N.xy* 0.5 + 0.5)”

as I can see, they use some AddAttrib node for that.
I can't understand how and why…

And, if I use Point node, and set
$CR = $NX*0.5+0.5
$CG = $NZ*0.5+0.5

I get this
[imageshack.us]

but I need something like this
[imageshack.us]

I get this map baking normals from final grid mesh using xNormal.

So…
I found this thread
http://forums.odforce.net/index.php?/topic/14573-converting-normals-to-tangent-space/ [forums.odforce.net]

Looks like I need to get tangent space normal map, but how?
Edited by - Feb. 4, 2013 11:04:10
User Avatar
Member
7709 posts
Joined: July 2005
Online
Just looking at your forum post:
- You should use $NY I think instead of $NZ?
- Try renormalizing the result

eg.
$CR = ($NX*0.5+0.5) / sqrt($NX*NX+$NY*$NY)
$CG = ($NY*0.5+0.5) / sqrt($NX*NX+$NY*$NY)
User Avatar
Member
5 posts
Joined: April 2011
Offline
edward
Just looking at your forum post:
- You should use $NY I think instead of $NZ?
- Try renormalizing the result

eg.
$CR = ($NX*0.5+0.5) / sqrt($NX*NX+$NY*$NY)
$CG = ($NY*0.5+0.5) / sqrt($NX*NX+$NY*$NY)

No, I need NZ as CG, because flow vectors goes in XZ plane.

for NY, as CB I just return 0.
User Avatar
Member
9 posts
Joined: Nov. 2012
Offline
Hi All,

I am trying to reproduce this houdini network.

http://vimeo.com/58231186 [vimeo.com]

Could somebody help me how to do it please

Thank you.
  • Quick Links