Macro to see results renders PovRay

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
psicofil
Posts: 154
Joined: Thu Dec 15, 2011 11:02 pm

Macro to see results renders PovRay

Post by psicofil »

Hello. I create a macro to render povray files, setting up the final image size and quality.

Record a video to show how it works: http://youtu.be/pLtQelFyavg

Also I did some templates, but the problem is with the default light that brings FreeCAD, perhaps should be 3 types of templates, one that creates the world, another texture to the part and one for the lights, so it could povray file write as follows:
1 - includes + world
2 - texture
3 - camera (does freecad)
4 - light (so the position of the light in the template can use the parameters of the camera)
5 - part (does freecad)

It's just an opinion.

P / D: the macro only works on Linux and should be installed povray in / usr / bin / povray
Attachments
Render.FCMacro.zip
not really a. zip
(1.56 KiB) Downloaded 190 times
Ing. Gomez Lucio
Scope Ingenieria (scopeingenieria.com)
User avatar
jriegel
Founder
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: Macro to see results renders PovRay

Post by jriegel »

Would be greate you could do it as a integration of the Raytracing workbench. I would like to continue the PovRay support, since PovRay is very easy on Windows...
Stop whining - start coding!
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Macro to see results renders PovRay

Post by yorik »

Excellent work psicofil, you are becoming a real freecad coder! I see you are becoming good with pyqt! :)
Extending templates like you say seems good too

I also like povray very much... It is old, but still there and still active, and it is very very versatile, the swiss knife of rendering.
This macro could easily be turned into a real freecad command, like the WizardShaft in PartDesign...
User avatar
psicofil
Posts: 154
Joined: Thu Dec 15, 2011 11:02 pm

Re: Macro to see results renders PovRay

Post by psicofil »

Povray is a render that is still maintained, although not as modern as others, you can get good results before too long and easy way.
Some renders I did: viewtopic.php?f=8&t=1222&start=320
Best of povray is that there are very many worlds templates, textures, lights pre-made. Povray himself and brings several.
Lux render is the most realistic I've seen, but it is more complicated and takes a long time to get results.

There is a way, show small previews with pytq in a window?

The steps could be:
1) choose scenario (background, if there is a reflective surface, only leftovers, type of lights) The user has a preview would be ideal ;)
2) selecting camera (view)
3) light intensity
4) Choose textures
(lights are located according to the disposition between the camera)
5) A message "Rendering .. please wait" :arrow:
6) We can already see our render. :P

After the ideal would merge with the draft mrlukeparry

P / D: I'm reading about git, soon there'll upload my progress on the module info, and povray.... Sorry for my bad english
Ing. Gomez Lucio
Scope Ingenieria (scopeingenieria.com)
User avatar
psicofil
Posts: 154
Joined: Thu Dec 15, 2011 11:02 pm

Re: Macro to see results renders PovRay

Post by psicofil »

Hi all, after a long time of absence I return with an update of the macro to be used in in FreeCAD Povray. :roll:
Thanks to yorik now can render and see the results within in FreeCAD. :D
This macro addition to these options, the ability to edit .pov files inside in FreeCAD as well as other options such report rendering console, antialasing and alpha channel is added.

Here a video:
https://www.youtube.com/watch?v=WGlv5cnkMv8

Regards to all.

Macro'll upload as soon solve some performance problems and some new features.

Sorry for my bad English
Attachments
povraymacro.png
povraymacro.png (227.11 KiB) Viewed 2993 times
Ing. Gomez Lucio
Scope Ingenieria (scopeingenieria.com)
User avatar
psicofil
Posts: 154
Joined: Thu Dec 15, 2011 11:02 pm

Re: Macro to see results renders PovRay

Post by psicofil »

Here the Macro.
Povray_Render.FCMacro.zip
Not really a zip
(4.5 KiB) Downloaded 121 times
Regards.
Ing. Gomez Lucio
Scope Ingenieria (scopeingenieria.com)
User avatar
psicofil
Posts: 154
Joined: Thu Dec 15, 2011 11:02 pm

Re: Macro to see results renders PovRay

Post by psicofil »

Hello everyone from now I'll upload my macros to github :arrow: .
Here I leave the link of macro povray with some improvements:
https://github.com/psicofil/Macros_Free ... ay.FCMacro

I am working for the macro to work in windows.
Regards.

Sorry for my bad english.
Ing. Gomez Lucio
Scope Ingenieria (scopeingenieria.com)
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Macro to see results renders PovRay

Post by yorik »

psicofil wrote:Hello everyone from now I'll upload my macros to github :arrow: .
Very good. At some point I think we should start to do that with all macros...

One day, we'll need to ask github people to treat .FCMacro files as python syntax :)

Very good macro BTW! very practical.
Post Reply