1 (edited by XiaWuchu 2023-02-28 08:36:29)

Topic: Error:Could not allocate memory: System out of memory!

Hello, Alex!

I tried to download terrains by RWT.

However, when RWT generating textures, an error would pop up when the progress reached 85%.

I had tried three times and adjusted the download level, but the result was the same.

Please see the attachment for errors. And I wish you can give some advice. Thanks!

Re: Error:Could not allocate memory: System out of memory!

Hello.

You are probably using too high a setting.
Please attach a screenshot of your generation settings so I can check this.
You can also find a pre-calculation of memory usage by pressing the Memory Usage button.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Error:Could not allocate memory: System out of memory!

OK! Please help me check it! Thanks!

Post's attachments

Attachment icon 1677638511183.png 124.16 kb, 31 downloads since 2023-03-01 

Re: Error:Could not allocate memory: System out of memory!

You have too high a setting, and Settings Generator tells you this directly.
To generate such high settings, you need to split the generation process into steps:
1. Generate Terrains without textures.
2. Regenerate textures for each area one at a time.
This can be automated in this way:
https://forum.infinity-code.com/viewtopic.php?id=1447

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Error:Could not allocate memory: System out of memory!

Hello, Alex!
I have saw the tip to add a script named AutomatorExample and updated RWT to the newest version. But there is no RealWorldTerrainWindow.

Re: Error:Could not allocate memory: System out of memory!

Please make sure you put the script in the Editor folder.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

7 (edited by XiaWuchu 2023-03-14 09:16:52)

Re: Error:Could not allocate memory: System out of memory!

OK! I am so sorry that I haven't noted this point.

However, I still have two questions now.

The first is about the automatic loading of maps you said last time. I downloaded the terrain file separately, and then I added the script file AutomatorExample according to what you said. When he completes the execution, the terrain file does not generate the corresponding textures. 

The second problem is that when I set the precision, if I do not check the Generate texture option, the downloaded terrain file is very rough and simple. Even if I have adjusted the height quality value to the highest, the downloaded terrain count is very few.
After I tried, I found that Generate texture can't be unchecked in this step. It should be unchecked in the following options after setting. So it is an error or something else?  To be honest, this makes me very confused. This doesn't seem to fit the characteristics of your excellent products. Am I wrong?

Attached are some pictures I have set. Please check them. I look forward to your reply.

Post's attachments

Attachment icon 1678783912596.png 482.5 kb, 29 downloads since 2023-03-14 

Re: Error:Could not allocate memory: System out of memory!

1. I updated Automator by the link above.
This implied that the texture existed and just needed to increase its resolution.
I added the handling of the case that the texture may not exist.

2. Unfortunately, I didn't understand this problem.
If I open Settings Generator and click Apply, Generate Texture is applied in the main window.
Or do you mean that the Settings Generator does not take the Generate Texture from the main window when you open it?

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

9 (edited by XiaWuchu 2023-03-15 01:28:46)

Re: Error:Could not allocate memory: System out of memory!

Hello,

1. Didn't you say that elevation and texture should be downloaded separately last time?
So, I downloaded the elevation with RWT first, and then I used what you call Automator. I thought it was to help me automatically download the textures and link it to the downloaded elevation. But there is no change after its implementation. So can't it download textures automatically? What is it for?
As you said, the method you provide is only to improve the resolution of texture? If that is the case, I will completely misunderstand.
So the real problem is how to download elevation and texture separately. How texture is automatically attached to the corresponding elevation.

2. Yes, this situation is difficult to describe. How to say it? It was when I planned to download the elevation separately that I found this problem. Please take a look at the pictures in my attachment and carefully look at the places I marked. If you do not check the above texture, the downloaded elevation will be rough and the number will be small, which is not suitable and useful.
I believe you can understand it. If not, you can try to download the elevation separately.

3.In addition, I would like to ask another question. I downloaded a large piece of terrain, but after coordinate conversion, the coordinates will be very large.  Drived in the scene by using this large coordinate. The model will shake and blur. I believe you should understand what I said. Do you know how to avoid this problem?

I sincerely hope you can give me some directions. Thanks!

Re: Error:Could not allocate memory: System out of memory!

1. This is just an example of how to use the RWT API to automate texture regeneration.
The example is not meant to have full functionality as some tool.
But at the same time, I don't want to waste my and your time discussing what the example is and what it should do, so I (as I wrote above) just added that functionality.
You just need to update the script in your project.

2. Settings Generator is not for your case, because you have a huge area (almost 1 million km2), and you're walking on a knife edge trying to bypass Unity's memory limit.
Settings Generator is made for common areas to help users choose the right settings and solve the problem when users set maximum settings for small areas, which is much more than the source data resolution, and gives no benefit, only disadvantages.

3. Unity stores position values in float (32 bits), and the accuracy drops dramatically when you move too far away from the zero point.
There is no solution here, only workarounds.
The classic workaround is:
When the observer (camera) on one of the axes exceeds some limit (e.g. 1000), move the whole scene by this limit to the zero point.
You can find more details by googling Floating Origin.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.