Rotate vectors via vector map from Modo

Discussions about SOFTIMAGEs© Interactive Creative Environment©
Pancho
Posts: 659
Joined: 19 Sep 2010, 09:28

Rotate vectors via vector map from Modo

Post by Pancho » 19 Feb 2012, 22:51

I've got a small problem with the vector math for this project.

In Modo you can comb the hair by vector (direction) maps. Usually these maps exist in 32bit.

Now I want to alter the surface normal in such a way that the strands I create in Softimage are "combed" in the same manner as the guide hairs in Modo.

I create a strand (in an empty point cloud) for each vertex point of my mesh. With a get closest location compound plugged into a get texture map color I get the color of my direction map. Then I use a color to vector node in which the RGB values are used a X, Y and Z for a vector which is then normalized.

But I fail with translating the normal vector in the same manner as the hair guide in Modo. Usually translations of this kind are done by multiplying vectors, but somehow I miss something. Strands look everywhere, but not in the direction intended.

Could someone please shed some light on this?

Help would be highly appreciated!

Cheers
Thomas

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 19:11
Location: Zagreb, Croatia

Re: Rotate vectors via vector map from Modo

Post by Mathaeus » 20 Feb 2012, 01:24

Could be something with a method of storing the vectors. For example, normal map should carry both positive and negative values, using only positive colors, so it's re-scaled, values bellow 0.5 represent the negative values. If so, you'll need to multiply by 2 and subtract by 1. Maybe something with local-global cords...

If you can share this map, mesh and picture of desired direction, I believe I'll be able to find a formula, I think I'm already a small master :) in reverse engineering of this kind.

Pancho
Posts: 659
Joined: 19 Sep 2010, 09:28

Re: Rotate vectors via vector map from Modo

Post by Pancho » 20 Feb 2012, 09:00

I think I figured it out. If anybody wants to check it and report about it, fine. I realized if you disconnect the Y value in the color to vecor node (custom) all strands will be tangents of the mesh.

I used the compound in an empty point cloud, plugged the object in, chose the texture map with the direction map image and that's it.

Need to dig into this stuff more as I want to create some auto combing features. So far Modo sucked big time, and LW too, if you need to create flat, long hair on a body which curls or gets turbulized. Usually you end up with fur intersecting with the body, leaving bald spots on the body. I guess with a "growing vine/fur method" there could be a way to keep the fur from growing into the body.

BTW, Pooby just released two new ICE videos with a way to comb fur via curves. Seen this before, but unexplained.

Cheers
Thomas
You do not have the required permissions to view the files attached to this post.