I’m having issues getting this plugin to work on simple walls and floors for a blood splatter effect. (using 4.23)
Basically I have a blood splash static mesh that has a collision object. On overlap I call paint stroke and pass the hit object.
I’ve tried the XY YZ local space work flow (nothing appears or paints the whole mesh) and the Don_Mesh_Paint_UV1 (current approach as per the wall demo).
What I’m finding is the texture isn’t painted as accurate as the demo. I have to make the brush size quite large for it to even appear. In addition, I’m using the lightmap workflow as UV0 overlap but the painting can happen on the other side of the mesh.
The collision hits on the bottom right (the blood dots are a static mesh being shot across) but the painting appears elsewhere (top left). I had to rotate the mesh for it to even appear on the correct side. My light map UVs do not overlap.
Hi Bino, can you share a screenshot of the UV1 channel for your wall? The material looks fine so more information is required to diagnose this issue.
Alternatively if you can send a small, self-contained sample project demonstrating the issue to the support address (or PM here) that will enable much faster analysis and resolution.
Local Space nodes:
While Local Space nodes are indeed insufficient for your usecase (as you need to paint both sides of the wall), it is well worth fixing whatever issues you were having there. Make sure that you delete all unused Don UV nodes in your material. Currently even if a Don UV node is not connected (mostly when you’re experimenting with different workflows), it ends up getting picked up by the material editor code and this is a common cause of the Local Space nodes (or indeed other nodes) not working as expected.
I was using a Component Overlap event and discovered the hit result had no actual data for the PaintStroke function. Using a Hit Event and receiving actual hit data the painting occurs at the correct spot. I haven’t tested the Local Space nodes but I’m sure they work ok now.
Excellent work with this plugin! I’ll leave a good review.
I love your plugin, it’s great
But I had one question. Your plugin is being used as a damage system for my characters. When my NPC dies, the corpse spawns, and the NPC itself is removed, this is done for my save system. I can’t understand how to transfer damage from the NPC to my spawned corpse, can you tell me a solution?
Will forgive me for my English
Hopefully this plugin isn’t dead - no update for 4.24
In the chance you’re still around…
I’m able to use the Don_Mesh_Paint_UV1 node successfully for walls, floors and random static meshes. However building everything (lights etc) some walls no longer draw the texture. If I move the failing wall and try again without building it works.
I’ve stepped through the paint stroke C++ code and it’s successfully drawing as far as it’s concerned.
Ok I think I found the issue. It’s not painting because there are multiple material slots on the static mesh. If I edit the mesh and remove all but one of the material slots it works every time after building lighting. I’m not sure why this is the case - I need to look at the code a bit closer.
Looking at a previous issue raised you suggested that every material slot have the a Don Mesh node. I can confirm they all have that.
I’m going to leave this for a bit hoping you return to this plugin.
Hey @rohanbabuam
It feels abandoned unfortunately. No response from the developer on here, email or the marketplace. I have it running on 4.24 with a custom change in the code so it compiles. I’m having issues with static meshes with multiple materials. Others are reporting bugs.
So yeah, it works but has some issues and you’ll need to make a change so that it compiles.
Assuming this plugin has been forgotten. Hopefully is ok.
I have this working in 4.25 preview 7 but you’ll need to make code changes.
In DonMeshPainterComponent.cpp you’ll need to change const TArray<uint8>* uncompressed; to TArray<uint8, TSizedDefaultAllocator<64>> uncompressed;
Anywhere *uncompressed *is used you’ll need to change “->” to a “.”
There was another change I needed to do for 4.24 but I don’t remember. It was pretty simple.
Still doesn’t work with meshes with multiple materials but I’m just going to bake those mesh to use a single material. Probably better for VR performance anyway. The new polygon editing tools in 4.25 make that super easy.
I got the plugin working on the release version of UE 4.25, and it does work on Procedural and Runtime Mesh Components. My issue is that it only works on tethered VR. Once I deploy to my Quest and test it, I get a framerate dip, and none of the painting is applied. I’m curious if anyone else experienced this issue on mobile VR.
Did you have any luck working this out? I was doing an optimization pass on my assets and found that my master material containing the Don Mesh nodes was bringing in a 2K texture for every model using it. I had little scene static meshes taking up a lot of memory. I ensure only meshes that need this node use it and may even reduce the size of the texture the DonMesh node uses.
Anyone else finding a frame lag issue with the 4.25 version? Applying paint stroke lags for half a second before returning to normal. Opacity and world offset are being modified, using uv0 on a skeletal mesh… Second Uv layer was added but I’m not sure what is causing the half sec freeze… Any ideas anyone?
Is your character using a master material for all its materials without explicitly disabling painton unwanted layers? So far this is the most common cause of most performance issues.
thanks for the prompt reply… it is using a new project with most of our code migrated over for the move. But generally most things are the same. Except our models are changed, we are now using cc3 imported models… so they have a lot of their materials separated on their body… (nails, eyes x2, head, arms, legs, body, cornea x2)… they are all needed to lerp to a dmg texture. Is there a way to spread out the paints between them asynchronously or something?
But I believe our older project also had a high amount of paint applies per hit too (even with cloth layers, my older previous post here was an example), but nonsuch lag.
I might upload footage soon of before n after…
And I’ll check back after looking at that sample project you linked…
thanks again
Usecase & workflow:
That’s indeed a lot more materials than I’d envisioned for the plugin. Unless explicitly disabled for paint, every material of your character (including attached props) will contribute to performance cost (per stroke) and additional texture memory (as a render target). If you cannot disable certain materials I would at least override the UV templates for those instances to use a lower resolution template as they probably don’t need a 1024 (or higher if you bumped up the res) resolution. See this article for changing the resolution of UV templates.
Performance across versions:
Definitely interested in learning about your previous results to confirm any performance degradation across versions.
Which engine version was your previous testing conducted from?
One interesting thing you can is to open DonMeshPainterGlobalActor.h and toggle the flag DON_BUGFIX_FOR_MORPH_TARGETS_POSCAPTURE_ENABLED
which switches between two different implementations specifically for character painting. This flag was originally introduced in 4.22 but disabled in subsequent versions.