BlenderProc
BlenderProc copied to clipboard
[QUESTION] How add decals to textures
Hello,
Thanks for developing this awesome tool. I was wondering how to add decals to textures in BlenderProc. If there's no way to perform this, I'd like to request this feature.
What I want to achieve is to randomly place dirt or damage decals (also randomly generated) on a model texture to simulate imperfect objects. I'm aware of MaterialUtility.infuse_texture method, but this rather "blends" two textures together. I'm looking for a method that overlays one or multiple small textures over another texture.
I'd appreciate if you could share any insights on this topic. Thanks in advance!
Hey,
a great question. I thought about it a bit.
You should use the multiple UV map feature for this, allowing you to position multiple textures on one object.
These can then be selected via the UV Map
shader node, and then you just have to fuse them as you have seen in the infuse_texture
method.
Does this help?
PS: We are always looking for contributions ;)
Best, Max
Hi Max,
Thank you for your reply and suggestion!
I feel that using multiple UV maps and the infuse_texture
method with 'overlay' option would work. I'll play around with the codes and see how it goes.
On the other hand, I was imagining another method where we project decal textures onto model geometry. An example this would be bullet hole decals on objects in shooter games. I also found a three.js demo doing something close to this. Is this possible to do in blenderpy / BlenderProc? Would love to hear your thoughts on this approach too :)
Hey,
That sounds like a plan.
To do it interactive in the blender GUI? Or to do it automatically in the code with bpy and bproc? In the code should work as you described.
Best, Max
I meant doing it automatically in bpy & bproc. Thanks for your feedback, I'll also dig into the second approach.
Looking forward to your results ;)