Coder Social home page Coder Social logo

obj-simplify's People

Contributors

antont avatar castleseven avatar donmccurdy avatar jonnenauha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

obj-simplify's Issues

Comments (#) aren't supported.

According to the OBJ spec linked on the main page, comment lines should be ignored, but they aren't. Instead, the program just bombs:

[FATAL] line:4 Unsupported line "#98 vertices, 124 faces"

Please submit a bug report. If you can, provide this file as an attachement.
> https://github.com/jonnenauha/obj-simplify/issues

Run Instructions in README

Hi there;

I'm a non-go user and struggling to actually build/run the program. I realize it's likely user error but including a note may save many hours for folks like me :) Would it be possible to include instructions to get going for people like me who havn't ever touched go? ie)

git clone <repo>
cd obj-simplify
go build

This actually fails as-is with "cannot find package "github.com/jonnenauha/obj-simplify/objectfile", running in the golang official Docker container, so I assume that's a functional go build environment.

fatal error while processing file invalid syntax

hi @jonnenauha! first of all, thanks for this tool. looks great and fast.

I encountered an issue with this tool throwing fatal error

[FATAL] line:381459 Found invalid number from "-1.#IND00 -1.#IND00 -1.#IND00": strconv.ParseFloat: parsing "-1.#IND00": invalid syntax

when trying to simplify the object. note that I am not very knowledgeable about the .obj format or any other 3d format. I bought model of my Mazda6 and got obj file with lines like:

vt  0.673680 0.303679 0.000000
vt  1.000000 0.303948 0.000000
vt  0.250000 0.661712 0.000000
vt  0.250000 0.161712 0.000000
vt  -1.#IND00 -1.#IND00 -1.#IND00
vt  0.205604 0.321078 0.000000
vt  0.794396 0.321078 0.000000
vt  0.481795 0.692745 0.000000
vt  0.329577 0.631309 0.000000

so I am not sure if there's a problem with obj-simplify tool or with my .obj file.
Also, note that this file can be opened with the online 3dviewer or tools like blender.
I would appreciate any help on this one, thanks!

Faces with >4 vertices not supported

This is a neat tool, you earned my star! However, it seems that any faces with over 4 vertices are truncated to just the first 4 vertices when exporting, which is kind of inconvenient since I have models with octagonal faces.

It seems like the upper index limit here could simply be removed to fix the issue, although I'm not super familiar with the code base or the language.

question: suitable sizes, expected processing times?

or put differently, will this run ever complete or is it too big? :) 30k scene objects in Blender.. (from a FBX)

39 000 000 lines parsed - Forced GC took 1.82s

processor #1: Duplicates
  - Using epsilon of 1e-06

software Killed on very large file

I'm trying to run the program on a very large obj file (~8.5gb) and it prints this:
`
obj-simplify -in 3mx_1.obj -out 3mx_1_optimized.obj

obj-simplify dev {
"Input": "/home/rlb/Documents/STLS/3mx_1.obj",
"Output": "/home/rlb/Documents/STLS/3mx_1_optimized.obj",
"Workers": 64,
"Gzip": -1,
"Epsilon": 0.000001,
"Strict": false,
"Stdout": false,
"Quiet": false,
"NoProgress": false,
"CpuProfile": false
}
1 000 000 lines parsed - Forced GC took 0.02s
2 000 000 lines parsed - Forced GC took 0.05s
3 000 000 lines parsed - Forced GC took 0.15s
4 000 000 lines parsed - Forced GC took 0.08s
5 000 000 lines parsed - Forced GC took 0.09s
6 000 000 lines parsed - Forced GC took 0.13s
7 000 000 lines parsed - Forced GC took 0.15s
8 000 000 lines parsed - Forced GC took 0.19s
9 000 000 lines parsed - Forced GC took 0.18s
10 000 000 lines parsed - Forced GC took 0.23s
11 000 000 lines parsed - Forced GC took 0.22s
12 000 000 lines parsed - Forced GC took 0.29s
13 000 000 lines parsed - Forced GC took 0.29s
14 000 000 lines parsed - Forced GC took 0.28s
15 000 000 lines parsed - Forced GC took 1.10s
16 000 000 lines parsed - Forced GC took 0.27s
17 000 000 lines parsed - Forced GC took 1.26s
18 000 000 lines parsed - Forced GC took 0.29s
19 000 000 lines parsed - Forced GC took 0.32s
20 000 000 lines parsed - Forced GC took 0.34s
21 000 000 lines parsed - Forced GC took 1.56s
22 000 000 lines parsed - Forced GC took 0.37s
23 000 000 lines parsed - Forced GC took 0.39s
24 000 000 lines parsed - Forced GC took 1.79s
25 000 000 lines parsed - Forced GC took 0.48s
26 000 000 lines parsed - Forced GC took 0.42s
27 000 000 lines parsed - Forced GC took 2.04s
28 000 000 lines parsed - Forced GC took 2.08s
29 000 000 lines parsed - Forced GC took 0.50s
30 000 000 lines parsed - Forced GC took 0.45s
31 000 000 lines parsed - Forced GC took 2.34s
32 000 000 lines parsed - Forced GC took 0.47s
33 000 000 lines parsed - Forced GC took 0.52s
34 000 000 lines parsed - Forced GC took 0.51s
35 000 000 lines parsed - Forced GC took 2.64s
36 000 000 lines parsed - Forced GC took 0.57s
37 000 000 lines parsed - Forced GC took 2.77s
38 000 000 lines parsed - Forced GC took 2.85s
39 000 000 lines parsed - Forced GC took 2.92s
40 000 000 lines parsed - Forced GC took 3.00s
41 000 000 lines parsed - Forced GC took 3.07s
42 000 000 lines parsed - Forced GC took 3.15s
43 000 000 lines parsed - Forced GC took 0.66s
44 000 000 lines parsed - Forced GC took 0.71s
45 000 000 lines parsed - Forced GC took 0.67s
46 000 000 lines parsed - Forced GC took 0.72s
47 000 000 lines parsed - Forced GC took 0.75s
48 000 000 lines parsed - Forced GC took 0.77s
49 000 000 lines parsed - Forced GC took 0.80s
50 000 000 lines parsed - Forced GC took 3.74s
51 000 000 lines parsed - Forced GC took 3.83s
52 000 000 lines parsed - Forced GC took 3.91s
53 000 000 lines parsed - Forced GC took 4.00s
54 000 000 lines parsed - Forced GC took 4.05s
55 000 000 lines parsed - Forced GC took 0.85s
56 000 000 lines parsed - Forced GC took 4.22s
57 000 000 lines parsed - Forced GC took 4.30s
58 000 000 lines parsed - Forced GC took 0.90s
59 000 000 lines parsed - Forced GC took 0.90s
60 000 000 lines parsed - Forced GC took 0.92s
61 000 000 lines parsed - Forced GC took 0.94s
62 000 000 lines parsed - Forced GC took 0.96s
63 000 000 lines parsed - Forced GC took 4.74s
64 000 000 lines parsed - Forced GC took 0.97s
65 000 000 lines parsed - Forced GC took 0.99s
66 000 000 lines parsed - Forced GC took 1.01s
67 000 000 lines parsed - Forced GC took 1.08s
68 000 000 lines parsed - Forced GC took 5.13s
69 000 000 lines parsed - Forced GC took 5.16s
70 000 000 lines parsed - Forced GC took 1.07s
71 000 000 lines parsed - Forced GC took 5.33s
72 000 000 lines parsed - Forced GC took 1.08s
73 000 000 lines parsed - Forced GC took 5.49s
74 000 000 lines parsed - Forced GC took 1.14s
75 000 000 lines parsed - Forced GC took 1.15s
76 000 000 lines parsed - Forced GC took 5.75s
77 000 000 lines parsed - Forced GC took 5.82s
78 000 000 lines parsed - Forced GC took 6.08s
79 000 000 lines parsed - Forced GC took 5.98s
80 000 000 lines parsed - Forced GC took 1.24s
81 000 000 lines parsed - Forced GC took 1.27s
82 000 000 lines parsed - Forced GC took 1.35s
83 000 000 lines parsed - Forced GC took 1.28s
84 000 000 lines parsed - Forced GC took 1.30s
85 000 000 lines parsed - Forced GC took 1.30s
86 000 000 lines parsed - Forced GC took 6.47s
87 000 000 lines parsed - Forced GC took 6.59s
88 000 000 lines parsed - Forced GC took 1.35s
89 000 000 lines parsed - Forced GC took 6.76s
90 000 000 lines parsed - Forced GC took 6.84s
91 000 000 lines parsed - Forced GC took 6.84s
92 000 000 lines parsed - Forced GC took 1.68s
93 000 000 lines parsed - Forced GC took 6.98s
94 000 000 lines parsed - Forced GC took 1.42s
95 000 000 lines parsed - Forced GC took 1.47s
96 000 000 lines parsed - Forced GC took 7.54s
97 000 000 lines parsed - Forced GC took 1.49s
98 000 000 lines parsed - Forced GC took 1.51s
99 000 000 lines parsed - Forced GC took 7.46s
100 000 000 lines parsed - Forced GC took 1.57s
101 000 000 lines parsed - Forced GC took 1.88s
102 000 000 lines parsed - Forced GC took 7.98s
103 000 000 lines parsed - Forced GC took 1.61s
104 000 000 lines parsed - Forced GC took 1.99s
105 000 000 lines parsed - Forced GC took 1.64s
106 000 000 lines parsed - Forced GC took 1.62s
107 000 000 lines parsed - Forced GC took 8.11s
108 000 000 lines parsed - Forced GC took 1.66s
109 000 000 lines parsed - Forced GC took 1.66s
110 000 000 lines parsed - Forced GC took 1.89s
111 000 000 lines parsed - Forced GC took 1.73s
112 000 000 lines parsed - Forced GC took 8.76s
113 000 000 lines parsed - Forced GC took 1.72s
114 000 000 lines parsed - Forced GC took 1.72s
115 000 000 lines parsed - Forced GC took 8.78s
116 000 000 lines parsed - Forced GC took 9.01s
117 000 000 lines parsed - Forced GC took 1.88s
118 000 000 lines parsed - Forced GC took 9.15s
119 000 000 lines parsed - Forced GC took 9.24s
120 000 000 lines parsed - Forced GC took 1.93s
121 000 000 lines parsed - Forced GC took 2.09s
122 000 000 lines parsed - Forced GC took 2.05s
123 000 000 lines parsed - Forced GC took 9.65s
124 000 000 lines parsed - Forced GC took 1.96s
125 000 000 lines parsed - Forced GC took 1.95s
126 000 000 lines parsed - Forced GC took 9.67s
127 000 000 lines parsed - Forced GC took 1.96s
128 000 000 lines parsed - Forced GC took 2.01s
129 000 000 lines parsed - Forced GC took 2.20s
130 000 000 lines parsed - Forced GC took 2.07s
131 000 000 lines parsed - Forced GC took 2.20s
132 000 000 lines parsed - Forced GC took 2.28s
133 000 000 lines parsed - Forced GC took 10.23s
134 000 000 lines parsed - Forced GC took 2.05s
135 000 000 lines parsed - Forced GC took 2.09s
136 000 000 lines parsed - Forced GC took 2.11s
137 000 000 lines parsed - Forced GC took 10.39s
138 000 000 lines parsed - Forced GC took 2.15s
139 000 000 lines parsed - Forced GC took 10.53s
140 000 000 lines parsed - Forced GC took 10.71s
141 000 000 lines parsed - Forced GC took 2.17s
142 000 000 lines parsed - Forced GC took 2.20s
143 000 000 lines parsed - Forced GC took 10.79s
144 000 000 lines parsed - Forced GC took 10.99s
Killed
`

Does anyone know what the issue is?

I know it's a very large file but that's why i'm using the program

fatal error : out of memory

When trying to simplify a file, I get this error after RAM usage goes up to 34GB using amd64 version on Windows (tried with windows 10 and windows server 2012).

runtime: out of memory: cannot allocate 2359296-byte block (34358820864 in use)
fatal error: out of memory

It crashes way faster when using 386 version.
Is this a RAM problem ? I have 64GB.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.