Hi,

I’m using VTK 8.2.0 and OSPRay 1.8.5 from python to show some particle traces (using the Tube filter).

I’m having trouble transferring my colour map to the ray tracer. The particle traces remain black.

Is there a way to transfer the colour properties from my cells to the material OSPRay will use to render?

Or must I have static material properties?

The suggestion by @Dave_DeMarle in How to set up material lookuptable for OSPRay also doesn’t work out for me yet, but might work since I have a discrete colourmap in mind.

Any input is welcome,

Thanks,

Daan

ps: I create a material lookup table (Value Indexed) as follows:

```
def W_lut(n_Z=74):
import matplotlib
import matplotlib.cm as cm
lut = vtk.vtkLookupTable()
lut.SetNumberOfTableValues(n_Z+1)
lut.Build()
norm = matplotlib.colors.Normalize(vmin=0,vmax=74,clip=True)
mapper = cm.ScalarMappable(norm=norm, cmap=cm.inferno)
ll = []
for i, u in enumerate(range(75)):
lut.SetTableValue(i, mapper.to_rgba(u))
ll.append('W_%d'%(i,))
lut.Annotations = ll
lut.InterpretValuesAsCategories = 1
return lut
```

and create the materials as:

```
# Add colormap variables (75 discrete levels)
import matplotlib
import matplotlib.cm as cm
norm = matplotlib.colors.Normalize(vmin=0,vmax=74,clip=True)
mapper = cm.ScalarMappable(norm=norm, cmap=cm.inferno)
for i, u in enumerate(range(75)):
name = 'W_%d'%(i,)
ml.AddMaterial(name, "Alloy")
ml.AddShaderVariable(name, "color", 3, mapper.to_rgba(u)[0:3])
```