question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I’ve stalled a little bit on the OBJ rewrite due to other projects. It’s decently close however, and if anyone is interested in working on it, it would be appreciated!

The feature/obj branch includes a mostly fresh pass at an OBJ loader. In my testing on large files, it was roughly 3x faster than the previous loader. Most of the gains are from doing string preprocessing operations, and processing only relevant substrings as much as possible, through str.find and str.rfind, and then loading data with np.fromstring. For small meshes, it has basically the same performance as the old loader.

It also handles multiple textures by splitting at every usemtl or o tag, which become a new mesh, which the current loader doesn’t handle well (or at all).

Developing

If you run ipython -i obj.py in the root directory, it will load, profile, and compare performance to the old loader, which hasn’t been touched. When this is further along we’ll jettison the old loader and replace it with obj.py. I recommend doing it on a large- ish mesh (as small meshes load so quickly they are dominated by things like PIL image loading).

Scope

  • Load vertices (v)
  • Vertex colors (on the same line as v)
  • Vertex normals (vn)
  • Vertex texture coordinates (vt)
  • Triangular and quad faces
  • Find an OBJ with mixed tri/quad to test against
  • Multiple materials
  • Multiple objects (o)
  • Materials with color information but no image render in viewer.windowed (maybe these should be converted to face_colors?
  • Keep track of face groups g
  • Keep track of smoothing groups s
  • Useable kwargs
  • Usable kwargs with texture

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
mikedhcommented, Apr 24, 2019

Sounds good! Talk to you tomorrow @ 2

0reactions
mikedhcommented, May 27, 2019

Moving conversation to the PR: #436

Read more comments on GitHub >

github_iconTop Results From Across the Web

object-rewrite - npm
Rewrite Object (s) in place using plugins. This library is used for doing complex in-memory modifications of data.
Read more >
Objects: rewrite | Cloud Storage
Rewrites a source object to a destination object. Optionally overrides metadata. Try it now. The authenticated user must have sufficient permission to use ......
Read more >
Difference between obj={value:1} and obj.value=1 to rewrite ...
The difference is that obj = {value: 1} is creating a whole new object and overwriting a variable. obj.value = 1 just overwrites...
Read more >
Object.assign() - JavaScript - MDN Web Docs
The Object.assign() method copies all enumerable own properties from one or more ... Later sources' properties overwrite earlier ones.
Read more >
Object rewrite ( legacy ) - Kaltura Player
Basic player rewrites work by including the javacript library followed by the flash object tag embed: Note this rewrite method is deprecated. You...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found