POV-Ray : Newsgroups : povray.general : access to individual pixels/dots? : Re: access to individual pixels/dots? Server Time
9 Aug 2024 11:29:50 EDT (-0400)
  Re: access to individual pixels/dots?  
From: Gibus
Date: 1 Aug 2000 21:36:14
Message: <39877b0e@news.povray.org>
i was wondering too on this question this week!!!
i found a solution,you can read an image with the eval pigment and save each
pixel in a file.
to write an image dot by dot,you create a scne with an orthographic camera.
you create for exemple 640*480 boxes for a 640*480 sized image.
with a double while system,you read the pixel file,change the color pixel
per pixel and assign it to the corresponding box in the scene
when you render the scene,you obtain what you want!!!


i was thinking about a negative filter: you read the pixel color: <r,g,b>
you apply
#declare pixel[x][y][1]=<1-r,1-g,1-b>


/*double while system with x and y*/
box{<x,y,0><x+1,y+1>
pigment {color rgb pixel[x][y][1]}
finish {diffuse 0 ambient 1 phong 0 specular 0}
}

i will try to write a read macro and a render_image macro where you can
choose the size of the image.

if you don't want to define all pixel of your image,you set <color rgbt
<r,g,b,1> for the pixel you don't want to define and you apply the image you
obtain with his transparancy layer on the image of your original scene with
photoshop for exemple...


gibus


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.