From dc3d2344d2cab166bc31e2acb078ff5f3bb6f966 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Fri, 20 Sep 2013 10:52:49 -0300 Subject: [PATCH 1/2] Raytracing: Removed +UA from the default povray options --- src/Mod/Raytracing/Gui/Command.cpp | 2 +- src/Mod/Raytracing/Gui/DlgSettingsRay.ui | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Raytracing/Gui/Command.cpp b/src/Mod/Raytracing/Gui/Command.cpp index f3817cfc7..9073458b5 100644 --- a/src/Mod/Raytracing/Gui/Command.cpp +++ b/src/Mod/Raytracing/Gui/Command.cpp @@ -518,7 +518,7 @@ void CmdRaytracingRender::activated(int iMsg) int height = hGrp->GetInt("OutputHeight", 600); std::stringstream h; h << height; - std::string par = hGrp->GetASCII("OutputParameters", "+UA +P +A"); + std::string par = hGrp->GetASCII("OutputParameters", "+P +A"); std::string fname = (const char*)fn.toUtf8(); openCommand("Render project"); doCommand(Doc,"PageFile = open(App.activeDocument().%s.PageResult,'r')",Sel[0].FeatName); diff --git a/src/Mod/Raytracing/Gui/DlgSettingsRay.ui b/src/Mod/Raytracing/Gui/DlgSettingsRay.ui index 95143b88c..57b2e23e7 100644 --- a/src/Mod/Raytracing/Gui/DlgSettingsRay.ui +++ b/src/Mod/Raytracing/Gui/DlgSettingsRay.ui @@ -146,7 +146,7 @@ The povray parameters to be passed to the render. - +UA +P +A + +P +A OutputParameters From cc84da72c07039f15736d9d3b2064a6a900f9f1f Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Fri, 20 Sep 2013 10:57:32 -0300 Subject: [PATCH 2/2] Raytracing: Added RadiosityNormal povray template --- src/Mod/Raytracing/App/CMakeLists.txt | 1 + .../Raytracing/Templates/RadiosityNormal.pov | 41 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 src/Mod/Raytracing/Templates/RadiosityNormal.pov diff --git a/src/Mod/Raytracing/App/CMakeLists.txt b/src/Mod/Raytracing/App/CMakeLists.txt index 7fcffceeb..59249a840 100644 --- a/src/Mod/Raytracing/App/CMakeLists.txt +++ b/src/Mod/Raytracing/App/CMakeLists.txt @@ -59,6 +59,7 @@ SET(Raytracing_Scripts SET(Raytracing_Templates Templates/ProjectStd.pov + Templates/RadiosityNormal.pov ) add_library(Raytracing SHARED ${Raytracing_SRCS}) diff --git a/src/Mod/Raytracing/Templates/RadiosityNormal.pov b/src/Mod/Raytracing/Templates/RadiosityNormal.pov new file mode 100644 index 000000000..bd7c1f9d0 --- /dev/null +++ b/src/Mod/Raytracing/Templates/RadiosityNormal.pov @@ -0,0 +1,41 @@ + // Persistence of Vision Ray Tracer Scene Description File + // for FreeCAD (http://www.freecadweb.org) + + #version 3.6; + + #include "colors.inc" + #include "metals.inc" + #include "rad_def.inc" + + global_settings { + radiosity { + Rad_Settings(Radiosity_Normal,off,off) + } + } + + #default {finish{ambient 0}} + + sky_sphere { + pigment { + gradient y + color_map { + [0.0 color LightGray] + [0.3 color White] + [0.7 color LightGray] + } + } + } + + // Standard finish + #declare StdFinish = finish { crand 0.01 diffuse 0.8 }; + + //RaytracingContent + + //default light + light_source { + cam_location + color White + area_light <100, 0, 0>, <0, 0, 100>, 10, 10 + adaptive 1 + jitter + }