Comments (8)
In order to solve this issue the cut will need to happen in world space. This means transforming all vertices into world space, performing the cut operation and transforming the resulting points back into object space. This results in a fairly heavy computation cost so instead of "fixing" the current method, i'd probably add in an option to slice non uniform scaled objects separately at the cost of additional computation/time.
My apologies for not communicating this sooner. At the moment i'm slowly investigating moving the slicer into Unity Job System that would allow slices to be performing drastically faster. The new redesign would allow me to fix lingering issues such as these much easier.
from ezy-slice.
Hello,
As of the latest commit b98da2a this issue should be resolved and can finally be closed. I've modified the SlicerExtensions.cs code so the Plane direction vector is properly transformed into the object local space before slicing.
Unfortunately this also means that the old method of using Transform.InverseTransformDirection or Transform.InverseTransformVector are incorrect. Unity should be using the Transpose Inverse Matrix to transform direction vectors for correct results. Maybe this is something that can be brought up with the Unity3D engineering team directly as a bug report. As a work around, i'm transposing and inverting the matrix manually for the correct results.
I will now close this issue. Thanks everyone!
Edit: See correct results after cutting a non-uniformly scaled object from following screenshot.
from ezy-slice.
Thank you for the bug report, i've reproduced the error locally and will work on a fix.
from ezy-slice.
Any luck trying to resolve this?
from ezy-slice.
Hello @DavidArayan is this still under work?
Thank you
from ezy-slice.
This is a pretty major issue.. Is there a simple workaround that does not involve rewriting code? Or is the only 'fix' to just use something like 'apply scale' in Blender/modeling program to make sure the imported object has a uniform scale.
from ezy-slice.
Hello @alexanderameye,
No need for a rewrite. The issue lays in transforming the cutting plane from world space to object space for the cut however i've recently discovered that direction vectors need to be transformed using the inverse transpose matrix (noob mistake, should have known better!). I'll attempt to test and push a fix for this today or early this week.
Cheers!
from ezy-slice.
Looking forward to it! And no hurry, I love the framework, thank you so much for sharing it. It's a valuable educational resource as well :)
from ezy-slice.
Related Issues (20)
- Apply to Animated Model? HOT 5
- Bug: wrong slice direction when object we want to cut has different localscale on axis HOT 1
- If a mesh does not intersect the cutting plane it would be nice if I was told if it was on the upper or lower side. HOT 3
- How to test an example project?
- The name 'Normal' does not exist in the current context HOT 1
- Script Doesn't Link To Editor HOT 2
- Oculus Quest crashing HOT 7
- Slicing Unity's sphere results in meshes with uncovered holes HOT 5
- When cutting a complex mesh, the face does not respect the geometry HOT 1
- Get the intersection points HOT 2
- Lost HOT 4
- Doesn't work for more complex objects HOT 6
- After slicing the game object the original prefab holes are closed , the region is filled? i wanted to know if we can retain the original holes in the obj after slicing the game object ? HOT 3
- Ezy Slice - imported objects don't get sliced HOT 4
- Randomly doesn't slice (this could well be user error) HOT 2
- Can't download the project through unity git system. HOT 1
- [bug]Cut a hollow object in the middle. The object after cutting is incorrect HOT 1
- I'm curious. This object is not complex, but it can't be cut HOT 1
- Unexpected hole patching after slice HOT 1
- how can i add internal material to sliced object
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ezy-slice.