Skip to content

Commit e396888

Browse files
committed
README.md typo/fix + assert if no cameras selected (SOF and TTC)
1 parent 1dada54 commit e396888

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This quick and user friendly tool attempts to narrow the gap between the artisti
1919

2020
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.
2121

22-
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.
22+
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.
2323

2424

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

3535
**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.
36-
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.
36+
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.
3737

3838
### SOF : Subset of Frames
3939

@@ -107,3 +107,6 @@ Open this [COLAB notebook](https://colab.research.google.com/drive/1CtF_0FgwzCZM
107107
* COS method (add-on release version 3.0)
108108
* Support for other NeRF implementations, for example [Torch NGP](https://github.com/ashawkey/torch-ngp)?
109109
* Once all methods are released : publish simple explanatory tutorial video
110+
<!--
111+
* Enable user defined NeRF resolution in Notebook and COLAB : if set to 0, use Blender scene resolution
112+
-->

sof_operator.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ def execute(self, context):
1818
scene = context.scene
1919
camera = scene.camera
2020

21+
# check if camera is selected : next errors depend on an existing camera
22+
if camera == None:
23+
self.report({'ERROR'}, 'Be sure to have a selected camera!')
24+
return {'FINISHED'}
25+
2126
# if there is an error, print first error message
2227
error_messages = self.asserts(scene, method='SOF')
2328
if len(error_messages) > 0:

ttc_operator.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ def execute(self, context):
2121
train_camera = scene.camera_train_target
2222
test_camera = scene.camera_test_target
2323

24+
# check if cameras are selected : next errors depend on existing cameras
25+
if train_camera == None or test_camera == None:
26+
self.report({'ERROR'}, 'Be sure to have selected a train and test camera!')
27+
return {'FINISHED'}
28+
2429
# if there is an error, print first error message
2530
error_messages = self.asserts(scene, method='TTC')
2631
if len(error_messages) > 0:

0 commit comments

Comments
 (0)