0
$\begingroup$

I would like to make a texture that could reflect that change of every vertex of the mesh making red values = X-axis, Green values = Y-axis, blue values = Z-axis

so the changes only will be when shapekey is in 0 and when it is in 1 like this imagesenter image description here

I need them to be on .Png format (since i know their limitations, I would like something like 1 on red is 1 meters, 0.5 0.5 meters an so on) this is because i dont think the morph will move more than 1 meter. I still think one meter is a lot for the image i showed.

and since it can have negative values i think the perfect would be making them at start point grey and if it is black will move to -axis and if it is white to +axis.

I can not use .EXR since the program i used dont support it that is why i would like png.

also i would like just to record the movement so if the part does not move the texture wont change and it will be gray.

sorry if i added a lot i just wanted to be as specific as i can thank you so much.

enter image description here

$\endgroup$

1 Answer 1

2
$\begingroup$

It sounds like you want to turn a shapekey into an RGB displacement texture?

First, we have to assume that you don't have any vertices that occupy the same UV.

After that, it's probably easiest to use geometry nodes and a custom material to measure the displacement. We might use something like this:

enter image description here

Copy of the model, pinned to Basis, on the left. On the right, model with pinned shapekey, reading the difference in position between the other model and it. This gives us a vertex attribute that we can use as an RGB displacement map by baking the texture:

enter image description here

Which we test on the right, on a Basis pinned copy, using RGB displacement-- and find that it agrees, except for that facts of which you're aware, which is that a png goes from 0 to 1, so we can't represent displacement greater than 1 unit.

If we need to remap to a different space? We might bake a texture like this:

enter image description here

Which now remaps our displacement such that -2m corresponds to 0 (black), while +2m corresponds to 1.0 (white), and no change corresponds to 0.5 (our "midlevel.")

Even though your shapekey may not represent a change greater than 1m, it very easily might include changes of negative meters-- that is, in a direction opposite your positive axes-- so some remapping is likely necessary.

$\endgroup$
5
  • $\begingroup$ what does it mean shapekey on the attribute node? i am trying to follow but my model still looks black. and if it have errors how could i do the remapping? thanks in advance $\endgroup$ Feb 7 at 4:19
  • $\begingroup$ and also when i dont move any vertex the vertex count is o.73725 instead of 0.5 do you know why does this could happen. thank you $\endgroup$ Feb 7 at 5:03
  • 1
    $\begingroup$ @Animepro266 I'm sorry, I don't understand what you're saying or asking. $\endgroup$
    – Nathan
    Feb 7 at 6:12
  • $\begingroup$ oh sorry i will try to explain better when i add this -2m corresponds to 0 (black), while +2m corresponds to 1.0 (white), and no change corresponds to 0.5 (our "midlevel.") 0.5 should be if i dont move vertex in any way right? because its our midlevel. but i get on the texture this color on each channel 0.73725 even do i dont move the vertex to any point. I just did a morph that do not move in any way to test the midlevel. yours have 0.5 in color when you dont move any vertex? or you obtain the color i have? $\endgroup$ Feb 8 at 6:04
  • $\begingroup$ Bake as non-color data. $\endgroup$
    – Nathan
    Feb 8 at 6:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .