RenderKit / ospray

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

Pseudo-color mapping on mesh surfaces #575

Closed stukowski closed 5 days ago

stukowski commented 10 months ago

I am wondering if there is a way to accomplish pseudo-color mapping for mesh surfaces with OSPRay? I need to visualize scalar quantities that are defined on a mesh's vertices.

The use of OSPTransferFunction is currently limited to 3d volumes.

The idea of using 2D textures to emulate pseudo-color mapping fails due to the out-of-bounds behavior for texture coordinates in OSPRay. There is no way to switch from the standard repeat mode to a clamp-to-edge mode, as is supported by OpenGL or ANARI samplers, for example. But maybe I overlooked something.

johguenther commented 10 months ago

Clamp2edge exists internally (used for the background texture), but is not yet exposed to be selectable via an texture parameter.

stukowski commented 10 months ago

It would be great if this UV wrap mode could be implemented for textures. This seems to be the missing piece to implement pseudo-color mapping with arbitrary color gradients for mesh, curve, and sphere geometries.