❀ DoN's Dynamic Mesh Effects ❀

Hiyo,

I’ve been able to properly “paint” my static meshes using the UV1 layer but I keep getting an error:

“Collision UV support is not enabled! Generating runtime positions texture for StaticMesh to obtain UV data…”

It provides tips for decal projection, which I’ve followed but I don’t use line traces for my hit events. Turning on Support UV From Hit Result doesn’t appear to change anything.

Adding Texcoords to my texture doesn’t appear to make this error resolve either.

Are there any other things I should look out for while using a projectile to paint decals on static meshes?

@LulzyKing - It sounds like your Hit events do not have their “Face Index” field set; the “Trace Complex” flag needs to be set to true as well in addition to the Support UV setting the message alludes to.

If you are deriving the hit events from another source (like a projectile) you may need to investigate how to ensure they carry face index (could require editor code changes to projectile sweep code, I’m not sure).

Ultimately if you are deriving acceptable performance for your usecase you can simply ignore the message altogether. It is primarily an optimization hint only :slight_smile:

  • Venu
  • After some quick testing, it appears to be because of the brush decal texture we wanted to use in our use-case. If we remove the texture it paints wonderfully and quickly with no issues of overlap or errors… The kicker being, we are unsure what exactly we need to implement to get the brush texture we want painting.

Do we implement it on the material itself we are trying to paint?

Or is there something we’re missing when plugging in the texture to the PaintStroke node?
(I even copied a texture from your example project, but obviously I’m missing something regarding the channels for the texture)

As stated before it runs wonderfully without the texture, the moment we add a texture to the paintstroke node we start to see degrading performance and get the error.

I have one last question that would remove my need for a decal…

Do you have a more detailed example of how you changed the sphere mask like in the below example?

I think I can work around the need for decals if I understood how this worked…
Currently I can get a custom render brush to work, but it’s not scalable and paints over the entire surface.

[SPOILER]
https://forums.unrealengine.com/filedata/fetch?id=1127946
[/SPOILER]

Any help would be super awesome and appreciated and thank you for the excellent plugin!

Hi @LulzyKing - the example you linked actually does use Decals and not a custom brush.

IIRC the texture decals are projected onto the alpha channel for that example and combined with some WPO manipulation on Z axis that is what produces the effect in the image.

Hello

Erase mode only works on stock material from the plugin (if Brush Render Material is empty)
Even if you paste the same material from the plugin folder (M_PaintBrush_Regular) then erasing does not work
Everything is erased completely and only one decal remains, the last one which was placed under the cursor

Hello,

I can run plug-in events smoothly in the UE4 editor,

But when I package it to the virtual reality device on my computer and trigger this event, it will cause serious blockage of my virtual reality image, but I can’t find the reason now.

I hope you can help me.

Hi, the plugin is unusable for me. As soon as I start painting on my skeletal mesh on my character the game loses all references to that character and I get “Accessed None” Errors. I am using UE 4.26.

Next game braker: Trying to paint on a mesh with per poly collision enabled leads to instant crash (UE 4.26):

[2021.09.06-16.34.04:878][748]LogExit: Executing StaticShutdownAfterError
[2021.09.06-16.34.04:879][748]LogPhysicsCore: Error: PHYSX: ( 0) eINVALID_OPERATION : PxScene::lockWrite() detected after a PxScene::lockRead(), lock upgrading is not supported, behaviour will be undefined.
[2021.09.06-16.34.04:879][748]LogPhysicsCore: Error: PHYSX: (D:\Build++Fortnite\Sync\Engine\Source\ThirdParty\PhysX3\PhysX_3.4\Source\PhysX\src\NpScene.cpp 3049) eINVALID_OPERATION : PxScene::unlockWrite() called without matching call to PxScene::lockWrite(), behaviour will be undefined.
[2021.09.06-16.34.04:879][748]LogPhysicsCore: Error: PHYSX: (D:\Build++Fortnite\Sync\Engine\Source\ThirdParty\PhysX3\PhysX_3.4\Source\PhysX\src\NpScene.cpp 230) eINVALID_OPERATION : PxScene::lockWrite() detected after a PxScene::lockRead(), lock upgrading is not supported, behaviour will be undefined.
[2021.09.06-16.34.04:879][748]LogPhysicsCore: Error: PHYSX: (D:\Build++Fortnite\Sync\Engine\Source\ThirdParty\PhysX3\PhysX_3.4\Source\PhysX\src\NpScene.cpp 3049) eINVALID_OPERATION : PxScene::unlockWrite() called without matching call to PxScene::lockWrite(), behaviour will be undefined.

@Zulranty

Good catch. This behavior is currently hardcoded in DonMeshPaintingHelper.cpp’s PaintStroke_Internal function and reflects earlier usecases before erase functionality was actually added.

I will rectify this for the 4.27 update. If you’re comfortable with code you should be able to fix it yourself relatively easily inside that function too.

VR is not supported for this plugin as it has never been tested for those platforms.

Some users have reported being able to run it (search this thread for posts by other VR users), but there is no formal support for this.

@hGosling

I have been unable to reproduce either issue in the sample project, nor has this been reported before by other users, so this sounds like a project specific issue where some project setting within your project (probably Physics or Animation) is conflicting with the plugin’s implementation method of cloning your reference skeletal mesh for creating a “positions texture” lookup map.

I had no issues with Per Poly Collision on the 4.26 sample character as well.

If you can remember any project specific setting that you modified for this project that will be helpful in understanding what specific setting is causing the incompatibility that you are seeing. The logs themselves are not useful as they are low level phsyx logs that indicate a race condition of some kind arising in your setup.

As a quick workaround you can try disabling the flag DON_BUGFIX_FOR_MORPH_TARGETS_POSCAPTURE_ENABLED in the file DonMeshPaintGlobalActor.cpp which reverts to an older technique that doesn’t work for morph targets, but is simpler in implementation and may avoid whatever race condition is getting triggered in this particular setup.

Just as info for everyone who wants to start prototyping with this fine plugin in UE5EA: As far as I can tell it works just as before and porting is a pretty straightforward process if you’re familiar with how to manully copy plugins and fix code in your IDE.

The only incompatibility I’ve found in code so far (and that prevents the editor from auto building the plugin for UE5EA on startup after copying) is in DonMeshPaintingHelper.cpp.
In UE5, the FHitResult struct was slightly changed, what was FHitResult.Actor became FHitResult.HitObjectHandle.

So, for example,
requestAsHit.Actor = PrimitiveComponent->GetOwner();
becomes
requestAsHit.HitObjectHandle = FActorInstanceHandle(PrimitiveComponent->GetOwner());

On first build in IDE, the build process output will only list all the instances of that kind that resulted in an error, so it’s just a simple double click and quick fix in this regard.

After build, I’ve successfully migrated the demo project content to an already existing UE5 project and all functionality in it behaves as it should as far as I’ve tested.

Paint on! :slight_smile:

@ HaBe2305

Thank you so much for taking the time to share this information! Greatly appreciate it :slight_smile:

Also appreciate your positive feedback on the plugin. Thank you :slight_smile:

ps: Paint on indeed!

1 Like

Hello! We would like to add mod support to our game, which features this plugin. We haven’t actually made a mod kit yet, but can you advise me on how we should handle the plugin? I’ve found very little information on what we as developers are supposed to do with regards to using paid marketplace plugins in a game that will be moddable. I saw one person saying that the plugin would need to be cooked into a pak file, but no other follow up to that. Any information would be greatly appreciated. Thank you!

Hi, could you share how you got per poly collision working? I just tried it on the standard 3rd person template and get instant crash when I try to paint on a skeletal mesh with per poly enabled. I can see the brush stroke for a second before the editor crashes.

You can download and test my project if you like here: https://we.tl/t-UkYJ3jzo8m (Paint using E Key)

New Development begins, Unreal Engine 5 updates released!

All, I’m excited to announce that new development for this plugin has commenced.

The marketplace product has been updated to 5.0, 5.1 and 5.2, but this is only the start.


New Game Templates / Sample Projects

Game templates featuring this plugin will be released soon along the following themes:

1. Paint Game

A game based around splashing paint across levels. This was requested by a user earlier and I thought it would be useful to all users to create a game template along these lines featuring the plugin’s various painting workflows and features.

2. Pixel collisions - Player & AI Navigation

My own game makes extensive use of painted holes on 2D surfaces (like leaves) which both players and AI need to navigate around. I find this to be a very fun and interesting gameplay aspect and felt that a game template around this would inspire users with effective ideas and strategies for using this successfully in your own games.

3. Pixel collisions - Elements of Nature

The idea is to have players paint various elements like Water, Grass, Mud, Swaps, Steam, etc (as examples) on the landscape and have both Players and AI react to these landscape surfaces.

4. Character Creator

A character creator featuring this plugin! Aside from painting, Stamping Text onto character’s clothes is another showcase planned. The goal here is to overcome existing limitations around painting on Cloth and provide workflows that show what is currently possible.


Bugfixes

This is also an opportunity to addess any critical bugs and / or workflow issues.

If you are facing any issues that need fixing, this is a great time to report them.


New features - Requests are welcome

Inspiration and usecases for new features are also welcome at this time.

This plugin was made with the goal of being a one-stop-shop for any kind of runtime mesh painting functionality, so any related usecase that you require would be a great candidate for addition.

That’s it for now, but stay tuned to the youtube channel which will showcase any game templates made using this plugin and other exciting new developments! :slight_smile:


Venu Available for Hire

Just a final footnote to this post - I’m currently available for hire!

If you looking for an experienced UE Coder / Generalist to fulfill a part-time or full-time remote position, please do not hesitate to get in touch with me! :slight_smile:

My email is listed on my marketplace profile, you can also feel free to drop a PM here too! :slight_smile:

Thanks to everyone for your patronage of this plugin over all these years!

With Love,
Venu

My sincere thanks to the customers who’ve purchased this plugin since the 5.2 plugin update went out!

In case you face any issues using the plugin at all, please reach out either on this thread, via PM or via email (listed on my marketplace profile above).

As a reminder, I’m taking new feature requests for the plugin at this time so this is a great time to send any requests/reports that you may have during this phase of new development :slight_smile:

Thank you!

Hi! Super cool that you work to update for version 5. Do you have an ETA for version 5.3 ? I’m currently trying to recreate some of your wonderful plugin features, but I’m struggling with collision. So i’d rather use Don Mesh Painting! Thank you!