News for hackers. Stuff that matters.
Re:Pixar, Adobe, Apple, Autodesk, and Nvidia Form Alliance f... by bssrdf on Tuesday August 01, 2023 @06:49PM (#36964347)
Just finished writing [0] about Blender's USD import issue.

[0] - https://news.ycombinator.com/item?id=36947946

Re:Pixar, Adobe, Apple, Autodesk, and Nvidia Form Alliance f... by Vt71fcAqt7 on Tuesday August 01, 2023 @07:34PM (#36964788)
This was a great read, thanks for sharing.
Re:Pixar, Adobe, Apple, Autodesk, and Nvidia Form Alliance f... by dagmx on Tuesday August 01, 2023 @06:58PM (#36964434)
That improvement sounds great. Any chance that’s up as a PR to blender?
Re:Pixar, Adobe, Apple, Autodesk, and Nvidia Form Alliance f... by bssrdf on Tuesday August 01, 2023 @10:00PM (#36966037)
I didn't submit the PR yet, but opened an issue which has not been picked up. Maybe most of the USD files used in Blender do not trigger the O(N^2) behavior.
Re:Pixar, Adobe, Apple, Autodesk, and Nvidia Form Alliance f... by dagmx on Tuesday August 01, 2023 @11:17PM (#36966562)
Possibly. Do you have a link to the PR handy?
Re:Pixar, Adobe, Apple, Autodesk, and Nvidia Form Alliance f... by bssrdf on Wednesday August 02, 2023 @11:39AM (#36972385)
I don't think a PR is ready. My solution does not fully solve the problem. It requires more thoughts. Thanks.
Re:Pixar, Adobe, Apple, Autodesk, and Nvidia Form Alliance f... by datavirtue on Wednesday August 02, 2023 @10:19AM (#36971263)
Excited to see this potentially integrated into FreeCAD. It is already very good at utilizing assets from other applications like Blender, and producing assets that can be used in other applications.

It would really help smooth out some wrinkles in the building industry if we could freely interoperate with each other while using different applications. I can't afford (stomach) anything but FreeCAD for my building projects. All the engineers I work with use autocad.

Re:Pixar, Adobe, Apple, Autodesk, and Nvidia Form Alliance f... by panzi on Tuesday August 01, 2023 @11:38PM (#36966697)
Interesting. Since the list is sorted, is the insertion still a linear search (O(N)) or now a binary search (O(log(N))? Or did I misunderstand something? Also, why is it not a hash table (almost O(1))?
Re:Pixar, Adobe, Apple, Autodesk, and Nvidia Form Alliance f... by bssrdf on Wednesday August 02, 2023 @11:37AM (#36972364)
Good point, I have the same doubt. Even if it is sorted, you still cannot do binary search on it unless using some skip list ideas. In fact, the code right now is doing linear search to find the ID given a name.

TBH, I don't fully understand how the ID linked list is utilized in Blender and why it needs to sorted by names. It seems some other data structure could also work, unless I missed something.

Re:Pixar, Adobe, Apple, Autodesk, and Nvidia Form Alliance f... by panzi on Thursday August 03, 2023 @05:41PM (#36992369)
Oh is it an actual linked list and not an array?
Re:Pixar, Adobe, Apple, Autodesk, and Nvidia Form Alliance f... by bssrdf on Thursday August 03, 2023 @06:41PM (#36993068)
Yes, actually it is a doubly linked list.
Re:Pixar, Adobe, Apple, Autodesk, and Nvidia Form Alliance f... by coldtea on Wednesday August 02, 2023 @03:20AM (#36967993)
Wow, thanks!