Method to Create a Mesh that is Inset by a Specific Distance

Alright, this is probably something fairly simple for those well-versed in mesh/vertex manipulation but I’m having trouble wrapping my head around a solution and haven’t found anything else close enough to my problem to get me started in the right direction.

I have an existing mesh plane, which could be either a rectangle or any convex/concave polygon. What I need to do is create an identical mesh, and then effectively scale that mesh down to create a border of ‘d’ unit distance between the edges of the original and duplicate mesh. Does anyone have a best practice for doing this?

Thus far I have duplicated the original mesh which was straightforward enough, but I haven’t worked with manipulating vertices/etc enough to just dive in without a little further direction. Normally, I would simply scale an object down by hand until it “looked right”, but in this instance it needs to be inset dynamically at runtime by an input value, and be physically correct. Thanks for any help in advance, I’ve been racking my brain to try to figure it out but graphics programming isn’t my forte and I definitely want to nail it down!

If you calculate a normal for each vert based on the normals of each triangle it belongs to you should be able to transform the vert along that normal.

Not certain it will give the result you are after (as to get a constant distance between the points surface you would need to do more than), however depending on your meshes it might be adequate.

I will give that a shot, thanks Johnny!