When a Rhino.Display.DisplayMaterial has a bitmap texture (via .SetBitmapTexture()), its display behavior depends on whether advanced GPU lighting is enabled.
The behavior on the left (where GPU lighting is OFF and the material behaves as an emitter) is what I want all the time. Is there a way to enforce this in RhinoCommon?
I canât check this as Iâm away from the computer but how about using the bitmap as the emissive input of the DisplayMaterial and then feeding a Black color into the Diffuse?
SetBitmapTexture() is called on the DisplayMaterial itself. As far as I can tell, there is no way to specify which propert(ies) the texture ought to apply to. The Emission property is settable, but itâs merely a Color. Ideally one would have SetDiffuseTexture() and SetEmissionTexture() methods, to disambiguate.
As an alternative, Iâd take being able to toggle âadvanced GPU lightingâ programmatically. But thatâs decidedly less polite, and I donât see a RhinoCommon hook for it eitherâŚ
In Rhino.DocObjects.Material there is a property DisableLighting. This works for me.
Apparently this corresponds to the âSelf Illuminationâ button in the Materials panel.
Then you will have to construct the DisplayMaterial from this Material.