Hi,
is it possible to rotate an instanced object according to the UV of the mesh? For example the instances should all point towards the V value of the meshes UV. Basically similar to a flow map.
I believe this can be done with the "align Euler to vector " node. Plug this into the instance rotation, and plug the UV into the vector input. You can then pick which axis to align.
In some cases, you may have to capture the UV on an earlier geometry to get it to work.
What you need is the tangent vector information, and geonodes provide neither the node input for mesh tangent, nor the easy way to calculate it.
The main problem here is (I think) the inability of Geometry Nodes to access information of more than 1 vertex at a time. Tangent calculation relies of finding “neighbors” of a vertex. Either by their index or I guess the face they belong to
I can only theoretize how it is possible for non-deforming meshes. With them, you can first bake the global positions of vertices into texture map. Then, you could put this map into Geometry nodes, and use it to calculate the direction from every mesh vertex to the point at a certain U offset (like, 0.01 to the right). This will be your “bitangent” vector. Finally you can find the tangent by calculating a cross product between the bitangent and normal.
wow, that is a lot of valuable information, thank you. The only reason I want to rotate along the UV coordinate actually is for creating a vertex tangent. So you are saying Geometry Nodes hits a limitation there and that might not be possible ?
At least in Blender 3.1 GN, there is no built in Tangent node. Maybe it will be added in the future. Or it is possible through some complex hack. I’ll tell you in this thread if I’ll found out something.
By the way, so you are trying to render a flow map? I probably misunderstood your post as wanting to control something in geonodes/particles using existing flow map
And if your goal is only to generate a flow map, you can recreate Houdini setup in the video with Blender hair particle system and a shader which visualizes normals of the object. Two important points when setting up the hair system: while combing it, play with Deflect Emitter value so the hair stays roughly 45 degrees to surface. And for hair shape, select Render as Object and use a plane as instanced object. Then, if rendered from top down orthographic, you’ll get a serviceable flowmap. I’ll attach an example
ah, @LordoftheFleas this sounds like a pretty good idea, I should give this a try. @DeckardX08 my main goal is to create a Tangent and Bitangent for a deformer setup I’m trying to build. And since there are infinite Tangents per vertex, I thought “picking” one based on UVs might be an option.
Here is my current setup of my deformer: postSculpt_005.blend (1.8 MB)
At the moment, I’m creating tangents based on next Index vertex. This is obviously wrong, and doesn’t give correct deformations. However I’m just glad that the deformation at least now lives on “tangent space” and I can add sculpted fixes let’s say on top of an alembic cache
hahah, I doubt it, I’m fairly new to geometry nodes and also been trying for ages now, I just keep thinking this tool became so so powerful, there must be a way to achieve that
I gave it a go, and it seems to be working damn nice. I don’t understand the magic you did in there at all. thanks so much again.
here is the latest blend with your tangents applied in order to do some sculpting on top of a deformed mesh: postSculpt_006.blend (2.0 MB)