[vtkusers] Changing the direction of Z

Paul Harris harris.pc at gmail.com
Tue Oct 26 08:06:51 EDT 2010


>  So you are saying that whatever coordinates that are passed to actors must
>> already be in VTK's world coordinate system, which is fixed.   If I need to
>> (eg) flip the entire scene (all of the models), I can't adjust the world
>> coordinate system, instead I must adjust all of the models instead (eg via
>> vtkPolyDataFilter).
>>
>>  The essential problem is the handedness of a model is a priori knowledge.
> If you can identify the models that need to be reversed by file type or
> name, or if you could add an additional control statement to the model to
> identify the need for reversal, you could extend the reader for that data
>  to process the command or extend the reader to implicitly ivert the
> coordinates in the reader.
>
>
I still believe there is a disconnect between what I understand, and what
you understand.  At the risk of p***ing you off, I'll try and put my case
again...

I remember seeing an email asking about how to reverse an entire screen for
display in a mirror.  That is what I'm after, I want to be able to flick a
switch and flip the entire screen.

I don't understand why the handedness is coming into play, because I have
two-sided lighting turned on... my models have normals pointing in both
directions as they are messy and do not have consistent vertex ordering.

To me, it appears that the lighting decisions are decided *before* the
UserMatrix transformation is applied, so the two-sided-lighting equation
lights the side of the face that ORIGINALLY faced the camera, and then its
flipped so that face is now facing away from the camera (thus appearing
darker).

I don't see why: if two-sided lighting is on, why does it matter if the
coordinates are flipped before its pushed into the actor, or after and then
they are flipped via UserMatrix (either on the actor, or on the camera).



>  I was hoping that I could adjust the world coordinate system - you can do
>> it at the camera (eg adding a Yaw for 3d glasses), but that trick doesn't
>> work if you have to flip one of the axes due to lighting problems.
>>
>>  I am reading the "due to lighting problems" as a description of the
> symptom observed because the transform scale at the actor does not appear to
> affect the normals of the objects, only the coordinates.
>

To be clear, I believe that the normals should not be an issue if two-sided
lighting is enabled.  My normals are incorrect to begin with, why should
they matter?   Rather, I think the lighting problems that I have
demonstrated is due to two-sided-lighting being applied before UserMatrix
transformations are applied.

That is my guess, I'm on a learning curve.

thanks
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101026/bbd3c020/attachment.htm>


More information about the vtkusers mailing list