Dear Users, I would like kindly ask you for any help/idea for new illumination model.<div><br></div><div><span style="background-color:transparent">It looks that </span>vtk supports two basic shading models - Gouraund and Phong and I found one lighting preset (vtkLightKit). I am working on new lighting model that use intensity color of points resulting from other shading model and according to complex algorithm generate absolutely new colors. New algorithm produce inconsistent lights (lights are specifically assigned only to some parts of input ), probably no lights will be preset in rendering pipeline only final colors will be generated and shown, there will be special blending and shadowing and other techniques like back-lighting . </div>
<div><br></div><div>Currently I am working on first step , generate new colors and I am looking for some function like color = GetColor (mesh point ), that is able return real rendered color of the point.</div><div><div>Example: user presets scene, lights, materials or for example preset lookup function and chooses Phong shading but for rendering he will use new model. I am taking into account materials and object colors only as an example, I do not know whether they will be finally incorporated due to potential complexity. </div>
<div><br></div><div>My algorithm has to know these settings, and generate slightly different illumination. So result will be only colors in this step. </div></div>
<div><br></div><div>Thus my question can be formalise as follow : Is there any possibility how to obtain color of the point (in mesh) in the current scene according to chosen illumination model and object/light properties and view vector (without shading) using vtk CPU code ? </div>
<div>Simple version: Is there any possibility how to obtain gray color value of the point (in mesh) in the current scene according to chosen illumination model and directional white lights and likely white object using vtk CPU code ? </div>

<div>I need exact color of the object as it is seen after rendering without shading. </div><div><br></div><div>I found two shaders that seem to do what I am looking for : vtkLighting_s.glsl and vtkLightingHelper_s.glsl </div>

<div>With current knowledge I do not know how precisely they match color computation as is done with vtk rendering pipeline. </div><div>I would like use original vtk design as close as possible .</div><div><br></div><div>
If there is no such CPU function I have following ideas : </div><div>
1) One approach could be , dump mesh points into 3D texture (with normals) and simulate some illumination via shaders like those mentioned, store result into new 3d texture  and than unpack obtained illumiation back into CPU and store it to some array as point property.</div>

<div>2) Other approach could be , rewrite shaders code into CPU class (if such does not exist ? ) that should know all mentioned properties ... I am not sure whether it is possible</div><div>3) Most simple approach would be to generate vtk independent illumination function, ignore all vtk settigns (ligts, object colors, light properties ..), turn off lighting, and hardcoded compute illumination.</div>

<div>For example : i will use 0.4*specular term +0.6*diffuse term.  No color is taken into account, only shading with specular and diffuse shading. (very simple version of Phong)</div><div>I am not able to validate estimate complexity for now. </div>
<div><br></div><div>Further I do not know whether this can be vtkAlgorithm, or I will have to write new render pipeline (I saw vtkRenderPasses ) or it will be vtkLightPass . </div>
<div><br></div><div>As I am new in vtk, I would appreciate any advice concerning design, your opinion to proposals,  reference examples (there are  some GPU rendering examples ), texts or whatever concerning illumination concept for vtk. </div>

<div><br></div><div>Thanks in advance. </div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div> </div>