Skip to content

Commit

Permalink
README.md typo/fix + assert if no cameras selected (SOF and TTC)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximeraafat committed Jul 27, 2022
1 parent 1dada54 commit e396888
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This quick and user friendly tool attempts to narrow the gap between the artisti

Rendering is a computationally intensive process ; generating photorealistic scenes can take seconds to hours depending on the scene complexity, hardware properties and the computational resources available to the 3D software.

While obtaining renderings might be considered a straight forward process for 3D artists, obtaining the additional camera information necessary for NeRF can be discouraging, even for python familiar users or machine learning developers. This add-on aims at solving this issue, enabling artists to easily integrate AI in their creative flow while also facilitating research.
While rendering might be considered a straight forward process for 3D artists, obtaining the additional camera information necessary for NeRF can be discouraging, even for python familiar users or machine learning developers. This add-on aims at solving this issue, enabling artists to easily integrate AI in their creative flow while also facilitating research.


## Installation
Expand All @@ -33,7 +33,7 @@ While obtaining renderings might be considered a straight forward process for 3D
## Setting

**Blender x NeRF** proposes 3 methods, which are discussed in the sub-sections below. From now on when mentioning *training* data, I will refer to the data required by NeRF to *train* (or teach) the AI model. Similarly, the *testing* data will refer to the images predicted by the AI.
When executed, each of the 3 methods generate an archived ZIP file, containing a training and testing folder. Both folders contain a `transforms_train.json` file, respectively `transforms_test.json` file, with the necessary camera information for NeRF to properly train and test on images.
When executed, each of the 3 methods generates an archived ZIP file, containing a training and testing folder. Both folders contain a `transforms_train.json` file, respectively `transforms_test.json` file, with the necessary camera information for NeRF to properly train and test on images.

### SOF : Subset of Frames

Expand Down Expand Up @@ -107,3 +107,6 @@ Open this [COLAB notebook](https://colab.research.google.com/drive/1CtF_0FgwzCZM
* COS method (add-on release version 3.0)
* Support for other NeRF implementations, for example [Torch NGP](https://github.com/ashawkey/torch-ngp)?
* Once all methods are released : publish simple explanatory tutorial video
<!--
* Enable user defined NeRF resolution in Notebook and COLAB : if set to 0, use Blender scene resolution
-->
5 changes: 5 additions & 0 deletions sof_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ def execute(self, context):
scene = context.scene
camera = scene.camera

# check if camera is selected : next errors depend on an existing camera
if camera == None:
self.report({'ERROR'}, 'Be sure to have a selected camera!')
return {'FINISHED'}

# if there is an error, print first error message
error_messages = self.asserts(scene, method='SOF')
if len(error_messages) > 0:
Expand Down
5 changes: 5 additions & 0 deletions ttc_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ def execute(self, context):
train_camera = scene.camera_train_target
test_camera = scene.camera_test_target

# check if cameras are selected : next errors depend on existing cameras
if train_camera == None or test_camera == None:
self.report({'ERROR'}, 'Be sure to have selected a train and test camera!')
return {'FINISHED'}

# if there is an error, print first error message
error_messages = self.asserts(scene, method='TTC')
if len(error_messages) > 0:
Expand Down

0 comments on commit e396888

Please sign in to comment.