Page 1 of 1

DirectionalFromCamera with reversed axis SurfaceGridSeries3D

Posted: Wed Dec 18, 2013 4:44 pm
by Greg9504
When I set the chart lighting to DirectionalFromCamera (m_chart.View3D.SetPredefinedLightingScheme(LightingScheme.DirectionalFromCamera);) with a chart that has some of it's axis reversed the lighting isn't correct. It seems to be coming from the bottom of the SurfaceGridSeries3D. I know you mentioned that if I reversed the axis I would have to modify the lighting, however I figured the built in lighting schemes would handle this automatically. Is there a work around?

See the SurfaceGrid3DTest project in the solution posted in my previous post:
http://www.arction.com/forum/download/file.php?id=137

Thanks
Greg.

Re: DirectionalFromCamera with reversed axis SurfaceGridSeri

Posted: Thu Dec 19, 2013 9:36 am
by ArctionPasi
The SurfaceGridSeries3D uses the same rendering data construction and lighting than SurfaceMeshSeries3D. That means, the surface can bend to any angle or any shape, and there's no "up" or "down" concept.

Only the other side of the surface can be lit correctly. LC makes the 3D rendering data in order of columns and rows starting from 0 indices. The light normals are computed from this order. If axis gets reversed the normals go to opposite direction. To get the correcting lighting, change surface.LightedSurface property to flip the light normals to opposite side, and to make the lighting correct.