-
Notifications
You must be signed in to change notification settings - Fork 6
Added subtractive workflow #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Fix icon loading with invalid resource paths
…rty-to-chiselmodelcomponent Added subtractive editing option
…component Add normal smoothing support
…hiselcsgcomponent Add debug brush logging
…tices-and-triangles Add DebugLogOutput option
} | ||
UnityEngine.Debug.Log(sb.ToString()); | ||
} | ||
|
||
#region Perform CSG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we should leave this debug code here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I messed up as well, because I made the PR from my main branch and I noticed in play mode that it reverts to the normal non-subtractive version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, I'm not opposed to having debug helpers like this in the code, but not sure if this is the best place for it
prevSmoothNormals = SmoothNormals; | ||
prevSmoothingAngle = SmoothingAngle; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to do the surface flipping / normal smoothing in GenerateSurfaceTrianglesJob
Right before where ComputeTangents / ComputeUVs is performed, Since calculating a correct tangent is dependent on the normal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think I'll close this PR and I'll create a new one where I make this more clean. But the principles work. So that's good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool :)
@@ -45,14 +45,16 @@ public override void OnSceneGUI(SceneView sceneView, Rect dragArea) | |||
case ShapeExtrusionState.Modified: | |||
case ShapeExtrusionState.Create: | |||
{ | |||
ChiselModelComponent model = generatedComponent ? | |||
generatedComponent.GetComponentInParent<ChiselModelComponent>() : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what's going on here, is this a fix for something? Why was it changed? What didn't work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah I think it wasn't necessary after all
I added a toggle for a subtractive workflow for the scope of a ModelCompnent, that's useful for interior scenes (which is what needed). I also fixed some icons not being loaded.