re skin and bones

New releases and general discussions.

Post » Fri Feb 27, 2009 11:34 pm

I was playing with the distort map trying to figure that out, when I got the idea to apply a depth map, or bumpmap to set the displacement of a sprite on bones like in davids example:
If you could read the pixel color values of a depth map you could use that info to set the displacement of the skin. It might be much easier to set how much, and where to set the skins displacement this way.

You would have to read all the values for every pixel, set up an array to save what the value was for each individual pixel, then read the array and compare each.
Like wise you would have to set the displace map(in Construct) to sprite.height = rows, and sprite.width= columns, then have an event to convert the array x,y values to column, row, x, and y of the displacement map in Construct.

So if x,y pixel of the depth map is white, set the x,y displacement of the skin to its highest predefined displacement, then the lowest for black, and gray somewhere in the middle.

Of course you couldn't do this all the time, but you could read and save the info at the start.
And it would not have to be black, white, and gray, but grayscale.

This image shows how it could create constrains, but showing how it would set gray values is a bit harder.
Image ImageImage
Posts: 8,220
Reputation: 105,059

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 1 guest