Massive performance impact with brush-based tools in new terrain editor

Description:
When using a brush-based tool in the terrain editor, IE: any tool which creates an object in the viewport which follows the cursor. A massive constant lag-spike starts to occur, making the tools absolutely un-usable. This lag spike was not present in the old terrain editor.

Affected Tools:
image

System Info:
CPU: Intel(R) Core™ i5-8400 CPU @ 2.80GHz
GPU: NVIDIA GeForce GTX 1050
Memory: 16GB

Microprofiler:
image

I have attached a much more detailed microprofiler dump in the private-message.

Enabled beta-features:

Expected behavior

I expect no major performance decreases to occur when using brush-based tools just like the old terrain editor.

A private message is associated with this bug report

3 Likes

Wooo! Thank you for this, been waiting on someone to post this exact bug report for months.

I have the same issue, makes terrain completely unworkable. Also had zero issues with the previous terrain editor.

Just selecting a tool is enough to start it, don’t even have to interact with or otherwise modify the terrain. Goes away as soon the tool is deselected.

For me the select, fill, and transform tools are also affected, but only when you move them, as opposed to the others that are constant.

4 Likes

Found someone to take a look! We’ll update you as soon as we can.

2 Likes

Looks like you’re in luck today! Changes that fix these issues rolled out today. Restart Studio to make sure you have the most up-to-date flag configuration and you should be good to go. If you’re still experiencing issues, let me know.

The new Terrain Editor should be as fast if not faster than the old Terrain Editor. The cursor syncs properly to your mouse, and tools have been properly optimized. Cheers!

2 Likes

Unfortunately, I am still seeing significant frame drops when using the cursor-based tools; not as severe as previously but it appears that the tool is still causing problems performance-wise. :smiling_face_with_tear:

Reached out in DMs for further information!

Yeah so it seems one of the APIs that doesn’t need to be called is being called, that being plugin:SetSetting. I’m going to update it so it doesn’t call that method when the brush position is updated, because it shouldn’t need to.

Edit: This should be turned on and fixed in two weeks. That being said, the base tools should already be a bit faster now.

1 Like

Hello, Valence.
Do you know if this issue is resolved yet? I am still experiencing the same Issue unfortunately.

This should now be fixed! Please make sure to restart studio if you’re currently in a session.

2 Likes

Definitely much much better for me and the lag that occured from just having the tool selected is completely gone.

It’s still somewhat present when using some of the tools at larger sizes. For example the sculpt tool lags at max size and makes sculpting a little slow. I’d expect my hardware to perform better, but honestly this has been a massive improvement overall so I’m very happy, thanks a bunch.

Here’s my system info.

CPU: Intel® Core™ i9-13900K Processor
GPU : AMD 7900 XTX
Memory: 32 gb

Glad you had a good performance uplift with the most recent update! Unfortunately any hardware is going to struggle at the full brush sizes since we’re currently limited to single-threaded Lua for actually performing these brush actions. We’re pretty close to the limit in terms of the optimizations we could have added.

We may be able to convert this into a multi-threaded process in the future (which your high core-count processor would benefit from), but we’re still a bit for off from that, because we can’t use parallel Luau in the plugins we ship.

3 Likes

yeah i’ve had the same issue, it kinda fixed itself somehow sincr i stopped getting them after like a week, weird