From 0015f5e53b1277c393a696188b2285b21d1291bc Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Mon, 22 Nov 2010 09:18:15 +0100 Subject: [PATCH 1/4] even nicer XML output --- src/converter/converter.cpp | 42 +++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/src/converter/converter.cpp b/src/converter/converter.cpp index d5502c59..04e693f5 100644 --- a/src/converter/converter.cpp +++ b/src/converter/converter.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -231,12 +231,46 @@ void GeometryConverter::convert(const fs::path &inputFile, serConf->setParameter(XMLUni::fgDOMErrorHandler, &errorHandler); if (serConf->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint, true)) serConf->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint, true); - if (serConf->canSetParameter(XMLUni::fgDOMWRTXercesPrettyPrint, true)) - serConf->setParameter(XMLUni::fgDOMWRTXercesPrettyPrint, true); DOMLSOutput *output = impl->createLSOutput(); - XMLFormatTarget *target = new LocalFileFormatTarget(outputFile.file_string().c_str()); + MemBufFormatTarget *target = new MemBufFormatTarget(); output->setByteStream(target); serializer->write(doc, output); + const XMLByte *content = target->getRawBuffer(); + std::ostringstream oss; + + /* Turn leading spaces into tabs */ + bool newline = true; + int numSpaces = 0; + for (size_t i=0; igetLen(); ++i) { + char data = content[i]; + switch (data) { + case ' ': + if (newline) + numSpaces++; + else + oss << data; + break; + case '\r': + case '\n': + oss << data; + newline = true; + numSpaces = 0; + break; + default: + if (newline) { + for (int i=0; i Date: Tue, 23 Nov 2010 02:09:22 +0100 Subject: [PATCH 2/4] changelog updates --- data/linux/debian/changelog | 23 +++++++++++++++++++++++ data/linux/debian/mitsuba.install | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/data/linux/debian/changelog b/data/linux/debian/changelog index dc5c633b..2a653fb5 100644 --- a/data/linux/debian/changelog +++ b/data/linux/debian/changelog @@ -1,3 +1,26 @@ +mitsuba (0.2.0-1) unstable; urgency=low + + * The COLLADA importer is more robust and should handle most scenes (hm, this sounds familiar). Rather than generating hundreds of translated mesh files, the new version instead produces one single compressed file. + * I've added an experimental plugin for Blender 2.5 integration, including a custom material designer. Since it depends on features which won't be in Blender until the upcoming 2.56 release, it is currently necessary to compile Blender from SVN to use the plugin. Many thanks go to Doug Hammond for providing his excellent EF package, which the plugin uses extensively. + * The KD-tree acceleration and construction code has been completely rewritten. The new code produces noticeably better trees and does so within a fraction of the time of the old version. It also scales to very large polygonal meshes (>20M triangles), whereas the previous implementation would quickly exhaust all available memory in such cases. (see http://www.mitsuba-renderer.org/devblog/archives/10-New-acceleration-data-structures.html for details) + * Instancing support was added, and there is limited (rigid) animation support for shapes. + * Edgar has kindly contributed patches to compile Mitsuba using the Intel C++ compiler. Official windows 32-/64-bit builds now use this compiler, since it produces faster-running executables (in comparison to Visual Studio). + * The XML schema of the scene description language is now less picky. Specifically, it is possible to specify properties and objects in an arbitrary order. + * Standard UV texture mapping controls (offset, scale) are provided + * Luminaire importance sampling is more flexible. The previous implementation sampled a light source proportional to its power, which was often exactly the wrong thing to do. In this release, the sampling weights ca be manually specified. + * There is partial support for rendering vast amounts of hair (partial because only the intersection shape is implemented at this point -- no hair-specific scattering models have been added yet) + * A PLY file loader based on libply (courtesy of Ares Lagae) was added + * Vertex colors are now accessible within the renderer. This is implemented using a special "texture", which forwards the color information to scattering models + * Severe lock contention issues in the irradiance cache were fixed (these resulted in slow performance when rendering on many cores). + * The loading dialog now contains a console, which shows what is happening while waiting for a large scene to load + * The builtin environment map luminaire support importance sampling (it did uniform sampling before - jikes!) + * A bunch of materials and textures now have GLSL implementations so that they can be used in the interactive preview + * The preview itself should be quite a bit faster due to optimizations in how geometry is passed to the GPU. + + As usual, a large number of bugs were also fixed. The documentation is still rather incomplete, but I'm working on it. + + -- Wenzel Jakob Tue, 23 Nov 2010 02:06:00 -0400 + mitsuba (0.1.3-1) unstable; urgency=low This is mainly a bugfix release to address a serious regression in the diff --git a/data/linux/debian/mitsuba.install b/data/linux/debian/mitsuba.install index aad3313a..aedbb165 100644 --- a/data/linux/debian/mitsuba.install +++ b/data/linux/debian/mitsuba.install @@ -9,4 +9,4 @@ src/libcore/libmitsuba-core.so /usr/lib schema/scene.xsd /usr/share/mitsuba/schema plugins/* /usr/share/mitsuba/plugins src/qtgui/resources/mitsuba48.png /usr/share/pixmaps -tools/linux/mitsuba.desktop /usr/share/applications +data/linux/mitsuba.desktop /usr/share/applications From f04289268618613cddc8e6c09ac0711481431e3b Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Tue, 23 Nov 2010 11:25:33 +0100 Subject: [PATCH 3/4] bugfix to the area light GLSL shader --- src/luminaires/area.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/luminaires/area.cpp b/src/luminaires/area.cpp index 2360d9d1..0517b793 100644 --- a/src/luminaires/area.cpp +++ b/src/luminaires/area.cpp @@ -192,7 +192,7 @@ public: << "vec3 " << evalName << "_dir(vec3 wo) {" << endl << " if (wo.z < 0.0)" << endl << " return vec3(0.0);" << endl - << " return vec3(0.31831);" << endl + << " return vec3(1.0);" << endl << "}" << endl; } From 3fc8b212e33e7d172d4bf7d808f53aa5b051cdaa Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Tue, 23 Nov 2010 11:40:02 +0100 Subject: [PATCH 4/4] bugfix for the bugfix --- src/luminaires/area.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/luminaires/area.cpp b/src/luminaires/area.cpp index 0517b793..bc53fca9 100644 --- a/src/luminaires/area.cpp +++ b/src/luminaires/area.cpp @@ -186,13 +186,13 @@ public: oss << "uniform vec3 " << evalName << "_intensity;" << endl << endl << "vec3 " << evalName << "_area(vec2 uv) {" << endl - << " return " << evalName << "_intensity;" << endl + << " return " << evalName << "_intensity * 3.1415;" << endl << "}" << endl << endl << "vec3 " << evalName << "_dir(vec3 wo) {" << endl << " if (wo.z < 0.0)" << endl << " return vec3(0.0);" << endl - << " return vec3(1.0);" << endl + << " return vec3(0.31831);" << endl << "}" << endl; }