Closed ffreyer closed 3 years ago
Merging #64 (619ff12) into master (0465764) will increase coverage by
0.42%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #64 +/- ##
==========================================
+ Coverage 96.49% 96.91% +0.42%
==========================================
Files 8 8
Lines 342 357 +15
==========================================
+ Hits 330 346 +16
+ Misses 12 11 -1
Impacted Files | Coverage Δ | |
---|---|---|
src/io/obj.jl | 95.83% <100.00%> (+2.85%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 0465764...1d4fd54. Read the comment docs.
Did some performance tweaking. A mesh with 120k faces loaded in ~0.65s before this pr, ~12s after the first commit and ~1s after the latest.
I noticed that if there is a vertex with indices (1,)
, (1, 1)
(1, 1, 1)
etc it gets overwritten by the next vertex with position index 1. I switched to using typemax because of that.
Oh wow.... And also, completely forgot about this awesome PR... We should just merge it quickly!
Same :laughing: I think you asked me on Slack if these changes could be made/moved to GeometryBasics and I had no idea how to do that...
If GeometryBasics could handle faces with different indices for positions, uvs and normals this would be unnecessary. I don't know if it can nor how to get there though.
Actually there still seems to be something wrong with this. I'm losing a normal somehow...
Nvm
Currently
looks wrong because the normal and uv remapping discards points. (Specifically points along the edges of the texture, where one position has two (or more) uv coordinates associated with it.) I fixed that by duplicating the vertices in question and adjusting faces accordingly.
Before:![Screenshot from 2020-10-18 01-07-17](https://user-images.githubusercontent.com/10947937/97065975-977edb00-15b1-11eb-9415-65d790a1475f.png)
After:![Screenshot from 2020-10-24 04-13-53](https://user-images.githubusercontent.com/10947937/97065980-9e0d5280-15b1-11eb-9238-ee5537b94cb4.png)