Hello vtk users,<br><br>I'm representing a bone in 3D generated with the vtkContourFilter. The following code shows a red bone and a white light illuminating it.My problem is that I don't know how to configure the actor properties for getting a grey bone iluminated by a white light.<br>
<br> vtkContourFilter *contourFilter = vtkContourFilter::New();<br> vtkSmoothPolyDataFilter *smoothFilter = vtkSmoothPolyDataFilter::New();<br> vtkPolyDataNormals *polyDataNormals = vtkPolyDataNormals::New();<br>
<br> contourFilter->SetInput(islandRemoval->GetOutput());<br> contourFilter->Update();<br> smoothFilter->SetInputConnection(contourFilter->GetOutputPort());<br> smoothFilter->SetNumberOfIterations(30);<br>
smoothFilter->SetRelaxationFactor(1.0);<br> smoothFilter->Update();<br> polyDataNormals->SetInputConnection(smoothFilter->GetOutputPort());<br> polyDataNormals->Update();<br><br> this->BoneMapper->SetInput(this->polyDataNormals->getOutput());<br>
this->BoneMapper->ImmediateModeRenderingOn();<br> this->BoneMapper->Update();<br> this->BoneActor->SetMapper(this->BoneMapper);<br> this->BoneActor->GetProperty()->SetColor(1.0, 1.0, 1.0);<br>
this->BoneActor->GetProperty()->SetAmbientColor(1.0, 1.0, 1.0);<br> this->BoneActor->GetProperty()->SetSpecularColor(1.0, 1.0, 1.0);<br> this->BoneActor->GetProperty()->SetDiffuse(0.0);<br>
this->BoneActor->GetProperty()->SetSpecular(10.0);<br> this->BoneActor->GetProperty()->SetSpecularPower(5);<br><br>Can anybody helps me?<br><br><br>Thanks a lot.<br><br>Iván García Martínez - Spain.<br>