Intel® Embree Ray Tracing Kernels
Discussion forum on the open source ray tracing kernels for fast photo-realistic rendering on Intel® CPU(s)

changing ambient light in realtime

Gavin
Beginner
246 Views

hi how do i change an ambient light in realtime i added it at using the normal -ambientlight args

for gamma i was able to add extra function in like

void setgamma(float gamma)
 {
        g_device->rtSetFloat1(g_tonemapper, "gamma", gamma);
        g_device->rtCommit(g_tonemapper);
 }

and it works fine but the lights are added as a primative and im not so sure how to go about this also how would i change a material color also along these lines

many thanks

0 Kudos
1 Reply
SvenW_Intel
Moderator
246 Views

The Embree renderer is designed for renderer single frames, support for dynamic changes is limited. When changing the color of an object you have to set the color using some rtSetFloat3 call, them commit using a rtCommit call. Now your handle refers to a new object and you have to recreate the scene again. There is currently no way around rebuilding the scene.

0 Kudos
Reply