Jump to content

When Terrain is selected the editor is painfully slow


klepto2
 Share

Go to solution Solved by Josh,

Recommended Posts

If i load the 'The-Zone"-map the performance for navigating in the Perspective viewport is fast. But when i select the terrain and try to navigate, the controls begin to feel laggy. If i select any other element in the scene, the camera-navigation is smooth again.

  • Intel® Core™ i7-8550U @ 1.80 Ghz 
  • 16GB RAM 
  • INTEL UHD Graphics 620
  • Windows 10 Pro 64-Bit-Version
Link to comment
Share on other sites

This occurs because the selection outline works by rendering the object to a second camera. I suspect the bottleneck there is the fragment shader. Maybe I can just use the depth buffer and disable the fragment shader, since it isn't needed in the selection outline pass.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

  • 1 month later...

Obviously, this is caveat-ed by the fact that I am running the engine on Linux, however this was an issue too on Windows hence the topic...

When the terrain is selected - for instance for painting textures; sculpting etc. The editor is extremely slow making the painting process for detail layers (paths for instance) hard to complete.

Link to comment
Share on other sites

Yeah i also noticed that and also filed a bug report: 

 

 

An idea for @Josh: Maybe just render a simple plane with the terrain matrix applied to the selection buffer. This will not be optimal as the outline is just flat, but will hopefully solve the bottleneck. Or there must be some other indicator for terrain selection.

  • Like 1
  • Intel® Core™ i7-8550U @ 1.80 Ghz 
  • 16GB RAM 
  • INTEL UHD Graphics 620
  • Windows 10 Pro 64-Bit-Version
Link to comment
Share on other sites

Duplicate report, as mentioned above.

This is a design issue and I don't know yet what the solution is. I also wonder if making terrain selectable at all is a good idea, since it can be awkward during editing. I can think of a few solutions:

  • Make a separate selection tool. This effects the entire workflow and I don't think I like the idea.
  • Just allow one terrain per level, like Leadwerks does.
  • Make a selection lock button. Does not solve the problem described here, but it does solve the issue of accidentally deselecting / selecting the terrain.
  • Make selection require holding down the control key.

I'm cautious to make any changes right now until we figure out the right decision to make.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

How about a terrain edit mode that means the terrain selection is only available at certain points like for instance create terrain with a add/move/edit (size, height, import etc) selection and allow the painting of the terrain (and presumably the vegetation layers) to happen as it does now as part of the general workflow? I get the feeling that the issue is exasperated by the terrain being selected and the mouse tool panning over that so not having the terrain selected unless you need to move it or edit its size or add more terrain might help...

Link to comment
Share on other sites

Just a sidenote: One thing that highly improves the editing (at least in my case) is to switch to single viewport while editing the terrain. Which makes absolutely sense, as only one viewport needs to handle the costly wireframe selection rendering. 

  • Intel® Core™ i7-8550U @ 1.80 Ghz 
  • 16GB RAM 
  • INTEL UHD Graphics 620
  • Windows 10 Pro 64-Bit-Version
Link to comment
Share on other sites

  • 4 weeks later...
On 11/21/2023 at 5:46 AM, klepto2 said:

Just a sidenote: One thing that highly improves the editing (at least in my case) is to switch to single viewport while editing the terrain. Which makes absolutely sense, as only one viewport needs to handle the costly wireframe selection rendering. 

I changed it so that even if the option for "render during drag" is enabled, the terrain editing will not cause other viewports to redraw until you release the mouse. I believe this fixes the issue reported here.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Sorry Josh, this doesn't seem to have solved the issue. Even with an (admittedly very large) empty map it is still very slow...

I have removed all textures so this shouldn't be an issue when you test your end but hopefully you will be able to reproduce this at your end - as soon as the terrain is selected for painting it becomes very slow.

 

1451298458_Mountainsandtarns2048.zip

  • Thanks 1
Link to comment
Share on other sites

The problem is not related to culling or the vertex pipeline, because if I fly underneath it and look up so I am looking at the backside of the polygons, it runs just fine.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

  • 1 month later...

I think there is still an issue. I just bumped it because this is one of the things that can maybe be solved in a couple days.

The remaining bugs in this forum are all more involved, and I try to do the easiest fixes first.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Huh well if its not been looked at or fixed then the issue may have gone away from something else being fixed as there is a huge difference between the last time I tried this map and now - I can work with it and I couldn't so something has changed somewhere! If I find anything else I'll comment here again...

  • Like 1
Link to comment
Share on other sites

 

On 12/16/2023 at 4:44 AM, CJO Games said:

Sorry Josh, this doesn't seem to have solved the issue. Even with an (admittedly very large) empty map it is still very slow...

I have removed all textures so this shouldn't be an issue when you test your end but hopefully you will be able to reproduce this at your end - as soon as the terrain is selected for painting it becomes very slow.

1451298458_Mountainsandtarns2048.zip 9.96 MB · 1 download

The map posted above runs fast when it is not selected, but performance slows down badly when it is selected. Behavior seems very odd, like it is disproportionately slower than simply a 2x render should be...

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

  • Solution

The terrain shader was not set up to handle when a camera has lighting disabled, so it was just accessing random video memory in the light render function.

It's super fast now. You need to sync your project to get the new shader.

  • Like 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...