maximeraafat / BlenderNeRF

Easy NeRF synthetic dataset creation within Blender
MIT License
811 stars 51 forks source link

How to automatic the process without using blender #23

Closed enor2017 closed 1 year ago

enor2017 commented 1 year ago

Thank you for the wonderful work!

Now since the addon only works inside Blender, I have to manually open a 3D model, set parameters, and run the script. May I know whether I can automate this process by executing a Python script?

Thank you so much again!

maximeraafat commented 1 year ago

Hi @enor2017, thanks a lot for your interest in BlenderNeRF!

The plugin is designed to be used with a simple user interface within Blender, you could however write a python script utilising the tools from BlenderNeRF to automate the capturing process. Though in this case, you might want to have a look the original script written by the authors behind NeRF (the link to their script is provided in this issue).

The authors' script provides a simplified scenario of the Camera on Sphere method. If you need more control over what to render and export, feel free to copy some of the methods in my code. The most important ones are get_camera_intrinsics and get_camera_extrinsics in the blender_nerf_operator.py file, and you can checkout the sof/ttc/cos_operator.py scripts to see how these functions are being called for each respective method.

Let me know whether you run into any issues with writing such a script, or whether you struggle with understanding some code parts of the plugin.

enor2017 commented 1 year ago

Hi @enor2017, thanks a lot for your interest in BlenderNeRF!

The plugin is designed to be used with a simple user interface within Blender, you could however write a python script utilising the tools from BlenderNeRF to automate the capturing process. Though in this case, you might want to have a look the original script written by the authors behind NeRF (the link to their script is provided in this issue).

The authors' script provides a simplified scenario of the Camera on Sphere method. If you need more control over what to render and export, feel free to copy some of the methods in my code. The most important ones are get_camera_intrinsics and get_camera_extrinsics in the blender_nerf_operator.py file, and you can checkout the sof/ttc/cos_operator.py scripts to see how these functions are being called for each respective method.

Let me know whether you run into any issues with writing such a script, or whether you struggle with understanding some code parts of the plugin.

Hi @maximeraafat , thank you so much for your patient instructions; it works very well and your works are wonderful!

maximeraafat commented 1 year ago

Hi @enor2017, thank you so much for your kind words and I'm glad I was of help! :)