RenderKit / ospray

An Open, Scalable, Portable, Ray Tracing Based Rendering Engine for High-Fidelity Visualization
http://ospray.org
Apache License 2.0
985 stars 180 forks source link

Non-uniform affine scaling results in incorrect normals #446

Closed StasJ closed 3 years ago

StasJ commented 4 years ago

Original isosurface:

1x

The same isosurface after its Z coordinates are scaled by 1/100 and then scaled 100x by an affine transform:

100x

Twinklebear commented 3 years ago

Hi @StasJ , just to clarify: Are you applying this non-uniform scaling through a transform on the instance of through the grid spacing parameter?

StasJ commented 3 years ago

Hi @Twinklebear, I am applying the non-uniform scaling through a transform.

StasJ commented 3 years ago

The issue is fixed however it appears to have introduced regressions in the isosurface lighting as a whole.

Rendered with 2.2.0:

2 2 0

Rendered with devel:

devel

johguenther commented 3 years ago

The changed lighting is likely independent of the isosurface and rather due to the renderer changes introduced in v2.3.0: SciVis now again uses all light sources and again evaluates specular material properties. If you like the previous lighting better, then you can use the new ao renderer (a rename of the v2.2 scivis).

johguenther commented 3 years ago

Also fixes #344.