EternalTrail / eeVR

Blender addon for rendering equirectangular and dome projection images using the eevee rendering engine.
GNU General Public License v3.0
175 stars 47 forks source link

Does not render anything on 3.5 / 3.4 #48

Closed Waldgeister closed 11 months ago

Waldgeister commented 1 year ago

Unfortunately the plugin seems not to work on Blender 3.5 and also 3.4. Or is due to the Apple Silicon Architecture? The scene is nothing special just the blank default one.

`bpy.ops.object.camera_add(enter_editmode=False, align='VIEW', location=(0, 0, 0), rotation=(1.47306, -2.7808e-08, -1.41023), scale=(1, 1, 1))

Python: Traceback (most recent call last): File "/Users/xxx/Library/Application Support/Blender/3.5/scripts/addons/eeVR-master/init.py", line 55, in execute renderer = Renderer(context, False) File "/Users/xxx/Library/Application Support/Blender/3.5/scripts/addons/eeVR-master/renderer.py", line 371, in init self.shader = gpu.types.GPUShader(vertex_shader, frag_shader)

Exception: Shader Compile Error, see console for more details`

ecations commented 1 year ago

For me EeVR doesn't even show up in the latest Blender (3.5.0). It used to require going to the "testing" category in the addons manager, but now there is no longer such a tab..

nagadomi commented 1 year ago

@ecations I have posted a fix for that issue in #49, works with only one line change. @Waldgeister With the above changes, it worked on Blender 3.5 + Linux, so I think the problem is due to macOS. might be related to https://blender.stackexchange.com/questions/286919/addon-stopped-working-on-mac-metal-in-v3-5-due-to-shader-compile-error-console

Waldgeister commented 1 year ago

@nagadomi Yes I found that one too and checked the source of renderer.py. But it does not use any of the listed glEnable, glDisable or ShaderCreateInfo commands.

nagadomi commented 1 year ago

Maybe the shader code should be compiled using new gpu.shader.create_from_info() instead of gpu.types.GPUShader(). https://github.com/EternalTrail/eeVR/blob/86048cd3e24ed25e43f62cfd125f88ad0a71e7d9/renderer.py#L371

I don't have a mac machine so I am not sure that is the cause.

Waldgeister commented 1 year ago

I would love to fix it. But I'm only used to develop in Swift. So the stackexchange example is quite cryptic to me. Testing shouldn't be a problem.

nagadomi commented 1 year ago

I've tried updating renderer.py to use the new gpu module. Not tested in detail. (many of the texture parameters has been lost, so there may be differences from previous versions) https://github.com/nagadomi/eeVR/commit/4781816c95d6c5f549e5cba916437e40aa823c49

Note that this commit does not include the changes in #49.

Sasatari commented 1 year ago

Two things about Mac (M1 in use here):

Anyway, so far I only get complete black images, but at least in 4096x4096 ;) Still exploring.

Waldgeister commented 1 year ago

@Sasatari Just tested the openGL workaround: The rendered output is indeed completely black. But even more, all the objects, camera, etc turn also black in the 3D viewport. I had to change the view port shading several times and back again to get regular coloring. Screenshot allblack

Sasatari commented 1 year ago

@Sasatari Just tested the openGL workaround: The rendered output is indeed completely black. But even more, all the objects, camera, etc turn also black in the 3D viewport. I had to change the view port shading several times and back again to get regular coloring.

Yes, same here, but I´m not deep enough into Blender (My main software still is Lightwave 3D) to figure out, why this happens. And actually have a severe lack of time. Will try to find some Blender on Mac users who can help with that.

Sasatari commented 1 year ago

Just did a View Render (F11) and there I got the expected result. So it seems to work in general, must be a simple setting somewhere I guess.

RenderView
Waldgeister commented 1 year ago

I guess this is only one of the segments you are seeing in the viewer. Did you activate the "keep temporary work files" in options?

This is how it looks for me. Both in Metal and OpenGL with the new b35 version of @nagadomi

Black result 2023-05-12 um 21 25 13
Sasatari commented 1 year ago

Didn´t check temp, now I did and this is what I get:

keepTemp

Edit: Forget what I wrote, you mean Blender 3.5, don´t you? Just tried that and then updated to 3.5.1 with absolutely same results.

nagadomi commented 1 year ago

I have fixed the back image problem on macOS in my b35 branch. For installation instructions, see https://github.com/nagadomi/eeVR/commit/4781816c95d6c5f549e5cba916437e40aa823c49#commitcomment-111058232

I tested that it works with both OpenGL and Metal backends on AWS EC2 mac2.metal instance. But I have not checked with VR headset.

EDIT: I confirmed that it is working fine on VR headset (SBS).

Sasatari commented 1 year ago

Thank you so much! This works fine on my 2020 13 inch M1 MBP with Blender 3.5

SAM-tak commented 11 months ago

Already fixed in #51