Hello again,
After looking for inspiration from videos of other game engines’ development workflows I came across a feature that allowed the developer to project decals onto complex surfaces. I found the idea quite interesting and I thought to myself: “hmm, I wonder if that’s possible to do in Roblox”. And so I set out yet again to develop another plugin.
Introducing: Decal Surface Displacement
"So what about it?" - For ages now it hasn’t been very easy to place decals properly onto complex surfaces without using external programs to pre texture those decals onto the model. But with this you can do all of that right inside Roblox Studio. Here are some examples:
How it works
The plugin uses mesh deformation and raycasting to displace planes onto surfaces.
How to use
Well the first thing you need is the plugin of course. After installation 3 new buttons will appear into your plugin toolbar.
These 3 buttons insert what I call “Decal Planes” into your workspace. These planes are meshes with armatures to allow for proper mesh deformation. The different resolution (res) means the amount of bones the plane has: 5x5 = 25, 9x9 = 81, 17x17 = 289. The higher the resolution the more performance heavy each plane will be. Lower end pcs might have difficulties calculating the displacement in real time.
Each of these planes has 3 custom attributes you can manage. Here is the list of all of them:
Bake = Stops the plane from deforming and keeps its current shape at all times.
Offset = How much the plane is lifted from the surface normal.
RayRange = How far the RayCasting reaches.
And since the planes are MeshParts they of course support the SurfaceAppearance feature. So if you want to give your decals PBR properties you can very well do so.
Because the plugin requires quite heavy usage of mesh deformation I would advice against any heavy usage of them. The decals can leave a serious dent in performance if not used at a reasonable rate.
And that is pretty much all there is to know about it. If you’re interested then please give it a shot! I would also love to hear what you think. If you have any issues to report or any ideas to give then do let me know.
Side note:
15.5.2021
The Cage Mesh Deformer beta feature seems to stop the plugin from working properly. I recommend turning it off for the time being if you’re experiencing issues with it turned on.
You can find my other plugins here:
Thank you! : )
-Sol