Skip to content
This repository has been archived by the owner on Aug 14, 2022. It is now read-only.

Error when center-scaling multiples octants #26

Open
Rakiah opened this issue Jan 27, 2019 · 7 comments
Open

Error when center-scaling multiples octants #26

Rakiah opened this issue Jan 27, 2019 · 7 comments

Comments

@Rakiah
Copy link

Rakiah commented Jan 27, 2019

Hello,
when trying to center/rescale an obj composed of numerous octants (retrieved by LexSong script) we get this:

node center_scale_obj.js

<--- Last few GCs --->

[212756:0000011DE7FADED0]    61064 ms: Mark-sweep 1380.3 (1406.8) -> 1380.3 (1406.8) MB, 644.5 / 0.0 ms  (average mu = 0.105, current mu = 0.020) last resort GC in old space requested


<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 000003A4A7B041C1]
Security context: 0000027D3FE1E6C9 <JSObject>
    1: clearBuffer(aka clearBuffer) [000000C26EBA96D1] [_stream_writable.js:~495] [pc=000003A4A7B642E5](this=000003A4D67022E1 <undefined>,stream=00000198F5C831E1 <WriteStream map = 000003C60DBD71E1>,state=0000034FB0C03C09 <WritableState map = 000003C60DBD0071>)
    2: onwrite(aka onwrite) [000000C26EBA9611] [_stream_writable.js:465] [bytecode=0000021A344...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 00007FF642E982F5
 2: 00007FF642E74156
 3: 00007FF642E75890
 4: 00007FF64336AD5E
 5: 00007FF64336AC93
 6: 00007FF643249CB4
 7: 00007FF643240797
 8: 00007FF64323ED1C
 9: 00007FF64323E1C5
10: 00007FF6432479F6
11: 00007FF64314BB21
12: 00007FF64314C5E2
13: 00007FF64317834C
14: 00007FF643177FE4
15: 00007FF643178560
16: 00007FF64315F245
17: 00007FF6434D0FF0
18: 000003A4A7B041C1

Look like the computer either ran out of ram or there is some kind of limitation in the node javascript engine, is there any possible fixes for this you can think of ? like storing on hard disk ?
will try tomorrow with a 32 gb ram server, here i only have 16gb

@Rakiah
Copy link
Author

Rakiah commented Jan 27, 2019

Ok i think the problem is just linked to the fact that the script retrieve all of the file in the ram (2.4gb)

I suppose I can fix it following this tomorrow, will try and PR if I do

@Rakiah
Copy link
Author

Rakiah commented Jan 27, 2019

added in #27 but don't merge it already, still have to test it with a 3d engine
I've just made the PR so you know that I am already working on it and we don't duplicate effort

@Rakiah
Copy link
Author

Rakiah commented Feb 4, 2019

I've been cancelling entirely this issue since it doesn't solve a more important problem: model with more than 200 mb have huge troubles loading in engines like Unity or Blender, i've made a few pipeline scripts that combine efforts from everyone to streamline the process to dump an area into small roughly 60 mb tiles that are self contained and precisely geolocated, would it be interesting to open up a new MR with the script ? @retroplasma

@Rakiah
Copy link
Author

Rakiah commented Feb 4, 2019

here you can see the repo where it is working (i've reworked both the python script from lexsong and your dump_obj script)
https://github.com/Rakiah/earth-reverse-engineering
i've added a small note at the bottom of the readme to explain how to use it

@LexSong linking you here aswell lexsong as you may be interested, was able to do it mostly with your script that I changed a little bit

@LexSong
Copy link
Contributor

LexSong commented Feb 5, 2019

I personally don't use the normalization script and use my own script to rotate and normalize the mesh by latitude and longitude. It's still have several KMs error but I can fix it later in 3D software.

@Rakiah
Copy link
Author

Rakiah commented Feb 5, 2019

We're also using a script to rotate it but we're doing it directly in the 3D software (basically we just us rotation = (-latitude, 0, -90 + longitude)), however we have a problem using the normalization script proposed by retroplasma, the way it center the object make is fine to align them by X/Z axis but impossible to align the tiles with the Y axis in an automatic way, did you found any better way to do it ?
@LexSong

@LexSong
Copy link
Contributor

LexSong commented Feb 8, 2019

See #30

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants