# Rendering on Adroit-Vis

## Introduction

***

While rendering on one's own computer is simple, you can also render on a cluster to speed up your render up to around 3x speed.

**This page is only applicable if you have a Princeton University NetID and a registered Adroit account. To register an account, click** [**here**](https://forms.rc.princeton.edu/registration/?q=adroit)**.**

## Rendering on Adroit-Vis

***

We'll be using the Adroit-Vis super computer for this process. The first step in rendering Blender files is adding our files to Adroit-Vis' server.&#x20;

We can do this through commands or by using the Adroit-Vis website. To load in files with commands, we can use an inverted (and edited) version of the `scp -r` command seen in the [Conclusion](#conclusion). However, I find that using the web browser's GUI makes this step easier to understand, so I'll be going over adding files this way.&#x20;

To use Adroit-Vis on a web browser, go to [https://myadroit.princeton.edu/](https://myadroit.princeton.edu/) and log in using your NetID.

Once you're logged in, go to the top bar and press Files and click on your home directory. From here, create a new folder somewhere that is going to hold your Blender files:

<figure><img src="https://3388232048-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfzMZbzYJd16KswvkEBDA%2Fuploads%2F5Q8qXsU4Sqt3BO9YPTU6%2Fimage.png?alt=media&#x26;token=7ff4f867-6af9-495e-b29f-b95b6c95a031" alt="" width="563"><figcaption></figcaption></figure>

**Make sure to add in your image files for the raster data in the same location as it is locally**, so that the Blender file on Adroit-Vis can reference the same images with the same relative path (here, that's in gis\_data). I'm also adding the PNG files I used to make the trees (in blender\_trees), since they are required for loading the alive\_trees texture within our model.

**Be sure that the Blender file you're inputting has all the proper settings**, since we won't be able to edit them from Adroit-Vis (don't worry about the file output path or the render engine, we'll coordinate those with Adroit-Vis later).

Next, open up a terminal on your local computer. We'll first need to ssh into adroit-vis:

```
ssh NETID@adroit-vis.princeton.edu
```

Now, we'll need to run (**and edit**) one command to render a set of frames:

```
/home/efeibush/blender/blender-4.2.0-linux-x64/blender -b file.blend -o /home/NETID/Blender/nyc_trees/images -E CYCLES  -s 1 -e 5 -a  --  --cycles-device OPTIX
```

This command uses the Blender application in the efeibush directory to open the blender file in the background (-b file.blend), sets an output path (-o /home/NETID/) , uses the Cycles render engine (-E), starts at frame 1 (-s 1), ends at frame 5 (-e 5), renders all frames between (-a), and uses NVIDIA's OPTIX cycles device (which is the fastest of the handful of devices) to render out frames (-- --cycles-device OPTIX). Change the variables to match your scene. You can read more about how to customize the settings of this command [here](https://docs.blender.org/manual/en/latest/advanced/command_line/arguments.html#command-line-args-cycles-render-options).&#x20;

Make sure that you're in the working directory where the .blend file is located.

When you run this command, you'll see a bunch of text outputted that marks how far along Blender is when rendering each frame. You can make sure each frame is being rendered properly by looking back in the home directory on [https://myadroit.princeton.edu/](https://myadroit.princeton.edu/).

### Of Note:

Note that you can also open up the Blender GUI from Adroit-Vis. The GUI is a bit slow, so it's best to render as described above (still, this is an option):&#x20;

On [https://myadroit.princeton.edu/](https://myadroit.princeton.edu/), go to My Interactive Sessions and click on Desktop under the Interactive Apps section to the left. You should request an appropriate amount of time.

Once you're able to launch the desktop, open it up and click on the middle terminal icon at the top left:

<figure><img src="https://3388232048-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfzMZbzYJd16KswvkEBDA%2Fuploads%2FhLNVJ7KUIvVonLqusf8f%2Fimage.png?alt=media&#x26;token=a37d31fb-f00d-42a5-aff6-fd49ca691df2" alt=""><figcaption></figcaption></figure>

This should open up a terminal within the virtual desktop titled "Mate Terminal".

Next, run the following command on the terminal:

```
/home/efeibush/blender/blender-4.2.0-linux-x64/blender
```

This opens up a copy of Blender that is stored within the efeibush directory. You should now see a copy of Blender within your virtual desktop. Within Blender, go to File -> Open and open the Blender file you stored at the start of this section. You'll now see the Blender file running on Adroit-Vis, and you can edit the file and render it from here (though it would take up more resources).

## Conclusion

***

To save the images you outputted to your directory on Adroit-Vis, you can use this command on a local terminal:

```
scp -r adroit:/home/NETID/Blender/nyc_trees/images/ /Users/XXXXXX/Documents/images/
```

This takes the all files from Adroit-Vis and saves them to the local directory, where you can then import them into a video editing software.
