martinRenou / Odysis

Jupyter Interactive Widgets library for 3-D mesh analysis
MIT License
15 stars 2 forks source link

Shading? #29

Open banesullivan opened 5 years ago

banesullivan commented 5 years ago

Are there any ways to shade a mesh? For example, when viewing a mesh without any scalar data, it's rather difficult to interpret:

import pyvista as pv
from pyvista import examples

pvmesh = examples.download_dragon()

import odysis as ody
mesh = ody.Mesh.from_vtk(pvmesh)

ody.scene(mesh=mesh)
ody.plot()

Screen Shot 2019-10-13 at 1 27 32 PM

banesullivan commented 5 years ago

Whoops this is a duplicate-ish of #5 (I should really look around before posting issues)

martinRenou commented 5 years ago

No worries!

Well, the thing is that Odysis is made for analysing data bound to meshes (after some computation). If there are no data, there is nothing to analyse.

Also, concerning lights and shading, the problem I find with lights computation in shaders is that it alters the color-mapping colors.. So I find it pretty annoying.

One way we could fix this would be by adding the possibility to enable/disable lightings in shaders.