# Incorrect rendering of polydata surfaces when using vtkActor::SetUserTransform

**URL:** https://discourse.vtk.org/t/incorrect-rendering-of-polydata-surfaces-when-using-vtkactor-setusertransform/12196
**Category:** Support
**Created:** [August 24, 2023, 8:13am UTC](https://discourse.vtk.org/t/incorrect-rendering-of-polydata-surfaces-when-using-vtkactor-setusertransform/12196 "2023-08-24T08:13:03Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dyollb](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dyollb/32/7649_2.png) [@dyollb](https://discourse.vtk.org/u/dyollb)
#### Post date: [August 24, 2023, 8:13am UTC](https://discourse.vtk.org/t/incorrect-rendering-of-polydata-surfaces-when-using-vtkactor-setusertransform/12196/1 "2023-08-24T08:13:03Z")

</div>

I have a little viewer which basically just renders the surface extracted from a labelfield using vtkDiscreteFlyingEdges3D.

The image/labelfield data has an associated orientation & origin which I store separately (not in the vtkImageData). I set this transform via vtkActor::SetUserTransform.

This is what the surface looks like when there is no flip in the rotation matrix (negative determinant):

 ![image](https://discourse.vtk.org/uploads/default/original/2X/c/ce3238f38c08a090338098321d9328939c6bd36f.png)

But if the rotation has a flip I get this appearance (you can faintly see the boundaries):

 ![image](https://discourse.vtk.org/uploads/default/original/2X/e/e95399765ca812b9fb28f85ec2cc169a18842715.png)

I have tried different settings, e.g. to

```cpp
ren->SetLightFollowCamera(true);
ren->SetTwoSidedLighting(true);
actor->GetProperty()->SetBackfaceCulling(false);

```

But it doesn’t change the appearance.

I am using (stuck with) VTK 8.2.

---

<div class="post-metadata">

### Author: ![dyollb](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dyollb/32/7649_2.png) [@dyollb](https://discourse.vtk.org/u/dyollb)
#### Post date: [August 25, 2023, 5:11am UTC](https://discourse.vtk.org/t/incorrect-rendering-of-polydata-surfaces-when-using-vtkactor-setusertransform/12196/2 "2023-08-25T05:11:23Z")

</div>

Okay. It looks like the same issue was discussed here: [mirroring and normals](https://discourse.vtk.org/t/mirroring-and-normals/2767)

I will see if normals are the problem.  
Update: disabling normal computation fixed the issue. I guess I can use vtkReverseSense and flip normals if the matrix has a negative determinant.
