POV-Ray : Newsgroups : povray.general : From POV-Ray to Python Server Time: 19 Aug 2019 14:06:32 GMT
  From POV-Ray to Python (Message 1 to 7 of 7)  
From: Joost
Subject: From POV-Ray to Python
Date: 14 Jul 2019 13:25:00
Message: <web.5d2b2b2fdb0b1c9e956b72240@news.povray.org>
Hi all,

I was curious for some general help. I've built cityscapes in POV-ray for 2D
images a decade ago. With the new possibilities of 3D printing I was thinking of
making 3D models of cities the way I used to do in POV-ray for 2D rendering. As
it seems complex and a lot of work to go through POV-Ray to STL, I was looking
into scripting in Python with Blender. Does anyone have any experience with
that? Is it possible to code objects in the same manner as in POV-ray (apart
from the differences in programming language of course)? Or are there
limitations to what can be done in Python? Any experience/tips?

Thanks in advance,
Joost


Post a reply to this message

From: Le Forgeron
Subject: Re: From POV-Ray to Python
Date: 14 Jul 2019 14:14:23
Message: <5d2b38bf@news.povray.org>
Le 14/07/2019 à 15:20, Joost a écrit :
> Hi all,
> 
> I was curious for some general help. I've built cityscapes in POV-ray for 2D
> images a decade ago. With the new possibilities of 3D printing I was thinking of
> making 3D models of cities the way I used to do in POV-ray for 2D rendering. As
> it seems complex and a lot of work to go through POV-Ray to STL, I was looking
> into scripting in Python with Blender. Does anyone have any experience with
> that? Is it possible to code objects in the same manner as in POV-ray (apart
> from the differences in programming language of course)? Or are there
> limitations to what can be done in Python? Any experience/tips?
> 
> Thanks in advance,
> Joost
> 
> 
> 
If you are interested in STL from povray object, as long as that object
is solid (aka, with a defined interior) and finite, there is two patches
to combine from hg-povray to make you happy.

1. tesselation (turn 3D finite object in a mesh)
2. save mesh as stl: stl_save

http://wiki.povray.org/content/User:Le_Forgeron/tesselation

http://wiki.povray.org/content/User:Le_Forgeron/mesh

So far, the generated STL is WITHOUT colour information.
(two standards is a bad idea for STL)


Post a reply to this message

From: Bald Eagle
Subject: Re: From POV-Ray to Python
Date: 14 Jul 2019 19:05:06
Message: <web.5d2b7c777a5716c64eec112d0@news.povray.org>
"Joost" <nomail@nomail> wrote:
> Hi all,
>
> ... I was thinking of
> making 3D models of cities the way I used to do in POV-ray for 2D rendering. As
> it seems complex and a lot of work to go through POV-Ray to STL,
....
> Any experience/tips?


Just use OpenSCad.   The language and syntax are almost identical to POV-Ray.
I found it VERY fast to learn the small differences and bang out a few
3D-printable models from scratch.


Post a reply to this message

From: Joost
Subject: Re: From POV-Ray to Python
Date: 15 Jul 2019 09:10:01
Message: <web.5d2c417b7a5716c624a2730e0@news.povray.org>
Thanks for the answers!

@Le Forgeron : Very interesting reading. I am afraid my programming skills will
fall short, especially because I use a large number of objects with
merges/intersects etc. I'll certainly keep it in mind if the other options fail.

@Bald Eagle. Thanks, that looks very promising and familiar :-) Assume modules
work the same as user defined macro's in POV-Ray, I used a lot of those. I'm
going to experiment with OpenScad and see what kind of output I can get.

Much appreciate the help,
Thanks,Joost


Post a reply to this message

From: Mr
Subject: Re: From POV-Ray to Python
Date: 16 Jul 2019 22:50:00
Message: <web.5d2e53857a5716c6884ec9560@news.povray.org>
"Joost" <nomail@nomail> wrote:
> Hi all,
>
> I was curious for some general help. I've built cityscapes in POV-ray for 2D
> images a decade ago. With the new possibilities of 3D printing I was thinking of
> making 3D models of cities the way I used to do in POV-ray for 2D rendering. As
> it seems complex and a lot of work to go through POV-Ray to STL, I was looking
> into scripting in Python with Blender. Does anyone have any experience with
> that? Is it possible to code objects in the same manner as in POV-ray (apart
> from the differences in programming language of course)? Or are there
> limitations to what can be done in Python? Any experience/tips?
>
> Thanks in advance,
> Joost

Hi !
Indeed you can do about the same things in Blender through Python, that is
specifying some primitives or mesh elements and their coordinates, etc.
We used such features to create Blender's POV-Ray importer and exporter, their
best implementation is in current stable version (blender 2.79)


Do not hesitate to ask questions, POV-Converter has a Facebook page, a
Wordpress, a gmail account and my personal email is at hotmail fr


Best regards,
Maurice Raybaud.


Post a reply to this message

From: Joost
Subject: Re: From POV-Ray to Python
Date: 17 Jul 2019 11:20:01
Message: <web.5d2f036b7a5716c6942716970@news.povray.org>
>
> Hi !
> Indeed you can do about the same things in Blender through Python, that is
> specifying some primitives or mesh elements and their coordinates, etc.
> We used such features to create Blender's POV-Ray importer and exporter, their
> best implementation is in current stable version (blender 2.79)
>
>
> Do not hesitate to ask questions, POV-Converter has a Facebook page, a
> Wordpress, a gmail account and my personal email is at hotmail fr
>
>
> Best regards,
> Maurice Raybaud.

Maurice, I'am going to  try that too, thank you very much (just switched to 2.8,
so I'll have to go back then ;-)

Now experimenting with OpenScad, but very curious if I can import an old
building into Blender and see how that turns out if I export to STL,

Regards,
Joost


Post a reply to this message

From: Mr
Subject: Re: From POV-Ray to Python
Date: 19 Jul 2019 21:50:01
Message: <web.5d323a7a7a5716c6884ec9560@news.povray.org>
"Joost" <nomail@nomail> wrote:
> >
> > Hi !
> > Indeed you can do about the same things in Blender through Python, that is
> > specifying some primitives or mesh elements and their coordinates, etc.
> > We used such features to create Blender's POV-Ray importer and exporter, their
> > best implementation is in current stable version (blender 2.79)
> >
> >
> > Do not hesitate to ask questions, POV-Converter has a Facebook page, a
> > Wordpress, a gmail account and my personal email is at hotmail fr
> >
> >
> > Best regards,
> > Maurice Raybaud.
>
> Maurice, I'am going to  try that too, thank you very much (just switched to 2.8,
> so I'll have to go back then ;-)
>
> Now experimenting with OpenScad, but very curious if I can import an old
> building into Blender and see how that turns out if I export to STL,
>
> Regards,
> Joost

If you choose to use  2.8, the script is still there and updated to work but,
some features that have been broken because of API changes are not yet fixed,
contributions are welcome.


Post a reply to this message

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