POV-Ray : Newsgroups : povray.advanced-users : Generating 2D graphics with PovRay? Server Time
25 Nov 2024 07:19:30 EST (-0500)
  Generating 2D graphics with PovRay? (Message 1 to 7 of 7)  
From: Frantisek Fuka
Subject: Generating 2D graphics with PovRay?
Date: 1 May 2003 19:00:20
Message: <3eb1a704$1@news.povray.org>
Hi,

I am recently faced with interesting problem. I need to generate lots of 
2D graphics that consists of many different objects that have slight 
variations between them. As an example, let's say that I want to draw a 
full set of playing cards, like this:

http://www.fuxoft.cz/tmp/karty0.png

Now, I could paint this in Adobe Illustrator or Photoshop but it was 
much faster to write this 2kb Povray script:

http://www.fuxoft.cz/tmp/karty0.pov

Which generated the above image.

What's also important is the fact that if I now want to change all the 
cards so that they have square format or they have more rounded corners, 
or whatever, it's very simple matter of changing few number in the POV 
script - in standard graphic program this would be a lot of tedious work.

Of course, it's not very elegant to use POVRAY for this lowly task. What 
is more important, POVRAY has to do 3D and lighting calculations which 
unnecessarily slow down the whole process (I need to generate LOTS of 
graphics like this).

In fact, POVRAY is almost perfect, except that it's too slow and exact 
vertical/horizontal lines have graphic artefacts on them even with high 
antialiasing (just magnify the the borders of the cards).

So my question is: Is there any application that would allow me to 
generate 2D sceneries using some sort of script language? It may seem to 
you that I could use any programming language with graphic capabilities 
for this, but note that it's ABSOLUTELY NECESSARY for the result to be 
anti-aliased and to contain things like "glowing lines" and 
semi-transparent objects. In fact, Somehing like the graphic capabilites 
of Macromedia Flash. Except that Flash scenes cannot be generated using 
scripts and cannot be easily exported to bitmaps (e.g. to create 1000 
bitmaps using one small script in one go)...

Thanks for any suggestions


Post a reply to this message

From: ABX
Subject: Re: Generating 2D graphics with PovRay?
Date: 2 May 2003 02:16:07
Message: <9g24bvg40fucpu744k9deus3lqb2eqtgte@4ax.com>
On Fri, 02 May 2003 00:59:25 +0200, Frantisek Fuka <fuk### [at] fuxoftcz> wrote:
> In fact, POVRAY is almost perfect, except that it's too slow

AFAIK there seems a few not optimized things I would change:
- you used CSG while using one mesh for cards would either give you better
memory management and increase time
- you used different pigment for each image_map while including it once and
copying could save you time and memory
- no need for light - just use something like finish{ambient 1 diffuse 0} 
- perhaps Quality ini option could also help

BTW: Unless you did not changed default settings, path "c:\windows\fonts\"
should be already in library path so no need to reference fonsts with full path.

ABX


Post a reply to this message

From: Mark Weyer
Subject: Re: Generating 2D graphics with PovRay?
Date: 2 May 2003 04:26:19
Message: <3EB22BA8.9040609@informatik.uni-freiburg.de>
> So my question is: Is there any application that would allow me to 
> generate 2D sceneries using some sort of script language?

ISTRT gimp has scripting capability. Never used it though.


-- 
merge{#local i=-11;#while(i<11)#local
i=i+.1;sphere{<i*(i*i*(.05-i*i*(4e-7*i*i+3e-4))-3)10*sin(i)30>.5}#end
pigment{rgbt 1}interior{media{emission x}}hollow}//  Mark Weyer


Post a reply to this message

From: Christoph Hormann
Subject: Re: Generating 2D graphics with PovRay?
Date: 2 May 2003 07:43:16
Message: <3EB259D4.E718DB47@gmx.de>
Frantisek Fuka wrote:
> 
> [...]
> 
> Of course, it's not very elegant to use POVRAY for this lowly task. What
> is more important, POVRAY has to do 3D and lighting calculations which
> unnecessarily slow down the whole process (I need to generate LOTS of
> graphics like this).

It's not POV-Ray that's slow, it's your coding that's extremely
inefficient:

- no need for a light source, just use ambient finishes.
- using csg for 'painting' the cards is very slow.  The object pattern
will be much faster.  

> In fact, POVRAY is almost perfect, except that it's too slow and exact
> vertical/horizontal lines have graphic artefacts on them even with high
> antialiasing (just magnify the the borders of the cards).

Try '-j'/Jitter=off

> So my question is: Is there any application that would allow me to
> generate 2D sceneries using some sort of script language?
> [...]

What's wrong with POV-SDL as a script language?

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 28 Feb. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Apache
Subject: Re: Generating 2D graphics with PovRay?
Date: 11 May 2003 21:48:06
Message: <3ebefd56$1@news.povray.org>
Maybe you can do something with SVG? SVG can be written manually (it's an
extension of XML), or using some scripting language like perl or even
POV-Ray's SDL. And SVG is vector-based graphics and most of the popular
graphic packages understand it.


Post a reply to this message

From: JWV
Subject: Re: Generating 2D graphics with PovRay?
Date: 13 May 2003 08:43:27
Message: <3ec0e86f$1@news.povray.org>
that sounds interesting, can i create an SVG image with PSP 7? Or do i need
another piece of software?

JWV
"Apache" <apa### [at] yahoocom> wrote in message
news:3ebefd56$1@news.povray.org...
> Maybe you can do something with SVG? SVG can be written manually (it's an
> extension of XML), or using some scripting language like perl or even
> POV-Ray's SDL. And SVG is vector-based graphics and most of the popular
> graphic packages understand it.
>
>


Post a reply to this message

From: ABX
Subject: Re: Generating 2D graphics with PovRay?
Date: 13 May 2003 09:02:00
Message: <f3r1cvcrcvgrdjthiqqub2jqtalpt81dls@4ax.com>
On Tue, 13 May 2003 14:41:56 +0200, "JWV" <jwv|at|planet.nl> wrote:
> that sounds interesting, can i create an SVG image with PSP 7? Or do i need
> another piece of software?

http://www.gismonitor.com/products/svg.php

ABX


Post a reply to this message

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