How to adjust the brightness and direction of the default light source?

  1. FAQ
  2. »
  3. Vectorization and Rendering Questions

You can add distant light into your drawing, after that you can disable default lighting since your graphics scene will contain non-default light.

OdDbLightPtr pLight = OdDbLight::createObject();
pLight->setDatabaseDefaults(pDb);
pLight->setLightType(OdGiDrawable::kDistantLight);
pLight->setLightDirection(OdGeVector3d::kZAxis);
OdDbBlockTableRecord::cast(pDb->getActiveLayoutBTRId().openObject(OdDb::kForWrite))->appendOdDbEntity(pLight);