[WIP] Blender 2.8 eevee 180 and 360 degree rendering script

Hello everyone!

So I’m in the progress of making a script to render 180 and 360 degree images and videos in blender.
The current script can already do the above, although there are still adjustments to be made. Here is an example of the result using the add-on:

360 Degree image:

180 degree VR image

Note: I’m not too good with rendering stuff in blender yet, all the discontinuities in the 360 image are purely because I’m bad at blender and not because of the script, just picked a random project from blenders own website as a demonstration, the VR image does have some discontinuities which are most definitely because of the script but could also partially be because of the scene
You can view the above image using a smartphone with apps like VR Media Player for Android, or an equivalent on iOS. There are also several desktop applications that allow you to view it as well.

This is the script forr all who are interested: VRRenderer.py (28.0 KB)
The most up to date script (VRRenderer.py) can be downloaded from my GitHub page.

The script uses OpenGL shaders to project the image from a cubemap to spherical (equirectangular) projection), meaning it first renders a cube (so 6 faces), the camera must be set to perspective mode and 90 degree FOV for this to work (I plan to make it automatically switch to that), for 180 degree images, it renders the front face of the cube and only half of the remaining side faces, to reduce load. There is a limit to how high the resolution can be such that the renders produced will not be corrupted, but this limit is higher than what most people will use anyway.
Another important note is that the render resolution you set in your scene is not going to be the resolution of the final render. For 180 degree images the resolution will be doubled on both the width and the height, whereas for 360 degree images the resolution will be 4 times the scene resolution on the width and double the height (I plan to change it such that the resolution you put in is the final render output resolution)

If you find any bugs or have features you want me to add, create a new issue on the GitHub page.

Try it out and tell me what you think!

9 Likes

Strange, in your script I don’t see a bl_info. Should it be specified it is for Blender 2.80 etc.? I this the correct link: https://github.com/EternalTrail/eeVR ?
It’s installig but won’t show up in the preferences > addons.

Update: ahh, it’s a script, not addon. Didn’t read what you wrote:
open the script in Blender and run it (and press the register checkbox if you want it to persist for that blender file). Then a tool panel will appear in the 3D Viewport with 4 buttons that can be pressed to render 360° and 180° images and videos.

1 Like

Sorry, I put add-on in the title so that was a bit misleading, edited it. Though hopefully it becomes a proper add-on in the future. :slightly_smiling_face: Still a long way to go, however…

2 Likes

Is running a script hard to do?
I have never done it before.

It’s not difficult, you just have to open blender, go to the scripting tab which is at the top of the blender window, from there you can open the script in the text editor, and finally click run script. The script should now have created a toolbar in your blender 3D viewport which can be used to render an image or an animation.

2 Likes

Thanks a lot it looks like it works for frames i will test an animation later and let you know.

It rendered the 360 panoramic frames really quickly. When i rendered the video file and then played it, i did spot black lines in the “box projection” i think a little bit.

By any chance you are running an Apple machine or you’re on Linux? It might work differently on those machines.

Im on a macOS.

I will see if I can simulate your results once I get my PC using MacOS on a virtual machine and implement a fix if possible! For now best I can do is recommend trying to render on a windows machine, since that should work OK.

1 Like

Hi there!.
Thank you very much for your effort @EternalTrail .
I want to create a panoramic 360º image with Eevee and your script. I’ve set an output resolution of 250px x 250px as testing mode.
I’m trying to run your script under Blender 2.81a but I think it doesn’t work.
Can you see my configuration and tell me if I did something wrong?
This is a capture with the settings and result:


Please, help me.

1 Like

Hi there! The result won’t be displayed in blender, it will be saved to the location of the .blend file instead! I can add the feature to display the final render in the future.

1 Like

Oh, it’s true!. I have my directory filled with lots of tests done!.
IT WORKS!.

1 Like

Glad it works for you!

1 Like

hello, thanks for your work. I’ve tried your script and it works like a charm when i tried it on 360 image render. but when i try rendering 360 video, i get an error.


i’ve made sure the camera is set to perspective and 90 degrees FOV. and i’ve tried a couple output format and the error still pops up.

And this is the .blend file: tesssst.blend (572.1 KB)

Can you help me?

Hi Simon, the script can only render videos frame by frame and cannot export stuff as a video yet. I planned to implement this in the future but due to my current situation I don’t have the time to be working on this project.
So basically to solve your problem you need to have your file format settings selected as if you were rendering a still image which will create a folder with each frame of your animation that you can later stitch together in blender or video editing software of your choice.

thanks for the fast response. i am used to rendering animation trough png format and import as image sequence with blender video editor. so i tried rendering it with png format but this is the result

it stopped there and in blender this error popped up

or maybe i misunderstood/ don’t understand this part

Hi again,

It might be that you’re using an older version of the script, download the latest one from https://github.com/EternalTrail/eeVR since it seems to working fine for me with your file.

That’s seems to be the problem, thank you so much your work is awesome and very helpful for my group’s college project.

1 Like

Hi Andrius!
I get an error when I put FOV to 360. If I choose 270 or less, then everything is fine

line 591, in execute
renderer = VRRenderer(bpy.context.scene.render.use_multiview, False, mode, FOV)
line 200, in init
self.frag_shader = self.frag_shader.format(self.FOV)
ValueError: unexpected ‘{’ in field name