Skip to content

SlicingPlane rotation in scaled VolumeContainer #287

@LennardMarx

Description

@LennardMarx

Hi Matias,

thank you again for this amazing project.

I'm currently facing the issue of misalignment between mesh and transform of the SlicingPlanes when rotating them in a non-uniformly scaled VolumeContainer. I've noticed, that you also marked the scaling issue as a TODO in the SlicingPlane, and a (I think) related TODO in the SliceRenderingShader. I would like to tackle this issue and came up with a few, maybe not so elegant solutions, maybe you have some pointers for what you had in mind.

The core issue is intended Unity behavior: The child object scales with the parent and the mesh distorts. In the case of the plane the distortion is not noticeable as long as it's not rotated inside of the parent, when it is rotated however, the mesh of the plane is misaligned with its own transform, if it's not in orientation of the parents axes.

Solution 1: Create a Pivot Object between parent and child to compensate for the scaling of the parent.

Solution 2: Have the SlicingPlane be a child to the VolumeRenderedObject, instead of the VolumeContainer.

In both cases the reference to the VolumeContainer for the shader have to be adjusted.

What is your opinion on those approaches? Do you have any suggestions?

Best regards,
Lennard

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions