Raytracing: Final cleanup of Luxrender stuff

This commit is contained in:
Yorik van Havre 2013-10-01 18:37:03 -03:00
parent 94c9c28e15
commit 762ef1299e
13 changed files with 708 additions and 81 deletions

View File

@ -238,19 +238,6 @@ copyResource(PyObject *self, PyObject *args)
Py_Return;
}
/// rescales a lux matrix
static PyObject *
scaleLuxMatrix(PyObject *self, PyObject *args)
{
float factor;
const char *mat;
if (! PyArg_ParseTuple(args, "sf", &mat, &factor))
return NULL;
std::string result, luxmatrix(mat);
result = LuxTools::rescaleMatrix(luxmatrix, factor);
return Py::new_reference_to(Py::String(result));
}
/* registration table */
struct PyMethodDef Raytracing_methods[] = {
{"writeProjectFile", writeProjectFile, 1},
@ -262,6 +249,5 @@ struct PyMethodDef Raytracing_methods[] = {
{"writeDataFile", writeDataFile , 1},
{"writeCameraFile", writeCameraFile , 1},
{"copyResource", copyResource , 1},
{"scaleLuxMatrix", scaleLuxMatrix , 1},
{NULL, NULL}
};

View File

@ -31,7 +31,6 @@
#include <Base/FileInfo.h>
#include <Mod/Part/App/PartFeature.h>
#include "PovTools.h"
#include "LuxFeature.h"
#include "LuxTools.h"

View File

@ -32,6 +32,7 @@
#include <Base/Console.h>
#include "LuxProject.h"
#include "LuxFeature.h"
#include "LuxTools.h"
using namespace Raytracing;
using namespace std;
@ -82,14 +83,17 @@ App::DocumentObjectExecReturn *LuxProject::execute(void)
}
} else {
// get through the children and collect all the views
ofile << "# declares FreeCAD objects" << endl
<< "# Generated by FreeCAD (http://www.freecadweb.org/)" << endl << endl;
const std::vector<App::DocumentObject*> &Grp = Group.getValues();
for (std::vector<App::DocumentObject*>::const_iterator It= Grp.begin();It!=Grp.end();++It) {
if ((*It)->getTypeId().isDerivedFrom(Raytracing::LuxFeature::getClassTypeId())) {
Raytracing::LuxFeature *View = dynamic_cast<Raytracing::LuxFeature *>(*It);
ofile << View->Result.getValue();
ofile << endl << endl << endl;
ofile << endl;
}
}
ofile << "# End of FreeCAD objects" << endl;
}
}
@ -103,5 +107,7 @@ App::DocumentObjectExecReturn *LuxProject::execute(void)
short LuxProject::mustExecute() const
{
if (Camera.isTouched())
return 1;
return 0;
}

View File

@ -80,7 +80,7 @@ void LuxTools::writeShape(std::ostream &out, const char *PartName, const TopoDS_
// write object
out << "AttributeBegin # \"" << PartName << "\"" << endl;
out << "Transform [1.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.000000000000000]" << endl;
out << "Transform [1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1]" << endl;
out << "NamedMaterial \"FreeCADMaterial_" << PartName << "\"" << endl;
out << "Shape \"mesh\"" << endl;
@ -106,12 +106,12 @@ void LuxTools::writeShape(std::ostream &out, const char *PartName, const TopoDS_
if (!vertices) break;
// writing vertices
for (int i=0; i < nbNodesInFace; i++) {
P << vertices[i].X() << " " << vertices[i].Z() << " " << vertices[i].Y() << " ";
P << vertices[i].X() << " " << vertices[i].Y() << " " << vertices[i].Z() << " ";
}
// writing per vertex normals
for (int j=0; j < nbNodesInFace; j++) {
N << vertexnormals[j].X() << " " << vertexnormals[j].Z() << " " << vertexnormals[j].Y() << " ";
N << vertexnormals[j].X() << " " << vertexnormals[j].Y() << " " << vertexnormals[j].Z() << " ";
}
// writing triangle indices
@ -137,19 +137,3 @@ void LuxTools::writeShape(std::ostream &out, const char *PartName, const TopoDS_
out << " \"string name\" [\"" << PartName << "\"]" << endl;
out << "AttributeEnd # \"\"" << endl;
}
std::string LuxTools::rescaleMatrix(std::string mat, float factor)
{
// clean the input string
std::string matstring = mat.substr(11);
unsigned pos = matstring.find("]");
matstring = matstring.substr(0,pos);
// create a matrix and rescale it
Base::Matrix4D trans;
trans.fromString(matstring);
trans.scale(factor,factor,factor);
// create output
std::stringstream result;
result << "Transform [" << trans.toString() << "]" << endl;
return result.str();
}

View File

@ -27,6 +27,8 @@
#include <gp_Vec.hxx>
#include <vector>
#include "PovTools.h"
class TopoDS_Shape;
class TopoDS_Face;
@ -42,8 +44,6 @@ namespace Raytracing
static std::string getCamera(const CamDef& Cam);
/// returns the given shape as luxrender material + shape data
static void writeShape(std::ostream &out, const char *PartName, const TopoDS_Shape& Shape, float fMeshDeviation=0.1);
/// rescales a lux matrix by the given factor
static std::string rescaleMatrix(std::string mat, float factor);
};
} // namespace Raytracing

View File

@ -100,5 +100,7 @@ App::DocumentObjectExecReturn *RayProject::execute(void)
short RayProject::mustExecute() const
{
if (Camera.isTouched())
return 1;
return 0;
}

View File

@ -495,10 +495,9 @@ DEF_STD_CMD_A(CmdRaytracingRender);
CmdRaytracingRender::CmdRaytracingRender()
: Command("Raytracing_Render")
{
// seting the
sGroup = QT_TR_NOOP("File");
sMenuText = QT_TR_NOOP("&Render");
sToolTipText = QT_TR_NOOP("Renders the current raytracing project with povray");
sToolTipText = QT_TR_NOOP("Renders the current raytracing project with an external renderer");
sWhatsThis = "Raytracing_Render";
sStatusTip = sToolTipText;
sPixmap = "Raytrace_Render";
@ -506,53 +505,94 @@ CmdRaytracingRender::CmdRaytracingRender()
void CmdRaytracingRender::activated(int iMsg)
{
unsigned int n = getSelection().countObjectsOfType(Raytracing::RayProject::getClassTypeId());
if (n != 1) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
QObject::tr("Select one Povray project object."));
return;
}
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Raytracing");
std::string povray = hGrp->GetASCII("PovrayExecutable", "");
if (povray == "") {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Povray not found"),
QObject::tr("Please set the path to the povray executable in the preferences."));
return;
} else {
QFileInfo fi(QString::fromUtf8(povray.c_str()));
if (!fi.exists() || !fi.isFile()) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Povray not found"),
QObject::tr("Please correct the path to the povray executable in the preferences."));
// determining render type
const char* renderType;
unsigned int n1 = getSelection().countObjectsOfType(Raytracing::RayProject::getClassTypeId());
if (n1 != 1) {
unsigned int n2 = getSelection().countObjectsOfType(Raytracing::LuxProject::getClassTypeId());
if (n2 != 1) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
QObject::tr("Select one Raytracing project object."));
return;
} else {
renderType = "luxrender";
}
} else {
renderType = "povray";
}
// checking if renderer is present
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Raytracing");
std::string renderer;
if (renderType == "povray") {
renderer = hGrp->GetASCII("PovrayExecutable", "");
if (renderer == "") {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Povray not found"),
QObject::tr("Please set the path to the povray executable in the preferences."));
return;
} else {
QFileInfo fi(QString::fromUtf8(renderer.c_str()));
if (!fi.exists() || !fi.isFile()) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Povray not found"),
QObject::tr("Please correct the path to the povray executable in the preferences."));
return;
}
}
} else {
renderer = hGrp->GetASCII("LuxrenderExecutable", "");
if (renderer == "") {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Luxrender not found"),
QObject::tr("Please set the path to the luxrender or luxconsole executable in the preferences."));
return;
} else {
QFileInfo fi(QString::fromUtf8(renderer.c_str()));
if (!fi.exists() || !fi.isFile()) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Luxrender not found"),
QObject::tr("Please correct the path to the luxrender or luxconsole executable in the preferences."));
return;
}
}
}
QStringList filter;
filter << QObject::tr("Rendered image(*.png)");
filter << QObject::tr("All Files (*.*)");
QString fn = Gui::FileDialog::getSaveFileName(Gui::getMainWindow(), QObject::tr("Rendered image"), QString(), filter.join(QLatin1String(";;")));
if (!fn.isEmpty()) {
std::vector<Gui::SelectionSingleton::SelObj> Sel = getSelection().getSelection();
int width = hGrp->GetInt("OutputWidth", 800);
std::stringstream w;
w << width;
int height = hGrp->GetInt("OutputHeight", 600);
std::stringstream h;
h << height;
std::string par = hGrp->GetASCII("OutputParameters", "+P +A");
std::string fname = (const char*)fn.toUtf8();
std::vector<Gui::SelectionSingleton::SelObj> Sel = getSelection().getSelection();
if (renderType == "povray") {
QStringList filter;
filter << QObject::tr("Rendered image(*.png)");
filter << QObject::tr("All Files (*.*)");
QString fn = Gui::FileDialog::getSaveFileName(Gui::getMainWindow(), QObject::tr("Rendered image"), QString(), filter.join(QLatin1String(";;")));
if (!fn.isEmpty()) {
std::string fname = (const char*)fn.toUtf8();
openCommand("Render project");
int width = hGrp->GetInt("OutputWidth", 800);
std::stringstream w;
w << width;
int height = hGrp->GetInt("OutputHeight", 600);
std::stringstream h;
h << height;
std::string par = hGrp->GetASCII("OutputParameters", "+P +A");
doCommand(Doc,"PageFile = open(App.activeDocument().%s.PageResult,'r')",Sel[0].FeatName);
doCommand(Doc,"import subprocess,tempfile");
doCommand(Doc,"TempFile = tempfile.mkstemp(suffix='.pov')[1]");
doCommand(Doc,"f = open(TempFile,'wb')");
doCommand(Doc,"f.write(PageFile.read())");
doCommand(Doc,"f.close()");
doCommand(Doc,"subprocess.call('\"%s\" %s +W%s +H%s +O\"%s\" '+TempFile,shell=True)",renderer.c_str(),par.c_str(),w.str().c_str(),h.str().c_str(),fname.c_str());
doCommand(Gui,"import ImageGui");
doCommand(Gui,"ImageGui.open('%s')",fname.c_str());
doCommand(Doc,"del TempFile,PageFile");
commitCommand();
}
} else {
openCommand("Render project");
doCommand(Doc,"PageFile = open(App.activeDocument().%s.PageResult,'r')",Sel[0].FeatName);
doCommand(Doc,"import subprocess,tempfile");
doCommand(Doc,"TempFile = tempfile.mkstemp(suffix='.pov')[1]");
doCommand(Doc,"TempFile = tempfile.mkstemp(suffix='.lxs')[1]");
doCommand(Doc,"f = open(TempFile,'wb')");
doCommand(Doc,"f.write(PageFile.read())");
doCommand(Doc,"f.close()");
doCommand(Doc,"subprocess.call('\"%s\" %s +W%s +H%s +O\"%s\" '+TempFile,shell=True)",povray.c_str(),par.c_str(),w.str().c_str(),h.str().c_str(),fname.c_str());
doCommand(Gui,"import ImageGui");
doCommand(Gui,"ImageGui.open('%s')",fname.c_str());
doCommand(Doc,"del TempFile,PageFile");
doCommand(Doc,"subprocess.call('\"%s\" '+TempFile,shell=True)",renderer.c_str());
doCommand(Doc,"del TempFile,PageFile");
commitCommand();
}
}
@ -616,6 +656,57 @@ bool CmdRaytracingNewLuxProject::isActive(void)
return false;
}
//===========================================================================
// Raytracing_ResetCamera
//===========================================================================
DEF_STD_CMD_A(CmdRaytracingResetCamera);
CmdRaytracingResetCamera::CmdRaytracingResetCamera()
: Command("Raytracing_ResetCamera")
{
// seting the
sGroup = QT_TR_NOOP("File");
sMenuText = QT_TR_NOOP("&Reset Camera");
sToolTipText = QT_TR_NOOP("Sets the camera of the selected Raytracing project to match the current view");
sWhatsThis = "Raytracing_ResetCamera";
sStatusTip = sToolTipText;
sPixmap = "Raytrace_ResetCamera";
}
void CmdRaytracingResetCamera::activated(int iMsg)
{
std::vector<Gui::SelectionSingleton::SelObj> Sel = getSelection().getSelection();
unsigned int n = getSelection().countObjectsOfType(Raytracing::RayProject::getClassTypeId());
if (n != 1) {
n = getSelection().countObjectsOfType(Raytracing::LuxProject::getClassTypeId());
if (n != 1) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
QObject::tr("Select one Raytracing project object."));
return;
} else {
//luxrender
openCommand("Reset Raytracing Camera");
doCommand(Doc,"import RaytracingGui");
doCommand(Doc,"App.activeDocument().%s.Camera = RaytracingGui.luxViewCamera()",Sel[0].FeatName);
commitCommand();
doCommand(Doc,"App.activeDocument().recompute()");
}
} else {
//povray
openCommand("Reset Raytracing Camera");
doCommand(Doc,"import RaytracingGui");
doCommand(Doc,"App.activeDocument().%s.Camera = RaytracingGui.povViewCamera()",Sel[0].FeatName);
commitCommand();
doCommand(Doc,"App.activeDocument().recompute()");
}
}
bool CmdRaytracingResetCamera::isActive(void)
{
return (getActiveGuiDocument() ? true : false);
}
void CreateRaytracingCommands(void)
{
Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager();
@ -627,4 +718,5 @@ void CreateRaytracingCommands(void)
rcCmdMgr.addCommand(new CmdRaytracingNewPartSegment());
rcCmdMgr.addCommand(new CmdRaytracingRender());
rcCmdMgr.addCommand(new CmdRaytracingNewLuxProject());
rcCmdMgr.addCommand(new CmdRaytracingResetCamera());
}

View File

@ -134,7 +134,7 @@
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Output parameters:</string>
<string>Povray output parameters:</string>
</property>
</widget>
</item>
@ -210,6 +210,26 @@
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Luxrender executable:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Gui::PrefFileChooser" name="prefFileChooser3">
<property name="toolTip">
<string>The path to the luxrender (or luxconsole) executable</string>
</property>
<property name="prefEntry" stdset="0">
<cstring>LuxrenderExecutable</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Raytracing</cstring>
</property>
</widget>
</item>
</layout>
</item>
</layout>

View File

@ -51,6 +51,7 @@ void DlgSettingsRayImp::saveSettings()
{
prefFileChooser1->onSave();
prefFileChooser2->onSave();
prefFileChooser3->onSave();
prefLineEdit2->onSave();
prefLineEdit3->onSave();
prefFloatSpinBox1->onSave();
@ -65,6 +66,7 @@ void DlgSettingsRayImp::loadSettings()
{
prefFileChooser1->onRestore();
prefFileChooser2->onRestore();
prefFileChooser3->onRestore();
prefLineEdit2->onRestore();
prefLineEdit3->onRestore();
prefFloatSpinBox1->onRestore();

View File

@ -8,6 +8,7 @@
<file>icons/Raytrace_ExportProject.svg</file>
<file>icons/Raytrace_NewPartSegment.svg</file>
<file>icons/Raytrace_Render.svg</file>
<file>icons/Raytrace_ResetCamera.svg</file>
<file>icons/Raytrace_Lux.svg</file>
<file>translations/Raytracing_af.qm</file>
<file>translations/Raytracing_de.qm</file>

View File

@ -0,0 +1,533 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="48.000000px"
height="48.000000px"
id="svg249"
sodipodi:version="0.32"
inkscape:version="0.48.4 r9939"
sodipodi:docname="Raytrace_ResetCamera.svg"
inkscape:export-filename="/home/jimmac/gfx/novell/pdes/trunk/docs/BIGmime-text.png"
inkscape:export-xdpi="240.00000"
inkscape:export-ydpi="240.00000"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<defs
id="defs3">
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient5060"
id="radialGradient5031"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
cx="605.71429"
cy="486.64789"
fx="605.71429"
fy="486.64789"
r="117.14286" />
<linearGradient
inkscape:collect="always"
id="linearGradient5060">
<stop
style="stop-color:black;stop-opacity:1;"
offset="0"
id="stop5062" />
<stop
style="stop-color:black;stop-opacity:0;"
offset="1"
id="stop5064" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient5060"
id="radialGradient5029"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
cx="605.71429"
cy="486.64789"
fx="605.71429"
fy="486.64789"
r="117.14286" />
<linearGradient
id="linearGradient5048">
<stop
style="stop-color:black;stop-opacity:0;"
offset="0"
id="stop5050" />
<stop
id="stop5056"
offset="0.5"
style="stop-color:black;stop-opacity:1;" />
<stop
style="stop-color:black;stop-opacity:0;"
offset="1"
id="stop5052" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5048"
id="linearGradient5027"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
x1="302.85715"
y1="366.64789"
x2="302.85715"
y2="609.50507" />
<linearGradient
inkscape:collect="always"
id="linearGradient4542">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop4544" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop4546" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4542"
id="radialGradient4548"
cx="24.306795"
cy="42.07798"
fx="24.306795"
fy="42.07798"
r="15.821514"
gradientTransform="matrix(1.000000,0.000000,0.000000,0.284916,-6.310056e-16,30.08928)"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient15662">
<stop
style="stop-color:#ffffff;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop15664" />
<stop
style="stop-color:#f8f8f8;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop15666" />
</linearGradient>
<radialGradient
gradientUnits="userSpaceOnUse"
fy="64.5679"
fx="20.8921"
r="5.257"
cy="64.5679"
cx="20.8921"
id="aigrd3">
<stop
id="stop15573"
style="stop-color:#F0F0F0"
offset="0" />
<stop
id="stop15575"
style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
offset="1.0000000" />
</radialGradient>
<radialGradient
gradientUnits="userSpaceOnUse"
fy="114.5684"
fx="20.8921"
r="5.256"
cy="114.5684"
cx="20.8921"
id="aigrd2">
<stop
id="stop15566"
style="stop-color:#F0F0F0"
offset="0" />
<stop
id="stop15568"
style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
offset="1.0000000" />
</radialGradient>
<linearGradient
id="linearGradient269">
<stop
style="stop-color:#a3a3a3;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop270" />
<stop
style="stop-color:#4c4c4c;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop271" />
</linearGradient>
<linearGradient
id="linearGradient259">
<stop
style="stop-color:#fafafa;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop260" />
<stop
style="stop-color:#bbbbbb;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop261" />
</linearGradient>
<linearGradient
id="linearGradient12512">
<stop
style="stop-color:#ffffff;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop12513" />
<stop
style="stop-color:#fff520;stop-opacity:0.89108908;"
offset="0.50000000"
id="stop12517" />
<stop
style="stop-color:#fff300;stop-opacity:0.0000000;"
offset="1.0000000"
id="stop12514" />
</linearGradient>
<radialGradient
r="37.751713"
fy="3.7561285"
fx="8.8244190"
cy="3.7561285"
cx="8.8244190"
gradientTransform="matrix(0.968273,0,0,1.032767,3.4281936,-47.492271)"
gradientUnits="userSpaceOnUse"
id="radialGradient15656"
xlink:href="#linearGradient269"
inkscape:collect="always" />
<radialGradient
r="86.708450"
fy="35.736916"
fx="33.966679"
cy="35.736916"
cx="33.966679"
gradientTransform="matrix(0.960493,0,0,1.041132,7.4640626e-2,-48.138718)"
gradientUnits="userSpaceOnUse"
id="radialGradient15658"
xlink:href="#linearGradient259"
inkscape:collect="always" />
<radialGradient
r="38.158695"
fy="7.2678967"
fx="8.1435566"
cy="7.2678967"
cx="8.1435566"
gradientTransform="matrix(0.968273,0,0,1.032767,3.4281936,-47.492271)"
gradientUnits="userSpaceOnUse"
id="radialGradient15668"
xlink:href="#linearGradient15662"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#aigrd2"
id="radialGradient2283"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.229703,0,0,0.229703,4.613529,3.979808)"
cx="20.8921"
cy="114.5684"
fx="20.8921"
fy="114.5684"
r="5.256" />
<radialGradient
inkscape:collect="always"
xlink:href="#aigrd3"
id="radialGradient2285"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.229703,0,0,0.229703,4.613529,3.979808)"
cx="20.8921"
cy="64.5679"
fx="20.8921"
fy="64.5679"
r="5.257" />
<linearGradient
id="linearGradient3600-63">
<stop
id="stop3602-9"
offset="0"
style="stop-color:#000117;stop-opacity:1;" />
<stop
id="stop3604-0"
offset="1"
style="stop-color:#4f82b9;stop-opacity:1;" />
</linearGradient>
<linearGradient
gradientUnits="userSpaceOnUse"
y2="10.397644"
x2="14.872466"
y1="47.692612"
x1="51.037281"
id="linearGradient3606-0"
xlink:href="#linearGradient3600-63"
inkscape:collect="always" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
id="perspective3679" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
id="perspective3656" />
<linearGradient
id="linearGradient3600-6">
<stop
id="stop3602-5"
offset="0"
style="stop-color:#000117;stop-opacity:1;" />
<stop
id="stop3604-4"
offset="1"
style="stop-color:#4f82b9;stop-opacity:1;" />
</linearGradient>
<linearGradient
gradientUnits="userSpaceOnUse"
y2="10.397644"
x2="14.872466"
y1="47.692612"
x1="51.037281"
id="linearGradient3606-5"
xlink:href="#linearGradient3600-6"
inkscape:collect="always" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
id="perspective3618" />
<inkscape:perspective
id="perspective2824"
inkscape:persp3d-origin="32 : 21.333333 : 1"
inkscape:vp_z="64 : 32 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 32 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
id="linearGradient3600">
<stop
id="stop3602"
offset="0"
style="stop-color:#000117;stop-opacity:1;" />
<stop
id="stop3604"
offset="1"
style="stop-color:#4f82b9;stop-opacity:1;" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="0.32941176"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="6.8206341"
inkscape:cx="5.9789774"
inkscape:cy="29.760204"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1920"
inkscape:window-height="1053"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:showpageshadow="false"
inkscape:window-maximized="1"
inkscape:snap-nodes="true"
inkscape:object-paths="true" />
<metadata
id="metadata4">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Jakub Steiner</dc:title>
</cc:Agent>
</dc:creator>
<dc:source>http://jimmac.musichall.cz</dc:source>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
<cc:permits
rdf:resource="http://web.resource.org/cc/Reproduction" />
<cc:permits
rdf:resource="http://web.resource.org/cc/Distribution" />
<cc:requires
rdf:resource="http://web.resource.org/cc/Notice" />
<cc:requires
rdf:resource="http://web.resource.org/cc/Attribution" />
<cc:permits
rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
<cc:requires
rdf:resource="http://web.resource.org/cc/ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:label="Shadow"
id="layer6"
inkscape:groupmode="layer">
<g
style="display:inline"
id="g5022"
transform="matrix(2.165152e-2,0,0,1.485743e-2,43.0076,42.68539)">
<rect
y="-150.69685"
x="-1559.2523"
height="478.35718"
width="1339.6335"
id="rect4173"
style="opacity:0.40206185;color:black;fill:url(#linearGradient5027);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
<path
sodipodi:nodetypes="cccc"
id="path5058"
d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z "
style="opacity:0.40206185;color:black;fill:url(#radialGradient5029);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
<path
style="opacity:0.40206185;color:black;fill:url(#radialGradient5031);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z "
id="path5018"
sodipodi:nodetypes="cccc" />
</g>
</g>
<g
id="layer1"
inkscape:label="Base"
inkscape:groupmode="layer"
style="display:inline">
<rect
ry="1.1490486"
y="-44.492271"
x="6.6781936"
height="40.920494"
width="34.875"
id="rect15391"
style="color:#000000;fill:url(#radialGradient15658);fill-opacity:1;fill-rule:nonzero;stroke:url(#radialGradient15656);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
rx="1.1490486"
transform="matrix(3.7443726e-4,0.9999999,-0.9999999,3.7443726e-4,0,0)" />
<rect
rx="0.14904857"
ry="0.14904857"
y="-43.554771"
x="7.7406945"
height="38.946384"
width="32.775887"
id="rect15660"
style="color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#radialGradient15668);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
transform="matrix(3.7443726e-4,0.9999999,-0.9999999,3.7443726e-4,0,0)" />
<g
id="g2270"
transform="matrix(3.7443726e-4,0.9999999,-0.9999999,3.7443726e-4,48.176974,0.7030484)">
<g
transform="matrix(0.229703,0,0,0.229703,4.967081,4.244972)"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-miterlimit:4"
id="g1440">
<radialGradient
gradientUnits="userSpaceOnUse"
fy="114.5684"
fx="20.892099"
r="5.256"
cy="114.5684"
cx="20.892099"
id="radialGradient1442">
<stop
id="stop1444"
style="stop-color:#F0F0F0"
offset="0" />
<stop
id="stop1446"
style="stop-color:#474747"
offset="1" />
</radialGradient>
<path
id="path1448"
d="M 23.428,113.07 C 23.428,115.043 21.828,116.642 19.855,116.642 C 17.881,116.642 16.282,115.042 16.282,113.07 C 16.282,111.096 17.882,109.497 19.855,109.497 C 21.828,109.497 23.428,111.097 23.428,113.07 z "
style="stroke:none" />
<radialGradient
gradientUnits="userSpaceOnUse"
fy="64.567902"
fx="20.892099"
r="5.257"
cy="64.567902"
cx="20.892099"
id="radialGradient1450">
<stop
id="stop1452"
style="stop-color:#F0F0F0"
offset="0" />
<stop
id="stop1454"
style="stop-color:#474747"
offset="1" />
</radialGradient>
<path
id="path1456"
d="M 23.428,63.07 C 23.428,65.043 21.828,66.643 19.855,66.643 C 17.881,66.643 16.282,65.043 16.282,63.07 C 16.282,61.096 17.882,59.497 19.855,59.497 C 21.828,59.497 23.428,61.097 23.428,63.07 z "
style="stroke:none" />
</g>
<path
id="path15570"
d="M 9.9950109,29.952326 C 9.9950109,30.40553 9.6274861,30.772825 9.1742821,30.772825 C 8.7208483,30.772825 8.3535532,30.405301 8.3535532,29.952326 C 8.3535532,29.498892 8.721078,29.131597 9.1742821,29.131597 C 9.6274861,29.131597 9.9950109,29.499122 9.9950109,29.952326 z "
style="fill:url(#radialGradient2283);fill-rule:nonzero;stroke:none;stroke-miterlimit:4" />
<path
id="path15577"
d="M 9.9950109,18.467176 C 9.9950109,18.92038 9.6274861,19.287905 9.1742821,19.287905 C 8.7208483,19.287905 8.3535532,18.92038 8.3535532,18.467176 C 8.3535532,18.013742 8.721078,17.646447 9.1742821,17.646447 C 9.6274861,17.646447 9.9950109,18.013972 9.9950109,18.467176 z "
style="fill:url(#radialGradient2285);fill-rule:nonzero;stroke:none;stroke-miterlimit:4" />
</g>
<path
sodipodi:nodetypes="cc"
id="path15672"
d="M 42.648774,11.564395 L 4.7421847,11.578589"
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.98855311;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.01754384" />
<path
sodipodi:nodetypes="cc"
id="path15674"
d="M 43.122908,12.558495 L 5.105198,12.57273"
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.20467828" />
<rect
style="color:#000000;fill:#75f7e5;stroke:#006c67;stroke-width:2.68599999999999994;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;fill-opacity:1"
id="rect3072"
width="28.098507"
height="21.048832"
x="9.8989105"
y="15.497183" />
<path
style="fill:none;stroke:#006c67;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d="M 11.196544,15.497183 37.997417,36.285097"
id="path3842"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#006c67;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d="M 10.159827,36.546015 37.218143,15.497183"
id="path3844"
inkscape:connector-curvature="0" />
<rect
style="color:#000000;fill:#ffffff;stroke:#006c67;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;fill-opacity:1"
id="rect3072-1"
width="13.616147"
height="10.199972"
x="17.140091"
y="20.921612" />
</g>
<g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="new"
style="display:inline" />
</svg>

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -70,6 +70,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
<< "Raytracing_NewPovrayProject"
<< "Raytracing_NewLuxProject"
<< "Raytracing_NewPartSegment"
<< "Raytracing_ResetCamera"
<< "Raytracing_ExportProject"
<< "Raytracing_Render";
@ -85,6 +86,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
<< "Raytracing_NewPovrayProject"
<< "Raytracing_NewLuxProject"
<< "Raytracing_NewPartSegment"
<< "Raytracing_ResetCamera"
<< "Raytracing_ExportProject"
<< "Raytracing_Render";
return root;

View File

@ -100,6 +100,8 @@ MakeNamedMaterial "outside.003"
# Geometry File
#RaytracingContent
AttributeBegin # "Plane.007"
Transform [-0.083770856261253 0.000000133886644 -0.996485054492950 0.000000000000000 -0.000000133886729 1.000000000000000 0.000000145614280 0.000000000000000 0.996485054492950 0.000000145614365 -0.083770856261253 0.000000000000000 -0.465571254491806 -0.011301971040666 0.364225387573242 1.000000000000000]
@ -150,11 +152,9 @@ Shape "mesh"
AttributeEnd # ""
#RaytracingContent
AttributeBegin # "Cube.002"
Transform [1.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.000000000000000]
Transform [10.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 10.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 10.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.000000000000000]
NamedMaterial "outside.003"