Surface modification

Technical discussions
Post Reply
Doc Grey
Posts: 1
Joined: Wed Sep 06, 2023 12:36 am

Surface modification

Post by Doc Grey »

Hi

We have an app for modelling dentures. The objects are imported via .obj format. I need functionality for smooth modification of surface in an isolated area. Any suggestions for doing this in dgk?

Thanks

Prashant Kande
Posts: 121
Joined: Mon Apr 04, 2016 4:55 am

Re: Surface modification

Post by Prashant Kande »

The surface is mesh, obviously.

Have a look at the MeshMods sample. OnApply() there uses IVertex_DG to translate its position. The old normal of the vertex is a good candidate for direction of translation.

Morph sample performs this also in the Current Vertex group of controls.

To make a smooth modification in proximity of a surface point, you could build some smooth function, which depends on 3D distance of vertex to the surface point such that it diminishes to zero at some distance. You could multiply a fixed offset by this function value at each vertex. This would define a localized smooth surface offset.

Perform recalculation of normals in the end like demoed in the OnApply(). Rendering of a mesh is sensitive to normals.

When this works you could also do some optimization to list vertices which belong to the sphere where the function is not zero.

Regards

Post Reply