maximeraafat / BlenderNeRF

Easy NeRF synthetic dataset creation within Blender
MIT License
769 stars 47 forks source link

Just a question really #37

Closed PLAN8VR closed 2 months ago

PLAN8VR commented 3 months ago

Hi, thanks for releasing this great tool!

I'm just wondering why the COS cameras have to be random order? Is there a specific reason for this? If they were sequential, it would make more sense when/if checking through them afterwards to identify any clipping or areas that need improvement.

Also, it would be handy to be able to preview the cameras before render (maybe it can do this already but I dont know how)

Anyway, thanks again!

maximeraafat commented 3 months ago

Hi @PLAN8VR, thanks for your question!

The COS method follows the implementation from the original NeRF code (the original script is linked in this issue). NeRFs and other reconstruction methods essentially do best when all possible view angles are visible in the training data. Randomly placing a camera on a sphere with constant radius while looking at the centre is one of the easiest way to ensure full visibility coverage, both from a methodology and implementation point of view. In other words, the camera in the COS method does not really follow any order, but instead gets moved to a new randomly sampled position on the sphere with every new frame.

If you need a more sequential camera motion though, you can achieve that by tracking the camera to an empty placed at the centre of your object of interest. You can then animate the empty object as desired, and use the SOF or TTC method to extract the corresponding camera data. Let me know if you encounter any difficulties with that!

As for your last question, just select the BlenderNeRF Camera (when toggled on in the COS preview mode) as active camera. The GIF below demonstrates how to do this. Hope this helps :)

COS

PLAN8VR commented 3 months ago

Hi, thanks for taking the time to answer in such detail!

All the best!