Why are the cells with reversed normal always black even the Backface property got set?

Hello,I need to set the one face of the cell with reversed normal blue,and the another face to red.Test code like this:

#include <vtkVersion.h>
#include <vtkNew.h>

#include <vtkPolyDataMapper.h>
#include <vtkProperty.h>
#include <vtkPolyData.h>
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkSphereSource.h>

int main(int argc, char *argv[])
{
	vtkNew<vtkSphereSource> source;
	source->SetPhiResolution(10);
	source->SetThetaResolution(10);
	source->Update();

	vtkNew<vtkPolyDataMapper> mapper;
	mapper->SetInputConnection(source->GetOutputPort());
	mapper->Update();

	vtkNew<vtkActor> actor;
	actor->SetMapper(mapper);

	vtkNew<vtkRenderer> ren;
	vtkNew<vtkRenderWindow> renWin;
	renWin->AddRenderer(ren);
	vtkNew<vtkRenderWindowInteractor> iren;
	iren->SetRenderWindow(renWin);

	ren->AddActor(actor);
	ren->SetBackground(.2, .3, .4);

	for (int id = 0; id < 100; id++)
	{
		dynamic_cast<vtkPolyData*>(actor->GetMapper()->GetInput())->ReverseCell(id);
	}

	actor->GetProperty()->EdgeVisibilityOn();
	actor->GetProperty()->SetColor(0, 0, 1);
	actor->GetProperty()->SetEdgeColor(1, 1, 1);

	vtkProperty *bp = vtkProperty::New();
	bp->SetColor(0, 1, 0);
	actor->SetBackfaceProperty(bp);


	renWin->Render();
	iren->Start();

	return EXIT_SUCCESS;
}

But two faces of this kind of cell are always show black like this,

even the back face property got set.

So,how to set the different colors for each face of the cell with reversed normal?

They are black because the polygon winding and surface normal direction are inconsistent. If you want colored cells then a better way to do it is by adding a scalar array to the celldata.

Hello,

Please, take a look at this: Is it possible to set the different color for front/back face of a cell?

take care,

PC