JamesPerlman / TurboNeRF

A render engine for NeRFs!
MIT License
312 stars 16 forks source link

Small optimization #17

Closed MrNeRF closed 1 year ago

MrNeRF commented 1 year ago

Basically loop the train_step() 16 times. Save some if statements, modulo operation in every loop and remove if statements

JamesPerlman commented 1 year ago

Actually, on second thought, I like the static keywords where they are, however, merging the occupancy grid update & the output render is not necessarily the intended behavior of the original loop.

I like to have control over the "number of steps between occupancy grid updates" and the "number of steps between output renders" independently. They do happen to be the same number right now, but I think the majority of the optimization attention should be spent elsewhere. This loop is primarily just a testing grounds for quickly running the algorithm.

I think in the future the rendering code will probably just be removed from this loop. There will be a training function, and a rendering function, and they will be separate.