I have a bunch of figurines that are flat textures. In my game i will display them as 3D tokens / standees. This are place in a plane, then a mask hides the outer part that defines the figure.
But still they are flat like a paper if you move around them.
So i need to create an effect that gives them a bit of depth like a cardboard piece. Just a little like half cm:
You would most likely have to do a 4 way scan of the image
top to bottom,
left to right
right to left
bottom to top
checking against x and y coordinates are not of the key color (in this case white) and breaking the current loop once a different color is found incrementing the change. Slowly gathering a 4 way grid of x and y coordinates.
You would then have to transform them to percentages along the axis and use that as reference to build a procedural mesh. It would have to have the same starting ratio as your cutout. slowly adding points based on the converted percentages. Once the mesh would be build you would need to move each face out by it’s normals adding the extra white border around the character.
Thanks. It gives some depth though maybe not enough. I understand maybe there isnt a good solution for this.
Other than this i have another idea that is a bit of a cope , but it works:
Just create more instances of the same plane in the Z, like a deck of cards, and it creates the effect i need:
Those are just 6 more planes. I think its worth it.
Yeah I experimented with stacking them like that too and it looks ok when they’re close together - you can make them double sided which helps a bit too (may need to multiply the pixel depth by the “sign” node
Thanks. Though in my situation it relies heavily on Hierarchical Instanced Static Mesh. That means, if i use a procedural mesh then i cant instance it.
So far, i have the solution with normals of RecourseDesign.
Or duplicate the same instance of plane in the Z. Which is a bit of a cope though its an interesting solution and looks quite cool. Probably need to change its material to black, the ones that are duplicated below.