Re: povexport of vpython materials

Bruce Sherwood <[email protected]>
Newsgroups gmane.comp.python.visualpython.user
Message-ID <[email protected]>
Great! We'll take a look. Thanks.

Bruce Sherwood

On Wed, May 18, 2011 at 8:04 AM, Jasper Stolte <[email protected]> wrote:
> Ok, I had some time just now, so I added the finish and color tags and put
> in an extra example file which shows how to use them. Please see if you
> think this is useful. It still doesn't do materials, interiors, subplanes
> and other things I stumbled across in the pov help. But already I think this
> helps in making renderings of the most common materials.
>
> Kind regards,
> Jasper
>
>
> On Wed, May 18, 2011 at 11:07 AM, Jasper Stolte <[email protected]>
> wrote:
>>
>> Absolutely, it's fairly straight forward to add a pov_finish and pov_color
>> tags in a way similar to the pov_texture. I can add those easily enough.
>> It'll add to the code repetition in all the export_ functions though. I
>> think some code refactoring would make the module cleaner, more transparent.
>> But who has the time for that, right?
>>
>> Jasper
>>
>>
>> On Wed, May 18, 2011 at 4:20 AM, Bruce Sherwood <[email protected]>
>> wrote:
>>>
>>> No, you're probably not missing anything. I'll comment that Ruth
>>> Chabay is currently deeply involved in an unrelated project, so it's
>>> not clear when she will work on updating povexport. Moreover, her main
>>> priorities are just dealing with the objects currently not supported,
>>> especially faces, text, and extrusion.
>>>
>>> Note however that povexport is not a very large program, and written
>>> in pure Python, so if you have a clear vision of how it should be
>>> improved to deal with the attributes of interest to you, I encourage
>>> you to consider improving povexport yourself.
>>>
>>> Bruce Sherwood
>>>
>>> On Mon, May 16, 2011 at 5:16 AM, Jasper Stolte <[email protected]>
>>> wrote:
>>> > Bruce, thank you for your prompt reply.
>>> >
>>> > Indeed, I noticed the support for (among others) woods and metals
>>> > through
>>> > the .inc files. However, I believe these materials are purely texture
>>> > based.
>>> > It seems to me povexport only does pov_texture, as I cannot find
>>> > something
>>> > for pov_finish or pov_color. For example, it is not quite clear to me
>>> > why we
>>> > would include colors.inc, since I dont think you can use its color
>>> > definitions through the pov_texture variable anyway. Similarly, as far
>>> > as I
>>> > can see, from the metals.inc only the textures can be used, not the
>>> > colors
>>> > or the finishes. The wood example only works because wood only requires
>>> > texture, and no finish or color. There is no example that uses the
>>> > colors/finishes from the metals.inc or colors.inc macros, and as far as
>>> > I
>>> > can see they cannot be used without modifying povexport to support them
>>> > first.
>>> >
>>> > Or maybe I am just completely missing something.. :)
>>> > Kind regards,
>>> >
>>> > Jasper
>>> >
>>> >
>>> > On Sun, May 15, 2011 at 10:27 PM, Bruce Sherwood
>>> > <[email protected]>
>>> > wrote:
>>> >>
>>> >> There is some support for materials, as indicated in the header to the
>>> >> 2009 version of povexport, available in the contributed section of
>>> >> vpython.org:
>>> >>
>>> >> This module exports a VPython scene as POV-Ray scene description code.
>>> >> Lights and camera location from the current visual scene are included.
>>> >> Optionally, you may specify a list of include files,
>>> >>   and pov textures for objects.
>>> >> For an example of its use, see 'povexample.py'.
>>> >> Currently convex, faces, and points objects are not exported.
>>> >> Further documentation is found at the start of the file.
>>> >>
>>> >> Also see the example program povexample_wood.py, which is included in
>>> >> the 2009 povexport package.
>>> >>
>>> >> The relatively recent objects "text" and "extrusion" are not handled
>>> >> by povexport. Ruth Chabay, the originator of povexport, intends to
>>> >> bring povexport up to date. The "create_faces()" method for extrusion
>>> >> objects was created to make it feasible to export an extrusion to
>>> >> povexport (and the text object creates an extrusion, so it too should
>>> >> prove to be exportable).
>>> >>
>>> >> Bruce Sherwood
>>> >>
>>> >> On Sun, May 15, 2011 at 6:28 AM, Jasper Stolte
>>> >> <[email protected]>
>>> >> wrote:
>>> >> > Hi guys,
>>> >> >
>>> >> > It's been a few years since I used vpython, but I'm happy to see
>>> >> > there
>>> >> > is
>>> >> > still activity and development of this useful tool. For my new
>>> >> > project
>>> >> > I'm
>>> >> > using povexport, which exports the scenes nicely into pov-ray
>>> >> > format.
>>> >> > However when I look at the resulting pictures the material
>>> >> > information
>>> >> > seems
>>> >> > lost. Everything ends up looking like I selected materials.diffuse
>>> >> > for
>>> >> > it.
>>> >> >
>>> >> > Digging into the documentation I found that pov-ray uses a 'finish'
>>> >> > tag
>>> >> > to
>>> >> > specify things such as reflectivity etc. Tweaking the finish tag
>>> >> > parameters
>>> >> > manually I quickly rendered something which was looking at least
>>> >> > acceptable.
>>> >> > Now my question is whether you guys have experience mapping the
>>> >> > vpython
>>> >> > materials to the pov-ray finish tag, and if you would be willing to
>>> >> > share
>>> >> > parameters? Maybe someone has even started improving the povexport
>>> >> > module to
>>> >> > include the finish tag?
>>> >> >
>>> >> > Kind regards,
>>> >> > Jasper

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.