[vtkusers] Re: Fw: point rendering

Jan Fransens jan.fransens at uhasselt.be
Wed Apr 5 10:57:59 EDT 2006


Hi,

using only the ambient light results in a completely white, unshaded point 
cloud (I did not specify per_point colors). I also tried adding some lights, 
but the shading results seemed quite strange...

Jan

----- Original Message ----- 
From: "Goodwin Lawlor" <goodwin.lawlor at ucd.ie>
To: <vtkusers at public.kitware.com>
Sent: Wednesday, April 05, 2006 3:52 PM
Subject: [vtkusers] Re: Fw: point rendering


> Jan Fransens wrote:
>> Hi,
>>  I am trying to render a point cloud of 3d coordinates with associated 
>> normals. However, during rendering, points with a normal facing away are 
>> rendered completely black. Points with front facing normals are rendered 
>> fine.
>>  pActor1->GetProperty()->SetPointSize(2.0);
>> pActor1->GetProperty()->SetColor(1.0,1.0,1.0);
>> pActor1->GetProperty()->SetRepresentationToPoints();   // |_rendering 
>> behaviour doesn't change
>> pActor1->SetBackfaceProperty(pActor1->GetProperty());// |
>>
>> pRenWin->GetRenderer()->TwoSidedLightingOn(); // same result
>> pRenWin->GetRenderer()->AddActor(pActor1);
>> pRenWin->GetRenderer()->ResetCamera();
>> pRenWin->show();
>>  Does anyone know what causes this problem (I'm using Vtk 4.2)
>>  Many thanks,
>>  Jan
>
> Hi Jan,
>
> Your points are being shaded with the backfacing points getting no 
> light... try:
>
> pActor1->GetProperty()->SetDiffuse(0);
> pActor1->GetProperty()->SetAmbient(1);
>
> You wont need the BackfaceProperty to be set.
>
> hth
>
> Goodwin
>
> _______________________________________________
> This is the private VTK discussion list. Please keep messages on-topic. 
> Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers 




More information about the vtkusers mailing list