Totally black rendered images
The recording functionality (r key) should produce the rendered frames as images, to ./Playback folder. The problem is that i'm getting totally black images, even changing fps or resolution or any settings inside "camera.py".
Any guess?
I just started using this program and I'm having the same issue.
Found solution, works perfectly:
Inside ray_marcher_demo.py
from PIL import Image
from PIL import ImageOps
# REPLACE THIS:
pygame.image.save(window, 'playback/frame' + ix_str + '.png')
# WITH THIS:
glPixelStorei(GL_PACK_ALIGNMENT, 1)
data = glReadPixels(0, 0, window.get_width(), window.get_height(), GL_RGB, GL_UNSIGNED_BYTE)
image = Image.frombytes("RGB", (window.get_width(), window.get_height()), data)
image = ImageOps.flip(image)
image.save('playback/frame' + ix_str + '.png', 'PNG')
# Do the same for:
pygame.image.save(window, 'screenshot.png')
when i replace it, it says there's an error with an "unexpected indent." i'm new to stuff like this, can someone help?
when i replace it, it says there's an error with an "unexpected indent." i'm new to stuff like this, can someone help?
Python 3 does not allow the mixing of spaces and tabs. Delete the tabs at the start of each line you added and try adding spaces instead, or vice versa. It would be a good idea to download an IDE like VS Code which will autodetect which is being used in the current file and format it correctly (convert tabs to spaces if necessary)
I have fixed this issue in my fork of the repo, and plan to expand this project quite a bit when I have the time. Everyone feel free to check it out, and also contribute if desired