Hello all,
I’m new here.
I’d like to use python to do the following:
after I render scene in blender as an image (render button), then use a python script that exports the following of each pixel in the rendered image:
R,G,B values and corresponding X,Y,Z coordinates in the 3D model and put it into a text file.
I’m only interested in the visible pixels (therefore I assume that starting from the rendered image makes sense.
Ideally the data should have rendered image width x rendered image height data points and be layed outs just like the rendered image.
like this pseudo code, assuming the rendered image has size 800x600
for( y = 0 ; y < 600 ; y++) {
for(x = 0 ; x < 800 ; x++) {
RGBColor = getPixelColorInRenderedImage(x,y);
VectorXYZ = getVectorXYZInRenderedImage(x,y);
WriteToTextFile(RGBColor, VectorXYZ);
}
}
Does blender have a way to do the above things?
Has such a script already available?
If not I could code it by myself, but I’d need some help from you guys to figure out which python functions I need to use to access the 3D data of blender.
Thanks in advance for your help and pointers.
Martin