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:
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.
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.
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. Still a long way to go, however…
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.
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.
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.
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:
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.
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.
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 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.
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