POV-Ray : Newsgroups : povray.binaries.utilities : Converting image pixels into POV-Ray spheres Server Time
24 Jul 2024 14:00:41 EDT (-0400)
  Converting image pixels into POV-Ray spheres (Message 1 to 5 of 5)  
From: Ilya Razmanov
Subject: Converting image pixels into POV-Ray spheres
Date: 25 Nov 2023 22:14:59
Message: <6562b833@news.povray.org>
Greetings,

I rewrote one of my old plugins turning it into Python program. The 
program read images (like PNG) and convert them into POV-Ray scene 
consisting of packed spheres, each sphere having a base color of 
corresponding pixel. Since Python nowadays seem to be preinstalled on 
almost any computer, I assume it makes my old program cross-platform. 
Hopefully someone will find it suitable for something. Just one warning: 
it turns one source pixel into a POV sphere supposed to be rendered 
relatively big, so start testing it with small source images.

Have fun,

Ilya


Post a reply to this message


Attachments:
Download 'pov sphere 001.py.bz2.zip' (2 KB) Download 'example.png' (553 KB)

Preview of image 'example.png'
example.png


 

From: Ilya Razmanov
Subject: Upd: not only spheres (was: Converting image pixels into POV-Ray spheres)
Date: 12 Jan 2024 09:02:58
Message: <65a14692@news.povray.org>
Hi,

I finally added some system to that Python stuff for image to POVRay 
conversion, so now it, by default, turns image pixels into either 
spheres or boxes, rotates and scales them somehow, covers both C3 and C4 
symmetry (well, actally with options for C2), and mostly resides here:

https://github.com/Dnyarri/POVmosaic

and here:

https://gitflic.ru/project/dnyarri/povmosaic

Attached is a casual rendering with default settings just to capture 
your attention.


Post a reply to this message


Attachments:
Download 'boxeye.png' (312 KB)

Preview of image 'boxeye.png'
boxeye.png


 

From: Ilya Razmanov
Subject: Re: Upd: not only spheres
Date: 13 Jan 2024 03:44:26
Message: <65a24d6a@news.povray.org>
Sorry, wrong picture. Now attached it result of "b4zaikaR" with default 
setting. Source image is also attached. I hope it sort of shows the idea 
I had in mind when starting it.

On 12.01.2024 17:02, Ilya Razmanov wrote:
> Hi,
> 
> I finally added some system to that Python stuff for image to POVRay 
> conversion, so now it, by default, turns image pixels into either 
> spheres or boxes, rotates and scales them somehow, covers both C3 and C4 
> symmetry (well, actally with options for C2), and mostly resides here:
> 
> https://github.com/Dnyarri/POVmosaic
> 
> and here:
> 
> https://gitflic.ru/project/dnyarri/povmosaic
> 
> Attached is a casual rendering with default settings just to capture 
> your attention.


Post a reply to this message


Attachments:
Download 'b.png' (495 KB) Download 'mdn.png' (6 KB)

Preview of image 'b.png'
b.png

Preview of image 'mdn.png'
mdn.png


 

From: Thomas de Groot
Subject: Re: Upd: not only spheres
Date: 14 Jan 2024 02:11:11
Message: <65a3890f@news.povray.org>
Op 13/01/2024 om 09:44 schreef Ilya Razmanov:
> Sorry, wrong picture. Now attached it result of "b4zaikaR" with default 
> setting. Source image is also attached. I hope it sort of shows the idea 
> I had in mind when starting it.
> 

I think it is neat and I like it. Maybe this is also thought of here, 
but what if the cube rotations were increasingly random with 
increasingly darker colours? Might not be a good idea, but....

-- 
Thomas


Post a reply to this message

From: Ilya Razmanov
Subject: Re: Upd: not only spheres
Date: 14 Jan 2024 10:28:10
Message: <65a3fd8a$1@news.povray.org>
On 14.01.2024 10:11, Thomas de Groot wrote:
> I think it is neat and I like it. Maybe this is also thought of here, 
> but what if the cube rotations were increasingly random with 
> increasingly darker colours?
Well, programs are small and key part is mostly concentrated in on 
string, so, if you have Python (I had it because daughter installed it 
for some other purposes, so, to get the Python, you should get a 
daughter as an installation manager), you can rotate, resize, whatever 
these cubes as you wish. Besides, they are not just cubes - they are 
declared as "thingie" in the beginning of POV file, so you can change 
them from "box" to something else. The only reason I don't do every 
possible thing inside program is that it would actually require some 
fast preview to make sence of such a flexible editing, and I don't see 
the way to have a preview so far. Rumors are there's a OpenGL for 
Python, but I have no experience with it, maybe it's not good enough for 
my purpose.

But well, so far you can edit all this with text editor and hopefully do 
something that may be considered "art".

Ilya


Post a reply to this message

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