Skip to content

Conversation

coen22
Copy link

@coen22 coen22 commented Jul 18, 2025

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.

UnityEngine.Debug.Log(sb.ToString());
}

#region Perform CSG
Copy link
Member

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

Copy link
Author

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

Copy link
Member

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;
}
}
Copy link
Member

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

Copy link
Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool :)

case ShapeExtrusionState.Create:
{
ChiselModelComponent model = generatedComponent ?
generatedComponent.GetComponentInParent<ChiselModelComponent>() : null;
Copy link
Member

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?

Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants