Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert/export graphics from Pov-Ray in 2D vector format

By default, Pov-Ray renders a bitmap file. Is there a way to convert or export the same image, in a vector format like eps, pdf, svg etc?

like image 241
Cristi Stoica Avatar asked Sep 15 '12 09:09

Cristi Stoica


3 Answers

POV-Ray does not have any sort of vector output. In general ray-tracers (like POV-Ray) work by tracing rays from screen pixels into the scene, to work out what colour pixels should be - so they are inherently pixel based.

To 'ray-trace' to a vector format, you would have to calculate illumination values for each visible polygon, and then project the polygons onto the viewing angle as vectors. I don't know of any available software that can do this.

like image 75
James Avatar answered Nov 24 '22 00:11

James


I'll also add that if you take an image and convert it using most tools to a vector format like pdf or eps, it basically just wraps up the bitmap data into an array and still can only render it pixel by pixel.

But if you render with POV-Ray at high contrast so that you can convert it to a black and white image, you can then use free software called potrace to convert it to true vector graphics.

like image 43
thomasafine Avatar answered Nov 23 '22 23:11

thomasafine


Firstly, you can export the POV-Ray graphic to an asc file. To do so, see the link and answer given here.

Then you can open this asc file in Meshlab, and then export it in the STL or OBJ format. Finally you can import the STL or the OBJ file in Wings3D, which allows to export to eps and svg.

like image 41
Stéphane Laurent Avatar answered Nov 23 '22 23:11

Stéphane Laurent