Saving renderTexture
Hello,
I am trying to save the content of a renderTexture to a file. I basically use code from the examples as listed further down my post. Everytime I call renderTexture.save("test") i get an error message that tells me that there is no data in the image. Code:
* ERROR: Texture does not contain image data, cannot save to file 'test' I also put the texture on a quad to see if there is actually something going wrong, but the desired render is diplayed fine on the quad. Here is my code: Code:
|
Are you waiting a frame to allow the render node to actually render to the texture? Also, you are not saving the texture to a valid image format. Make sure to add a valid extension to the filename (e.g. test.png, test.jpg, ...).
|
I scheduled the whole process as a task and used yield waitFrame(1) to make sure that the node has had time to render at least once.
Works well now. Thanks a lot! |
All times are GMT -7. The time now is 11:20 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC