I want to render a scene in a loop. About 90 out of 100 times I get the image I want, but the remaining 10 times the red channel of the image is swapped with the blue channel. How can I prevent this strange behavior? By the way if I get the texture data with “getScreenshot()” instead of “getTexture()” everythings works good but it is much slower. I cannot use this method because my work is time critical.
I am rendering on a headless server. I built panda3d without x11 support with “python3 makepanda/makepanda.py --everything --threads 8 --wheel --no-x11”.
Yes, when I tried to turn it off, it works as expected but it gets slower which exceeds my time limits.
By the way, it would be very helpful if there are tips on how to speed up the render time regardless of the color issue.
When I use getRamImageAs(“RGBA”) it is still same issue, nothing changed.
I didn’t change any framebuffer property. It is the default one.
It is not entirely clear what goals you are pursuing. However, at the moment you are accessing the disk every frame to write a file, which slows down rendering accordingly, if it is possible to save all files to RAM. Then, using another thread, extract them to disk in parallel.
Also, for such simple tasks, there is no need to use the ShowBase. Something like this template is enough:
Perhaps the problem is here, if I understood correctly, this method is NumPy. I think this is not a thread-safe method, that is, it is not atomic. These are just assumptions, it needs to be checked.
When I used the template you provided, the color problem was not resolved, but the time was considerably reduced and I removed “loadPrcFileData(”“, “threading-model Cull/Draw”)”. So indirectly my problem was solved. Thanks a lot