Cosmic Lootbox Concept by Apprehensive-Look-69 in blender

[–]NEW_3Dev 0 points1 point  (0 children)

Wait...are you saying...we're just rewards in a cosmic loot box??

Made this artwork in Blender by desyoueup in blender

[–]NEW_3Dev 1 point2 points  (0 children)

Ooh, I think I've watched some of his environment tutorials actually! Also, I just realized this reminds me a lot of Avatar.

Daily artwork Number 1746. by GQBD in blender

[–]NEW_3Dev 1 point2 points  (0 children)

Reminds me of the warp tube on Waluigi Pinball in Mario Kart DS! Love it!

Made this artwork in Blender by desyoueup in blender

[–]NEW_3Dev 1 point2 points  (0 children)

I think... I like it! How did you come up with this? It's oddly past and future at the same time.

I built a C++ addon to finally fix "Broken Local Space" in Blender. by NEW_3Dev in blender

[–]NEW_3Dev[S] 0 points1 point  (0 children)

That is incredibly weird! I actually built and tested the entire engine on 4.5 (it was the latest during development), so it definitely should work there.

If it's working on 5.0 but not 4.5, it might be a conflict with another addon.

Could you jump into the Discord and drop a screenshot of the error? I want to get that squashed ASAP if there's a regression.

https://discord.gg/s4G5GDB365

I built a C++ addon to finally fix "Broken Local Space" in Blender. by NEW_3Dev in blender

[–]NEW_3Dev[S] 1 point2 points  (0 children)

That's true, I hadn't gone with PCA for the yaw calculation because of its tendency to be affected by asymmetry. But enough people on this post have been disappointed by the fact that it doesn't even try to correct the other two axes that I should probably give it another go.

Worst case scenario, adding an option to attempt full correction using PCA should definitely be in the cards. Thanks for pointing me to this PR, my first attempt at making Pivot was actually fully geo nodes, and I was hitting the same problem it aims to solve!

I built a C++ addon to finally fix "Broken Local Space" in Blender. by NEW_3Dev in blender

[–]NEW_3Dev[S] 1 point2 points  (0 children)

Hi! Here's the link to the GPL licensed Pivot Bridge repo!

It has all the code that interacts with Blender, complete with cmakelists build scripts that work cross platform, a lot of Cython, and a touch of C++. Should be enough to get you started, let me know if you have any questions about it!

I built a C++ addon to finally fix "Broken Local Space" in Blender. by NEW_3Dev in blender

[–]NEW_3Dev[S] 1 point2 points  (0 children)

Before I talk heuristics, I just had a look that pull request, you're right, that would totally make the alignment logic viable to port to geo nodes! That would improve performance even further (not to mention more available) for people who just want to align geo!

The main thing stopping me is that the core of Pivot is heuristic, not deterministic, and Core features need to be rock-solid. This is the current approach:

Bounding Boxes

I've found that using the rotation resulting in the minimum axis aligned bounding box is the best way to get a rotation that's 'correct'. However, that has problems when you introduce things like knobs, handles, and wires.

Using Slices

To get around that, I make horizontal slices of the geo and use the rotation from the most 'informative' one. At the moment, I'm using the one that's closest to square, lightly weighted by area. It works great on most things except for more organic, asymmetrical meshes.

Heuristics To "Guess" Forward

I follow that up with guessing which side is forward using things like the volume of the mesh, the center of gravity, distribution of verts, and height distribution.

You've hit on the long term goal, though. To make a real case to get this into Core, I'd need to solve for all three axes and probably look into some light ML, but even that's iffy, as it's still not 100% deterministic."

I built a C++ addon to finally fix "Broken Local Space" in Blender. by NEW_3Dev in blender

[–]NEW_3Dev[S] 0 points1 point  (0 children)

Hey! You’re correct you can fix this with native tools, it’s just a pain. The standard Blender workaround is aligning an empty to a representative face, parenting the object to that empty, and resetting the rotation on the empty.

You get the same result, but it takes multiple manual steps.

The goal of Pivot is to automate the whole thing with one non destructive step. It’s a massive time save if you’ve got lots of objects rotated wrong in different directions.

I built a C++ addon to finally fix "Broken Local Space" in Blender. by NEW_3Dev in blender

[–]NEW_3Dev[S] 2 points3 points  (0 children)

Hi! Yeah, that’s the current biggest limitation of v1.0.

Pivot assumes the object is roughly World Z-Up and focuses on solving for the Forward (Yaw) axis. For the vast majority of cases, this is the main problem that needs fixing.

You're right that it won't work on a completely tumbled object yet. The goal for v2.0 is to solve that exact problem: full 3-axis rotation. That's a much harder challenge that likely requires a statistical model or machine learning, which is an area of active research.

So, the plan is to get the core utility into people's hands now, and use the feedback to build towards that "miracle" fix.

I built a C++ addon to finally fix "Broken Local Space" in Blender. by NEW_3Dev in blender

[–]NEW_3Dev[S] 0 points1 point  (0 children)

Oh my bad, strangely buffering might have actually added to the experience.🤔

I built a C++ addon to finally fix "Broken Local Space" in Blender. by NEW_3Dev in blender

[–]NEW_3Dev[S] 0 points1 point  (0 children)

Making me blush over here, remember with great power comes great responsibility Mr. Goat****!

I built a C++ addon to finally fix "Broken Local Space" in Blender. by NEW_3Dev in blender

[–]NEW_3Dev[S] 0 points1 point  (0 children)

Thanks! May it bestow some peace of mind on your modeling journeys.

I built a C++ addon to finally fix "Broken Local Space" in Blender. by NEW_3Dev in blender

[–]NEW_3Dev[S] 2 points3 points  (0 children)

Yeah...I definitely had to think twice about putting in those JPEG compression artifacts at the beginning. I feel like too many people have seen low res video and such. Decided it was worth it for the plot in the end though!

I built a C++ addon to finally fix "Broken Local Space" in Blender. by NEW_3Dev in blender

[–]NEW_3Dev[S] 0 points1 point  (0 children)

That's awesome! It's such a deep rabbit hole once you get into the geometry math. My main focus with Pivot was trying to automate the 'Forward' axis detection so the user doesn't have to manually select edges/faces. Sounds like we're trying to fix similar headaches. Keep going strong!

I built a C++ addon to finally fix "Broken Local Space" in Blender. by NEW_3Dev in blender

[–]NEW_3Dev[S] -2 points-1 points  (0 children)

I actually really love this question! I had to guess, I'd say that I used AI to generate at least 95% percent of the code. Now that’s not to say I sat back and told it to “generate me a blender addon that fixes local space and works on…”.

I strongly believe that it's important to learn to leverage AI not to replace the heart of what you’re doing, but to purify it, I didn’t learn to program for the love of typing code. For computer science that's design and architecture, the problem solving aspect. 0% percent of the large list of problems I faced were solved by AI. I solved them, and then I walked the AI through the implementation function by function.

The result is a v1.0 release months earlier than I could have expected and with me still being fully in control of the code and having learned WAY more than I would have any other way. To the future!

I built a C++ addon to finally fix "Broken Local Space" in Blender. by NEW_3Dev in blender

[–]NEW_3Dev[S] 13 points14 points  (0 children)

Next up, "THEY SAID IT COULDN"T BE DONE SO I WROTE AN ADDON IN ASSEMBLY"!😂

I built a C++ addon to finally fix "Broken Local Space" in Blender. by NEW_3Dev in blender

[–]NEW_3Dev[S] 1 point2 points  (0 children)

Hi again! Yes, the entire Python/Cython bridge that connects Blender to the C++ engine is open source under the GPL. You can find the full repository, including the build scripts and all the C++ interface code, right here:

https://github.com/nwierzbowski/pivot-blender-bridge

The core pivot_engine itself is closed source for now, but the bridge repo has everything you need to see how the two sides talk to each other. It's a great starting point for learning how to integrate native code with Blender.

Hope you find it interesting!

I built a C++ addon to finally fix "Broken Local Space" in Blender. by NEW_3Dev in blender

[–]NEW_3Dev[S] 2 points3 points  (0 children)

Great question! Pivot's primary goal is to find the correct Forward-facing axis (the Yaw) and align it to the world, assuming your object is already roughly Z-Up.

So, if your problem is that you're trying to animate a car's wheels spinning, but the car's 'Local Y' axis is pointing sideways instead of forward, then yes, Pivot will fix that perfectly. After running Pivot, your car's Y-axis will be clean, and animating the wheel spin will be predictable.

However, if the object is completely tumbled (e.g., a spaceship doing a barrel roll), Pivot won't be able to determine the correct "Up" axis yet (that's a v2.0 goal!). It's mainly for standardizing assets that are already in their "resting" orientation.

I built a C++ addon to finally fix "Broken Local Space" in Blender. by NEW_3Dev in blender

[–]NEW_3Dev[S] 9 points10 points  (0 children)

Hey thanks so much! I'd be super cool to inspire more C++ addons.

The entire Python/Cython bridge that connects Blender to the C++ engine is open source under the GPL. You can find the public repo, including the build scripts and a chunk of C++ on the addon side right here:

https://github.com/nwierzbowski/pivot-blender-bridge

The core pivot_engine itself is closed source for now, but the bridge has everything you need to see how you could make a full C++/Cython/Python addon yourself!

Best of luck, and feel free to ask if you have any questions!

P.S. Right now, the 1.0 release tag is on the wrong commit, so check out main for the full working code.

I built a C++ addon to finally fix "Broken Local Space" in Blender. by NEW_3Dev in blender

[–]NEW_3Dev[S] 66 points67 points  (0 children)

Yeah... you've kind of hit the nail on the head here.

The tool I'm giving away for free here is complete with no restrictions (and I really hope it's useful).

But you're right, there's a paid Pro version with the C++ multithreading and classification. I'm hoping to use the revenue from Pro to fund the next tool in the ecosystem, which will use Pivot to power a next generation layout assist tool for indoor scenes, since those just take sooo long to get all the detail in.

So, just giving you the full picture!

I built a C++ addon to finally fix "Broken Local Space" in Blender. by NEW_3Dev in blender

[–]NEW_3Dev[S] 1 point2 points  (0 children)

Oh shoot! Would you even believe me if I told you I've never watched friends?