Giter Site home page Giter Site logo

tungsten's Introduction

Tungsten Sample Render

The Tungsten Renderer

About

Tungsten is a physically based renderer originally written for the yearly renderer competition at ETH. It simulates full light transport through arbitrary geometry based on unbiased integration of the rendering equation. To do this, Tungsten supports various light transport algorithms such as bidirectional path tracing, progressive photon mapping, primary sample space metropolis light transport and more.

Tungsten is written in C++11 and makes use of Intel's high-performance geometry intersection library embree. Tungsten takes full advantage of multicore systems and tries to offer good performance through frequent benchmarking and optimization. At least SSE3 support is required to run the renderer.

Documentation

Documentation is planned, but currently unavailable (sorry!). A lengthy overview of features is available in the final project report written as part of the submission for the rendering competition, although that document may be outdated.

A small selection of example scenes can be found in data/example-scenes. There is also a material test scene found in data/materialtest, which contains the Tungsten material test ball that you can use to test different materials and lighting setups..

License

To give developers as much freedom as is reasonable, Tungsten is distributed under the libpng/zlib license. This allows you to modify, redistribute and sell all or parts of the code without attribution.

Note that Tungsten includes several third-party libraries in the src/thirdparty folder that come with their own licenses. Please see the LICENSE.txt file for more information.

Compilation

Windows + MinGW

To build using MinGW, you will need a recent CMake + gcc version. CMake binary distributions are available here. I recommend using MinGW-w64 available here.

In the root folder of the repo, use these commands in an MSYS shell to build:

./setup_builds.sh
cd builds/release
make

The binaries will be placed in the build/release directory after buiding.

Optionally, you can install the Qt framework to build the scene editor utility. If Qt is not detected during setup, the scene editor will not be built (you will still be able to use the renderer).

Windows + MSVC

To build using MSVC, you will need a recent CMake version and MSVC 2013. CMake binary distributions are available here.

After installing CMake, double click the setup_builds.bat file. The MSVC project will be created in the folder vstudio. Open the vstudio/Tungsten.sln solution and press F7 to build.

Linux

Building on Linux works just like building on MINGW.

Usage

The core renderer can be invoked using

tungsten scene.json

You can also queue up multiple scenes using

tungsten scene1.json scene2.json scene3.json

and so forth. All renderer parameters, including output files, are specified in the json file.

You can test your local build by rendering the material test scene in data/materialtest/materialtest.json.

You can also use

tungsten --help

for more information.

Code structure

src/core/ contains all the code for primitive intersection, materials, sampling, integration and so forth. It is the beefy part of the renderer and the place to start if you're interested in studying the code.

src/thirdparty contains all the libraries used in the project. They are included in the repository, since most of them are either tiny single-file libraries or, in the case of embree, had to be modified to work with the renderer.

src/tungsten contains the rendering application itself, which is just a small command line interface to the core rendering code.

All other folders in src are small utilities described below.

Additional utilities

Apart from the core renderer, Tungsten also comes with several tools to make content creation easier.

tungsten_server

This is a standalone version of the renderer that comes with a built-in HTTP status server.

It will serve the following files:

  • /render: The current framebuffer (possibly in an incomplete state).
  • /status: A JSON string containing information about the current render status.
  • /log: A text version of the render log.

Use

tungsten_server --help

for more information.

scenemanip

scenemanip comes with a range of tools to manipulate scene files, among others the capability to package scenes and all references resources (textures, meshes, etc.) into a zip archive.

Use

scenemanip --help

for more information.

hdrmanip

hdrmanip comes with a few useful tools for manipulating HDR output files produced by the renderer. Where available, we recommend using established image manipulation tools, but where HDR support is sparsely available, this tool can be useful.

To convert an HDR image to low dynamic range, use

hdrmanip -o output.png input.exr

You can also specify the tonemapping operator to be applied when converting. For example, to use a filmic tonemap, use

hdrmanip --tonemap filmic -o output.png input.exr

To adjust the exposure of an HDR file, you can use

hdrmanip --exposure -1.0 -o output.exr input.exr

If you don't specify an output file, the tool will overwrite the input file. You can also modify several input files at once. For example, you can use

hdrmanip --exposure -1.0 input1.exr input2.exr input3.exr

to adjust the exposure of several files at once.

If you don't want to overwrite the input files, you can specify an output directory with -o

hdrmanip -o outputdir --exposure -1.0 input1.exr input2.exr input3.exr 

When specifying multiple files, -o is interpreted as an output directory, and its file extension is ignored. If you want to convert multiple input files to a different file format or even low dynamic range, you can use --file-type

hdrmanip --file-type png input1.exr input2.exr input3.exr

Finally, hdrmanip also supports merging multiple HDR files together. This is useful when you split up a render across several machines and want to average the outputs to get a less noisy image. You can use --merge for this

hdrmanip --merge -o output.exr input1.exr input2.exr input3.exr

Of course, you can also adjust the exposure and convert to low dynamic range while merging, all in one step.

Use

hdrmanip --help

for more information.

obj2json

The command

obj2json srcFile.obj dstFile.json

will parse the Wavefront OBJ srcFile.obj, including object hierarchy and materials, and create a scene file dstFile.json reproducing hierarchy and material assignments.

In addition, meshes in the OBJ file will be automatically converted and saved to Tungsten's native *.wo3 mesh format, which significantly reduces loading time for large meshes. This may create a large number of new files - consider pointing the dstFile.json path into an empty subfolder to avoid file clutter.

json2xml

The command

json2xml srcFile.json dstFile.xml

will parse the scene file srcFile.json and convert it to an XML scene description compatible with the Mitsuba renderer. All *.wo3 files will be converted to Mitsuba compatible OBJs, which may create a large number of new files - consider putting dstFile.xml into an empty subfolder to avoid file clutter.

Note that this tool does not experience heavy testing and does not support all features of Tungsten, so it may not always work as expected.

editor

This is a minimalist scene editor written in Qt and OpenGL. It supports camera setup, manipulating transforms, compositing scenes and a few more features that I found useful.

It is usable, but a few crucial features are currently missing from it (including documentation). The code is neither exceptionally clean nor stable, so use at your own risk.

tungsten's People

Contributors

chaosink avatar counterpillow avatar eminence avatar mmp avatar tunabrain avatar tvogels avatar westlicht avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tungsten's Issues

VS2013 compile error when you define the static const variable in class of head file

hi, when I fork your renderer and compile it with VS2013 on Windows, I found the compiler will encounter error of "the xxx(variable) already defined in core.lib". I think maybe the reason is you defined the variable in the head file and give them a value. Many people will give them value in cpp usually that won't cause these errors.
Such as: the class "FileInputStreambuf" in FileStreamBuf.hpp have declared the varable "static CONSTEXPR size_t PutBackSize = 8", if FileUtil.cpp include this head file, when other files also include this head file, the compile will encounter the error of redefined.
I want to know how you solve this error in your project, thank you very much!

issue compiling the code

I just wanted to test it out... installed qt4 and glew..opengl was there... tried compiling and get the bellow...am I missing something?

Error 33 error C2864: 'Tungsten::PreviewWindow::Fov' : a static data member with an in-class initializer must have non-volatile const integral type c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.hpp 57 1 editor
Error 34 error C2864: 'Tungsten::PreviewWindow::Near' : a static data member with an in-class initializer must have non-volatile const integral type c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.hpp 58 1 editor
Error 35 error C2864: 'Tungsten::PreviewWindow::Far' : a static data member with an in-class initializer must have non-volatile const integral type c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.hpp 59 1 editor
Error 36 error C2797: 'Tungsten::PreviewWindow::DefaultPriorities': list initialization inside member initializer list or non-static data member initializer is not implemented c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.hpp 67 1 editor
Error 40 error C2065: 'uint8_t' : undeclared identifier C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\opengl\Texture.cpp 279 1 editor
Error 41 error C2059: syntax error : ')' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\opengl\Texture.cpp 279 1 editor
Error 50 error C2864: 'Tungsten::PreviewWindow::Fov' : a static data member with an in-class initializer must have non-volatile const integral type c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.hpp 57 1 editor
Error 51 error C2864: 'Tungsten::PreviewWindow::Near' : a static data member with an in-class initializer must have non-volatile const integral type c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.hpp 58 1 editor
Error 52 error C2864: 'Tungsten::PreviewWindow::Far' : a static data member with an in-class initializer must have non-volatile const integral type c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.hpp 59 1 editor
Error 53 error C2797: 'Tungsten::PreviewWindow::DefaultPriorities': list initialization inside member initializer list or non-static data member initializer is not implemented c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.hpp 67 1 editor
Error 54 error C2734: 'Tungsten::PreviewWindow::Fov' : const object must be initialized if not extern C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.cpp 22 1 editor
Error 55 error C2734: 'Tungsten::PreviewWindow::Near' : const object must be initialized if not extern C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.cpp 23 1 editor
Error 56 error C2734: 'Tungsten::PreviewWindow::Far' : const object must be initialized if not extern C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.cpp 24 1 editor
Error 57 error C2143: syntax error : missing ';' before '}' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.cpp 38 1 editor
Error 58 error C2143: syntax error : missing ';' before '}' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.cpp 44 1 editor
Error 59 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 40 1 editor
Error 60 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 40 1 editor
Error 61 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 41 1 editor
Error 62 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 41 1 editor
Error 63 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 42 1 editor
Error 64 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 42 1 editor
Error 65 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 44 1 editor
Error 66 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 44 1 editor
Error 67 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 46 1 editor
Error 68 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 46 1 editor
Error 69 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 49 1 editor
Error 70 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 49 1 editor
Error 71 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 51 1 editor
Error 72 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 51 1 editor
Error 73 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 53 1 editor
Error 74 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 53 1 editor
Error 75 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 55 1 editor
Error 76 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 55 1 editor
Error 77 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 57 1 editor
Error 78 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 57 1 editor
Error 79 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 59 1 editor
Error 80 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 59 1 editor
Error 81 error C2660: 'Tungsten::PropertySheet::addBsdfProperty' : function does not take 5 arguments C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\BsdfProperties.cpp 14 1 editor
Error 88 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 40 1 editor
Error 89 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 40 1 editor
Error 90 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 41 1 editor
Error 91 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 41 1 editor
Error 92 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 42 1 editor
Error 93 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 42 1 editor
Error 94 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 44 1 editor
Error 95 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 44 1 editor
Error 96 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 46 1 editor
Error 97 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 46 1 editor
Error 98 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 49 1 editor
Error 99 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 49 1 editor
Error 100 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 51 1 editor
Error 101 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 51 1 editor
Error 102 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 53 1 editor
Error 103 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 53 1 editor
Error 104 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 55 1 editor
Error 105 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 55 1 editor
Error 106 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 57 1 editor
Error 107 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 57 1 editor
Error 108 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 59 1 editor
Error 109 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 59 1 editor
Error 110 error C2660: 'Tungsten::PropertySheet::addStringProperty' : function does not take 3 arguments C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PrimitiveProperties.cpp 15 1 editor
Error 111 error C2660: 'Tungsten::PropertySheet::addTextureProperty' : function does not take 6 arguments C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PrimitiveProperties.cpp 21 1 editor
Error 112 error C2660: 'Tungsten::PropertySheet::addMediumProperty' : function does not take 4 arguments C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PrimitiveProperties.cpp 25 1 editor
Error 113 error C2660: 'Tungsten::PropertySheet::addMediumProperty' : function does not take 4 arguments C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PrimitiveProperties.cpp 29 1 editor
Error 114 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 40 1 editor
Error 115 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 40 1 editor
Error 116 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 41 1 editor
Error 117 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 41 1 editor
Error 118 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 42 1 editor
Error 119 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 42 1 editor
Error 120 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 44 1 editor
Error 121 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 44 1 editor
Error 122 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 46 1 editor
Error 123 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 46 1 editor
Error 124 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 49 1 editor
Error 125 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 49 1 editor
Error 126 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 51 1 editor
Error 127 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 51 1 editor
Error 128 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 53 1 editor
Error 129 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 53 1 editor
Error 130 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 55 1 editor
Error 131 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 55 1 editor
Error 132 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 57 1 editor
Error 133 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 57 1 editor
Error 134 error C2039: 'function' : is not a member of 'std' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 59 1 editor
Error 135 error C2061: syntax error : identifier 'function' c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.hpp 59 1 editor
Error 136 error C2511: 'Tungsten::BoolProperty *Tungsten::PropertySheet::addBoolProperty(int,std::string,std::function<bool (bool)>)' : overloaded member function not found in 'Tungsten::PropertySheet' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 25 1 editor
Error 137 error C2597: illegal reference to non-static member 'Tungsten::PropertySheet::_parent' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 26 1 editor
Error 138 error C2671: 'Tungsten::PropertySheet::addBoolProperty' : static member functions do not have 'this' pointers C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 26 1 editor
Error 139 error C2228: left of '.emplace_back' must have class/struct/union C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 27 1 editor
Error 140 error C2511: 'Tungsten::IntProperty *Tungsten::PropertySheet::addIntProperty(int,int,int,std::string,std::function<bool (int)>)' : overloaded member function not found in 'Tungsten::PropertySheet' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 32 1 editor
Error 141 error C2597: illegal reference to non-static member 'Tungsten::PropertySheet::_parent' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 33 1 editor
Error 142 error C2671: 'Tungsten::PropertySheet::addIntProperty' : static member functions do not have 'this' pointers C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 33 1 editor
Error 143 error C2228: left of '.emplace_back' must have class/struct/union C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 34 1 editor
Error 144 error C2511: 'Tungsten::FloatProperty *Tungsten::PropertySheet::addFloatProperty(float,std::string,std::function<bool (float)>)' : overloaded member function not found in 'Tungsten::PropertySheet' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 39 1 editor
Error 145 error C2597: illegal reference to non-static member 'Tungsten::PropertySheet::_parent' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 40 1 editor
Error 146 error C2671: 'Tungsten::PropertySheet::addFloatProperty' : static member functions do not have 'this' pointers C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 40 1 editor
Error 147 error C2228: left of '.emplace_back' must have class/struct/union C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 41 1 editor
Error 148 error C2511: 'Tungsten::VectorProperty *Tungsten::PropertySheet::addVectorProperty(Tungsten::Vec3f,std::string,bool,std::function<bool (Tungsten::Vec3f)>)' : overloaded member function not found in 'Tungsten::PropertySheet' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 47 1 editor
Error 149 error C2597: illegal reference to non-static member 'Tungsten::PropertySheet::_parent' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 48 1 editor
Error 150 error C2671: 'Tungsten::PropertySheet::addVectorProperty' : static member functions do not have 'this' pointers C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 48 1 editor
Error 151 error C2228: left of '.emplace_back' must have class/struct/union C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 49 1 editor
Error 152 error C2511: 'Tungsten::StringProperty *Tungsten::PropertySheet::addStringProperty(std::string,std::string,std::function<bool (const std::string &)>)' : overloaded member function not found in 'Tungsten::PropertySheet' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 54 1 editor
Error 153 error C2597: illegal reference to non-static member 'Tungsten::PropertySheet::_parent' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 55 1 editor
Error 154 error C2671: 'Tungsten::PropertySheet::addStringProperty' : static member functions do not have 'this' pointers C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 55 1 editor
Error 155 error C2228: left of '.emplace_back' must have class/struct/union C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 57 1 editor
Error 156 error C2511: 'Tungsten::PathProperty *Tungsten::PropertySheet::addPathProperty(std::string,std::string,std::string,std::string,std::string,std::function<bool (const std::string &)>)' : overloaded member function not found in 'Tungsten::PropertySheet' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 64 1 editor
Error 157 error C2597: illegal reference to non-static member 'Tungsten::PropertySheet::_parent' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 65 1 editor
Error 158 error C2671: 'Tungsten::PropertySheet::addPathProperty' : static member functions do not have 'this' pointers C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 65 1 editor
Error 159 error C2228: left of '.emplace_back' must have class/struct/union C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 68 1 editor
Error 160 error C2511: 'Tungsten::ListProperty *Tungsten::PropertySheet::addListProperty(std::vectorstd::string,std::allocator<_Ty>,std::string,std::string,std::function<bool (const std::string &,int)>)' : overloaded member function not found in 'Tungsten::PropertySheet' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 74 1 editor
Error 161 error C2597: illegal reference to non-static member 'Tungsten::PropertySheet::_parent' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 75 1 editor
Error 162 error C2671: 'Tungsten::PropertySheet::addListProperty' : static member functions do not have 'this' pointers C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 75 1 editor
Error 163 error C2228: left of '.emplace_back' must have class/struct/union C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 77 1 editor
Error 164 error C2511: 'Tungsten::ListProperty *Tungsten::PropertySheet::addListProperty(std::vectorstd::string,std::allocator<_Ty>,int,std::string,std::function<bool (const std::string &,int)>)' : overloaded member function not found in 'Tungsten::PropertySheet' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 83 1 editor
Error 165 error C2597: illegal reference to non-static member 'Tungsten::PropertySheet::_parent' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 84 1 editor
Error 166 error C2671: 'Tungsten::PropertySheet::addListProperty' : static member functions do not have 'this' pointers C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 84 1 editor
Error 167 error C2228: left of '.emplace_back' must have class/struct/union C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 86 1 editor
Error 168 error C2511: 'Tungsten::TextureProperty *Tungsten::PropertySheet::addTextureProperty(std::shared_ptrTungsten::Texture,std::string,bool,Tungsten::Scene *,Tungsten::TexelConversion,std::function<bool (std::shared_ptrTungsten::Texture &)>)' : overloaded member function not found in 'Tungsten::PropertySheet' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 93 1 editor
Error 169 error C2597: illegal reference to non-static member 'Tungsten::PropertySheet::_parent' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 94 1 editor
Error 170 error C2671: 'Tungsten::PropertySheet::addTextureProperty' : static member functions do not have 'this' pointers C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 94 1 editor
Error 171 error C2228: left of '.emplace_back' must have class/struct/union C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 96 1 editor
Error 172 error C2511: 'Tungsten::BsdfProperty *Tungsten::PropertySheet::addBsdfProperty(std::shared_ptrTungsten::Bsdf,std::string,bool,Tungsten::Scene *,std::function<bool (std::shared_ptrTungsten::Bsdf &)>)' : overloaded member function not found in 'Tungsten::PropertySheet' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 102 1 editor
Error 173 error C2597: illegal reference to non-static member 'Tungsten::PropertySheet::_parent' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 103 1 editor
Error 174 error C2671: 'Tungsten::PropertySheet::addBsdfProperty' : static member functions do not have 'this' pointers C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 103 1 editor
Error 175 error C2228: left of '.emplace_back' must have class/struct/union C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 104 1 editor
Error 176 error C2511: 'Tungsten::MediumProperty *Tungsten::PropertySheet::addMediumProperty(std::shared_ptrTungsten::Medium,std::string,Tungsten::Scene *,std::function<bool (std::shared_ptrTungsten::Medium &)>)' : overloaded member function not found in 'Tungsten::PropertySheet' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 110 1 editor
Error 177 error C2597: illegal reference to non-static member 'Tungsten::PropertySheet::_parent' C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 111 1 editor
Error 178 error C2671: 'Tungsten::PropertySheet::addMediumProperty' : static member functions do not have 'this' pointers C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 111 1 editor
Error 179 error C2228: left of '.emplace_back' must have class/struct/union C:\Users\jpetrovic\Downloads\tungsten-master\tungsten-master\src\editor\properties\PropertySheet.cpp 112 1 editor
Error 183 error C2864: 'Tungsten::PreviewWindow::Fov' : a static data member with an in-class initializer must have non-volatile const integral type c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.hpp 57 1 editor
Error 184 error C2864: 'Tungsten::PreviewWindow::Near' : a static data member with an in-class initializer must have non-volatile const integral type c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.hpp 58 1 editor
Error 185 error C2864: 'Tungsten::PreviewWindow::Far' : a static data member with an in-class initializer must have non-volatile const integral type c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.hpp 59 1 editor
Error 186 error C2797: 'Tungsten::PreviewWindow::DefaultPriorities': list initialization inside member initializer list or non-static data member initializer is not implemented c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.hpp 67 1 editor
Error 191 error C2864: 'Tungsten::PreviewWindow::Fov' : a static data member with an in-class initializer must have non-volatile const integral type c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.hpp 57 1 editor
Error 192 error C2864: 'Tungsten::PreviewWindow::Near' : a static data member with an in-class initializer must have non-volatile const integral type c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.hpp 58 1 editor
Error 193 error C2864: 'Tungsten::PreviewWindow::Far' : a static data member with an in-class initializer must have non-volatile const integral type c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.hpp 59 1 editor
Error 194 error C2797: 'Tungsten::PreviewWindow::DefaultPriorities': list initialization inside member initializer list or non-static data member initializer is not implemented c:\users\jpetrovic\downloads\tungsten-master\tungsten-master\src\editor\PreviewWindow.hpp 67 1 editor

Is it possible to change the name of "editor"?

On Linux, git sometimes calls command editor(vim in my OS) to show some information. If I add Tungsten's binaries directory to PATH, Tungsten's editor will be called instead.

Maybe this name is too common.

Relative mean square error

Hi Benedikt,

I was looking through the code for hdrmanip as it is a tool I often use in my research. I noticed something odd with the way you compute the relative MSE. Line 147 of the code reads:

rmse += sqr(imgA[i*3 + c] - imgB[i*3 + c])/(imgA[i*3 + c] + 1e-3f);

Shouldn't you square the denumerator too? At least that's what is proposed by Rousselle et al. (2011) if I'm not mistaken. Is there something I'm missing here? If this is indeed an error, did you use this code for Figure 5 of RJMLT, or was it fixed but never pushed?

Cheers,
Joey

Editor randomly crashes on macOS

The editor will crash sometimes when I click on objects, names of primitives or drag the vertical split line. It's not 100% happening, but It will happen within a few clicks, usually upon draging the split line.

I've tried both on release version and debug version of v0.2.2.

Error message:

Segmentation fault: 11

backtrace:

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
    frame #0: 0x00007fff45ae8483 CoreFoundation`_CFRelease + 1076
    frame #1: 0x00007fff459b8504 CoreFoundation`__CFBasicHashDrain + 359
    frame #2: 0x00007fff45ae813e CoreFoundation`_CFRelease + 239
    frame #3: 0x00007fff484ba5d5 IOSurface`IOSurfaceClientRelease + 219
    frame #4: 0x00007fff484ba4b0 IOSurface`-[IOSurface dealloc] + 44
    frame #5: 0x00007fff509a05bc QuartzCore`CA::release_objects(X::List<void const*>*) + 26
    frame #6: 0x00007fff509982d1 QuartzCore`CA::Transaction::commit() + 1161
    frame #7: 0x00007fff43039305 AppKit`__65+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayRefresh]_block_invoke + 274
    frame #8: 0x00007fff45a429cd CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
    frame #9: 0x00007fff45a42902 CoreFoundation`__CFRunLoopDoObservers + 452
    frame #10: 0x00007fff459e4429 CoreFoundation`__CFRunLoopRun + 1166
    frame #11: 0x00007fff459e3d48 CoreFoundation`CFRunLoopRunSpecific + 463
    frame #12: 0x00007fff44c7aab5 HIToolbox`RunCurrentEventLoopInMode + 293
    frame #13: 0x00007fff44c7a6f4 HIToolbox`ReceiveNextEventCommon + 371
    frame #14: 0x00007fff44c7a568 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 64
    frame #15: 0x00007fff42f35363 AppKit`_DPSNextEvent + 997
    frame #16: 0x00007fff42f34102 AppKit`-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1362
    frame #17: 0x00007fff42f2e165 AppKit`-[NSApplication run] + 699
    frame #18: 0x000000011241fc85 libqcocoa.dylib`___lldb_unnamed_symbol647$$libqcocoa.dylib + 2757
    frame #19: 0x0000000104d2336f QtCore`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 431
    frame #20: 0x0000000104d28582 QtCore`QCoreApplication::exec() + 130
  * frame #21: 0x0000000100067fef editor`main(argc=1, argv=0x00007ffeefbff698) at main.cpp:56:16
    frame #22: 0x00007fff72c25ed9 libdyld.dylib`start + 1
    frame #23: 0x00007fff72c25ed9 libdyld.dylib`start + 1

Environment

$ /Library/Developer/CommandLineTools/usr/bin/cc --version
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

macOS build instructions

If anyone is trying to build this one macOS:

brew install eigen openexr libbtbb  
# possibly others, check what is missing at the end of CMake

brew uninstall openvdb
# it doesn't build with openvdb, probably this can be switched off in CMake with a switch

export CMAKE_PREFIX_PATH=/Users/../Qt/5.10.1/clang_64

rm -rf build
mkdir build
cd build

mkdir release
cd release
cmake -DCMAKE_BUILD_TYPE=Release ../..

make -j8

I don't know what OpenVDB is used for, but making sure it's not included makes it compile without errors.

the default far plane, near plane, and clip coordinates

Hello! I'm still learning computer graphics. I want to try reprojection in the TAA algorithm:

where p is the pixel's homogeneous coordinate:

Therefore, I need to get the view matrix and projection matrix. The up, look at, and camera position can be found in JSON, but I still don't know the far plane and near plane to compute the projection matrix. I noticed that the far plane and near plane in the PreviewWindow.hpp are 100 and 0.01. Are the values the same inside the renderer?

Also, I'm not sure about the component z of the coordinate. I've made tungsten outputted depth buffers, but I don't know how to normalize them. Is the range of z (-1, 1), or (0, 1)? I guess z is somewhat like depth_buffer / (far - near). Am I correct?

Thanks.

How to get EXR image.

Hi.
I am newly using tungsten renderer.
When I tested some scenes, I just got png images and option for hdr output file doesn't work.
How can I get HDR images after rendering?

Thanks.

Excessive CPU usage in the editor when selecting objects on Linux

The editor (both debug and release builds) appears to use an excessive amount of CPU time when selecting an object on Linux. As long as the object is selected, my CPU usage spikes up to 75%, which is equivalent to 3 of my logical cores maxing out.

Here's a video demonstrating the issue: 1.7 MB H.264 MP4

Initially I thought this might be related to QTBUG-45959, but setting QSG_RENDER_LOOP=basic did not help so the two are unlikely to be related, unless Optimus breaks more than just threaded rendering.

Further details about the test system:

  • nvidia GT 840M
  • nvidia driver version 352.21
  • Optimus through official proprietary nvidia driver (no bumblebee etc.)
  • qt 5.4.2

EDIT: To clarify since someone pointed this out, I have ksysguard set to divide CPU usage by number of CPUs, because usage numbers above 100% are a ridiculous and indefensible. Thus, 100% is "all cores are fully utilised", not "one core is fully utilised". This is the same way Windows Task Manager does it.

error "FMA instruction set not enabled"

I issue the make command

./setup_builds.sh 
cd build/release
make

throws out this error

...
 from /home/lee/playground/tungsten/src/core/renderer/TraceableScene.hpp:7,
                 from /home/lee/playground/tungsten/src/core/integrators/PathTraceIntegrator.hpp:14,
                 from /home/lee/playground/tungsten/src/core/integrators/PathTraceIntegrator.cpp:1:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/fmaintrin.h:32:3: error: #error "FMA instruction set not enabled"
 # error "FMA instruction set not enabled"
   ^
make[2]: *** [CMakeFiles/core.dir/src/core/integrators/PathTraceIntegrator.cpp.o] Error 1
make[1]: *** [CMakeFiles/core.dir/all] Error 2
make: *** [all] Error 2

How to cite this renderer?

Hi! Thank you for this great renderer! Since I've done some researches based on this repo and I've been unable to find a way to cite this repo, I wonder whether there is a BibTeX entry for this renderer, or shall I cite this repo in some other ways?

Debug/core.lib

Hi!
I'm trying to build the project with Visual Studio 2013 and a recent CMake version but I have some errors. The first one is that the function in ImageIO.cpp line 457 is not recognised: "Attempting to reference a deleted function". Then I have 7 similar errors, all related to Debug/core.lib saying that the file doesn't exist for hdrmanip, obj2json, scenemanip, json2xml, tungsten, tungsten_server and editor projects. How can I solve this? Many thanks in advance

build error core.lib

MSVC 18.0.40629.0

error 184 error C2280: “std::unique_ptr<Tungsten::uint8 [],void (__cdecl *)(void )>::unique_ptr<Tungsten::uint8,Tungsten::ImageIO::loadJpg::<lambda_41d26953b87997855605709ea805a7f3>>(_Ptr2,_Dx2)”: Attempt to refer to deleted functions C:\Users\X\Desktop\tungsten-master\src\core\io\ImageIO.cpp 459 1 core

Variance computation

I saw the variance computation code.

scaled[i] = _variance[i]/T(_sampleCount[i]*max(uint32(1), _sampleCount[i] - 1));

The variance is divided by spp additionally. Is that intentional considering the variable name is scaled?

Far slower than the binary version

Hi,
Thank you for your excellent job! I built the tungsten by myself, but found out that it is running much slower than the binary version shipped by KPCN project.
I wonder was there any settings I didn't make correctly?
And also why it doesn't output the auxiliary features EXRs even if I specified that in the scene description Json file. ( But the binary version behaves correctly with the same scene json.)

Thank you very much.

Can't run editor

All dependencies were satisfied and ompilation completed perfectly.

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking for C++11 compiler
-- Checking for C++11 compiler - available
-- Detected: Vendor ID 'GenuineIntel'   CPU Family '6'  CPU Model '58'  CPU Flags  'fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts'
-- Detected CPU: ivy-bridge
-- Performing Test check_cxx_compiler_flag__march_core_avx_i
-- Performing Test check_cxx_compiler_flag__march_core_avx_i - Success
-- Performing Test check_cxx_compiler_flag__msse2
-- Performing Test check_cxx_compiler_flag__msse2 - Success
-- Performing Test check_cxx_compiler_flag__msse3
-- Performing Test check_cxx_compiler_flag__msse3 - Success
-- Looking for pmmintrin.h
-- Looking for pmmintrin.h - found
-- Performing Test check_cxx_compiler_flag__mssse3
-- Performing Test check_cxx_compiler_flag__mssse3 - Success
-- Looking for tmmintrin.h
-- Looking for tmmintrin.h - found
-- Performing Test check_cxx_compiler_flag__msse4_1
-- Performing Test check_cxx_compiler_flag__msse4_1 - Success
-- Looking for smmintrin.h
-- Looking for smmintrin.h - found
-- Performing Test check_cxx_compiler_flag__msse4_2
-- Performing Test check_cxx_compiler_flag__msse4_2 - Success
-- Performing Test check_cxx_compiler_flag__mno_sse4a
-- Performing Test check_cxx_compiler_flag__mno_sse4a - Success
-- Performing Test check_cxx_compiler_flag__mno_avx
-- Performing Test check_cxx_compiler_flag__mno_avx - Success
-- Performing Test check_cxx_compiler_flag__mno_xop
-- Performing Test check_cxx_compiler_flag__mno_xop - Success
-- Performing Test check_cxx_compiler_flag__mno_fma4
-- Performing Test check_cxx_compiler_flag__mno_fma4 - Success
-- Performing Test check_cxx_compiler_flag__mno_avx2
-- Performing Test check_cxx_compiler_flag__mno_avx2 - Success
-- Compiling with SSE4.2 support
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8") 
-- Found OpenEXR: /usr/include/OpenEXR  
-- OpenEXR detected. Building with .exr support
-- Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so  
-- JPEG library detected.
-- Found OpenVDB: /usr/include  
-- Found TBB: /usr/include  
-- OpenVDB detected. Building with .vdb support
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so  
-- Building editor
-- Configuring done
-- Generating done
-- Build files have been written to: /home/lin/program/CG/tungsten/build/debug

But when I run editor, it shows this:

➜  release git:(master) ./editor 
QApplication: invalid style override passed, ignoring it.
---------------------------
---------------------------
Unable to compile shader:
0:1(1): error: syntax error, unexpected $end

➜  release git:(master) 

My OS is Linux Mint 18.1.

No optimization for Intel Core i7-7700 CPU

CMake Warning at cmake/OptimizeForArchitecture.cmake:117 (message):
  Your CPU (family 6, model 158) is not known.  Auto-detection of
  optimization flags failed and will use the 65nm Core 2 CPU settings.

The optimization file tungsten/cmake/OptimizeForArchitecture.cmake need to be updated.
The newest version: OptimizeForArchitecture.cmake

Acturally I have tried to update the file but encountered some problems...

About render elments .

Hello,

Recently, I used Tungsten to render and output the render elements('normal','albedo','visibility','depth'). I also used VRay to render same scene and output the render elements(here is the list of VRay supported render elements: https://docs.chaosgroup.com/display/VRAY3MAX/List+of+Supported+Render+Elements). But I found that there is differet between Tungsten's render elments and VRay's elments. For instance , Tungsten has ‘albedo’,but VRay has not 'albedo'.
So I want to ask that is there any connection between Tungsten's render elments and VRay's elments? In other words, can VRay's render elments be merged intoTungsten's render elments?

VS2013 Issues

tungsten\src\thirdparty\embree\geometry\virtual_object_intersector8.h(33): error C2719: 'valid': formal parameter with __declspec(align('32')) won't be aligned

Issue with Embree. Missing a define or a flag somewhere?


https://github.com/tunabrain/tungsten/blob/facbede6ba6dbdab3c45a59bd4f381df1ae2154e/src/thirdparty/embree/simd/avx.h

is also an issue because it can't find fmaintrin.h


2>c:\engineering\opensource\tungsten\src\core\sse\SimdFloat.hpp(248): error C2144: syntax error : 'float' should be preceded by ';'
2>c:\engineering\opensource\tungsten\src\core\sse\SimdFloat.hpp(248): error C3861: 'alignas': identifier not found

http://msdn.microsoft.com/en-us/library/hh567368.aspx alignas is not implemented in VS according to that

Motion Blur

Looking around the repo, it looks like there is motion blur support in embree, but tungsten doesn't support motion blur itself, right? Is that planned?

Wonderful renderer, thank you for sharing it!

boxFilter boundary conditions bug?

Hello, you said there is a bug in this nfor denoiser implementation. Could it be the boundary conditions in boxFilter()? The filtering happens only in the tile itself, which causes discontinues in the smoothing at the tile boundaries.

Implementation of cylinder primitive?

Hi Mr. Bitterli,

I was introduced to your renderer by a friend, and was impressed by the result and performance. As I'm trying to render some molecular pictures, a "cylinder" geometry would be very helpful for showing chemical bonds. Without any knowledge of computer graphics, I read the implementation of other primitives in src/core/primitives and tried to implement the cylinder primitive by mimicking them. My first draft was able to compile, but the cylinder is not showing up in the rendered results, except some reflections on a sphere. I have very little understanding of how the rendering works, so many of the functions may be done terribly wrong. If you have a little time, could you please take a look at it? (https://github.com/yudongqiu/tungsten/blob/master/src/core/primitives/Cylinder.cpp)

Any hint on my mistakes, or references that could help me understanding it, would be greatly appreciated. It would be also great that if you think writing it from scratch is better than looking at mine. 😄 Thanks a lot!

Best,

Yudong Qiu

Segfault when overwriting files

Try setting "overwrite_output_files": true

I get this traceback:

#0  0x00007ffff77715b9 in std::string::assign(std::string const&) () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/libstdc++.so.6
#1  0x00000000006422eb in Tungsten::Path::operator= (this=0x18) at /storage/home/achin/devel/tungsten/src/core/io/Path.hpp:15
#2  0x0000000000678279 in Tungsten::FileUtils::openOutputStream (p=...) at /storage/home/achin/devel/tungsten/src/core/io/FileUtils.cpp:419
#3  0x0000000000730fbb in Tungsten::ImageIO::savePng (path=..., 

It looks like auto iter = _metaData.find(out.get()); seems to be returning something it shouldn't.

Tungsten server no longer working

The server portion of tungsten is no longer working with the new release. The regular ex3cutable does but when trying to run the server it crashes.

Regarding the final project report on the CGL competition web page

From your readme, you mentioned that there is a final project report on the project on the competition page but it is not accessible (CGL server gives a 404 error). If possible, could you please share the local copy of that final project report. Right now it is hard to figure out how to go about this project as there is no documentation.

build without OPENEXR

in ImageIO.cpp
OPENEXR_AVAILABLE always 1 regardless of cmake.
the define should be removed ...

#define OPENEXR_AVAILABLE 1

#if OPENEXR_AVAILABLE
#include <ImfChannelList.h>
#include <ImfOutputFile.h>
#include <ImfInputFile.h>
#include <half.h>
#endif

cannot find core.lib

hi
this is the error show when i try to build with vs2013
cannot find core.lib

editor.exe demands qt platform on windows

A message box containing
"This application failed to start because it could not find or load the Qt platform plugin „windows“
is shown.
As some answers on other forums suggested I created a "platforms" folder and moved all the Qt*.dll files there. Then this message box disappears, but instead another one is shown containing:
"editor.exe cannot find entry point _ZN10QArrayData10deallocateEPS_yy" in editor.exe"

system: Win10PRO 64bit v1607 (Anniversary Update)

Tungsten.exe crash when starting

Tungsten.exe crash when starting - all time.

Maybe this help.
Exception thrown at 0x00000000005C543E in tungsten.exe: 0xC000001D: Illegal Instruction.
Unhandled exception at 0x00000000005C543E in tungsten.exe: 0xC000001D: Illegal Instruction.

00000000005C543E shrx rax,qword ptr [rcx+10h],rax

Windows 7 x64

Compile problem JsonObject.hpp

I generate the project using cmake 3.4.3, compiling with vc 2013 Professional.

Problem is when HairBcsdf::toJson tries to create a JsonObject

Here is the error output
HairBcsdf.cpp
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\type_traits(1520): error C2440: 'return' : cannot convert from 'const char [5]' to 'const char (&&)[5]'
You cannot bind an lvalue to an rvalue reference
C:\Users\stubob95\Documents\tungsten-master\src\core\io/JsonObject.hpp(41) : see reference to function template instantiation 'const char (&&std::move<const char(&)[5]>(_Ty) throw())[5]' being compiled
with
[
_Ty=const char (&)[5]
]
C:\Users\stubob95\Documents\tungsten-master\src\core\io/JsonObject.hpp(30) : see reference to function template instantiation 'void Tungsten::JsonObject::add<0x05,const char(&)[5],const char(&)[12],const float&,const char(&)[10],const float&>(const char (&)[5],T,const char (&)[12],const float &,const char (&)[10],const float &)' being compiled
with
[
T=const char (&)[5]
]
C:\Users\stubob95\Documents\tungsten-master\src\core\bcsdfs\HairBcsdf.cpp(172) : see reference to function template instantiation 'Tungsten::JsonObject::JsonObject<const char(&)[5],const char(&)[5],const char(&)[12],const float&,const char(&)[10],const float&>(rapidjson::Value,Tungsten::JsonObject::Allocator &,const char (&)[5],const char (&)[5],const char (&)[12],const float &,const char (&)[10],const float &)' being compiled

Am I missing a compiler setting or something?

Linker error on Linux with gcc 7.2

[ 80%] Linking CXX static library libcore.a
[ 80%] Built target core
Scanning dependencies of target scenemanip
Scanning dependencies of target json2xml
Scanning dependencies of target hdrmanip
Scanning dependencies of target obj2json
[ 81%] Building CXX object CMakeFiles/scenemanip.dir/src/scenemanip/scenemanip.cpp.o
[ 82%] Building CXX object CMakeFiles/hdrmanip.dir/src/hdrmanip/hdrmanip.cpp.o
[ 82%] Building CXX object CMakeFiles/obj2json.dir/src/obj2json/obj2json.cpp.o
[ 82%] Building CXX object CMakeFiles/json2xml.dir/src/json2xml/json2xml.cpp.o
[ 82%] Linking CXX executable obj2json
libcore.a(GridFactory.cpp.o): In function `openvdb::v4_0_2::math::AffineMap::postRotate(double, openvdb::v4_0_2::math::Axis) const':
GridFactory.cpp:(.text._ZNK7openvdb6v4_0_24math9AffineMap10postRotateEdNS1_4AxisE[_ZNK7openvdb6v4_0_24math9AffineMap10postRotateEdNS1_4AxisE]+0x7e): undefined reference to `openvdb::v4_0_2::math::simplify(std::shared_ptr<openvdb::v4_0_2::math::AffineMap>)'
libcore.a(GridFactory.cpp.o): In function `openvdb::v4_0_2::math::ScaleTranslateMap::postRotate(double, openvdb::v4_0_2::math::Axis) const':
GridFactory.cpp:(.text._ZNK7openvdb6v4_0_24math17ScaleTranslateMap10postRotateEdNS1_4AxisE[_ZNK7openvdb6v4_0_24math17ScaleTranslateMap10postRotateEdNS1_4AxisE]+0x7e): undefined reference to `openvdb::v4_0_2::math::simplify(std::shared_ptr<openvdb::v4_0_2::math::AffineMap>)'
libcore.a(GridFactory.cpp.o): In function `openvdb::v4_0_2::math::TranslationMap::postRotate(double, openvdb::v4_0_2::math::Axis) const':
GridFactory.cpp:(.text._ZNK7openvdb6v4_0_24math14TranslationMap10postRotateEdNS1_4AxisE[_ZNK7openvdb6v4_0_24math14TranslationMap10postRotateEdNS1_4AxisE]+0x7e): undefined reference to `openvdb::v4_0_2::math::simplify(std::shared_ptr<openvdb::v4_0_2::math::AffineMap>)'
libcore.a(GridFactory.cpp.o): In function `openvdb::v4_0_2::math::ScaleMap::postRotate(double, openvdb::v4_0_2::math::Axis) const':
GridFactory.cpp:(.text._ZNK7openvdb6v4_0_24math8ScaleMap10postRotateEdNS1_4AxisE[_ZNK7openvdb6v4_0_24math8ScaleMap10postRotateEdNS1_4AxisE]+0x7e): undefined reference to `openvdb::v4_0_2::math::simplify(std::shared_ptr<openvdb::v4_0_2::math::AffineMap>)'
libcore.a(GridFactory.cpp.o): In function `openvdb::v4_0_2::math::AffineMap::preShear(double, openvdb::v4_0_2::math::Axis, openvdb::v4_0_2::math::Axis) const':
GridFactory.cpp:(.text._ZNK7openvdb6v4_0_24math9AffineMap8preShearEdNS1_4AxisES3_[_ZNK7openvdb6v4_0_24math9AffineMap8preShearEdNS1_4AxisES3_]+0xce): undefined reference to `openvdb::v4_0_2::math::simplify(std::shared_ptr<openvdb::v4_0_2::math::AffineMap>)'
libcore.a(GridFactory.cpp.o):GridFactory.cpp:(.text._ZNK7openvdb6v4_0_24math17ScaleTranslateMap8preShearEdNS1_4AxisES3_[_ZNK7openvdb6v4_0_24math17ScaleTranslateMap8preShearEdNS1_4AxisES3_]+0xce): more undefined references to `openvdb::v4_0_2::math::simplify(std::shared_ptr<openvdb::v4_0_2::math::AffineMap>)' follow
libcore.a(VdbGrid.cpp.o): In function `openvdb::v4_0_2::GridBase::GridBase(openvdb::v4_0_2::GridBase const&)':
VdbGrid.cpp:(.text._ZN7openvdb6v4_0_28GridBaseC2ERKS1_[_ZN7openvdb6v4_0_28GridBaseC5ERKS1_]+0x57): undefined reference to `openvdb::v4_0_2::math::Transform::Transform(std::shared_ptr<openvdb::v4_0_2::math::MapBase> const&)'
libcore.a(VdbGrid.cpp.o): In function `openvdb::v4_0_2::tree::LeafBuffer<openvdb::v4_0_2::math::Vec2<float>, 3u>::doLoad() const':
VdbGrid.cpp:(.text._ZNK7openvdb6v4_0_24tree10LeafBufferINS0_4math4Vec2IfEELj3EE6doLoadEv[_ZNK7openvdb6v4_0_24tree10LeafBufferINS0_4math4Vec2IfEELj3EE6doLoadEv]+0x13c): undefined reference to `openvdb::v4_0_2::io::setStreamMetadataPtr(std::ios_base&, std::shared_ptr<openvdb::v4_0_2::io::StreamMetadata>&, bool)'
libcore.a(VdbGrid.cpp.o): In function `openvdb::v4_0_2::tree::LeafBuffer<float, 3u>::doLoad() const':
VdbGrid.cpp:(.text._ZNK7openvdb6v4_0_24tree10LeafBufferIfLj3EE6doLoadEv[_ZNK7openvdb6v4_0_24tree10LeafBufferIfLj3EE6doLoadEv]+0x13c): undefined reference to `openvdb::v4_0_2::io::setStreamMetadataPtr(std::ios_base&, std::shared_ptr<openvdb::v4_0_2::io::StreamMetadata>&, bool)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/obj2json.dir/build.make:111: obj2json] Error 1
make[1]: *** [CMakeFiles/Makefile2:197: CMakeFiles/obj2json.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 82%] Linking CXX executable hdrmanip
[ 82%] Built target hdrmanip
[ 82%] Linking CXX executable scenemanip
libcore.a(GridFactory.cpp.o): In function `openvdb::v4_0_2::math::AffineMap::postRotate(double, openvdb::v4_0_2::math::Axis) const':
GridFactory.cpp:(.text._ZNK7openvdb6v4_0_24math9AffineMap10postRotateEdNS1_4AxisE[_ZNK7openvdb6v4_0_24math9AffineMap10postRotateEdNS1_4AxisE]+0x7e): undefined reference to `openvdb::v4_0_2::math::simplify(std::shared_ptr<openvdb::v4_0_2::math::AffineMap>)'
libcore.a(GridFactory.cpp.o): In function `openvdb::v4_0_2::math::ScaleTranslateMap::postRotate(double, openvdb::v4_0_2::math::Axis) const':
GridFactory.cpp:(.text._ZNK7openvdb6v4_0_24math17ScaleTranslateMap10postRotateEdNS1_4AxisE[_ZNK7openvdb6v4_0_24math17ScaleTranslateMap10postRotateEdNS1_4AxisE]+0x7e): undefined reference to `openvdb::v4_0_2::math::simplify(std::shared_ptr<openvdb::v4_0_2::math::AffineMap>)'
libcore.a(GridFactory.cpp.o): In function `openvdb::v4_0_2::math::TranslationMap::postRotate(double, openvdb::v4_0_2::math::Axis) const':
GridFactory.cpp:(.text._ZNK7openvdb6v4_0_24math14TranslationMap10postRotateEdNS1_4AxisE[_ZNK7openvdb6v4_0_24math14TranslationMap10postRotateEdNS1_4AxisE]+0x7e): undefined reference to `openvdb::v4_0_2::math::simplify(std::shared_ptr<openvdb::v4_0_2::math::AffineMap>)'
libcore.a(GridFactory.cpp.o): In function `openvdb::v4_0_2::math::ScaleMap::postRotate(double, openvdb::v4_0_2::math::Axis) const':
GridFactory.cpp:(.text._ZNK7openvdb6v4_0_24math8ScaleMap10postRotateEdNS1_4AxisE[_ZNK7openvdb6v4_0_24math8ScaleMap10postRotateEdNS1_4AxisE]+0x7e): undefined reference to `openvdb::v4_0_2::math::simplify(std::shared_ptr<openvdb::v4_0_2::math::AffineMap>)'
libcore.a(GridFactory.cpp.o): In function `openvdb::v4_0_2::math::AffineMap::preShear(double, openvdb::v4_0_2::math::Axis, openvdb::v4_0_2::math::Axis) const':
GridFactory.cpp:(.text._ZNK7openvdb6v4_0_24math9AffineMap8preShearEdNS1_4AxisES3_[_ZNK7openvdb6v4_0_24math9AffineMap8preShearEdNS1_4AxisES3_]+0xce): undefined reference to `openvdb::v4_0_2::math::simplify(std::shared_ptr<openvdb::v4_0_2::math::AffineMap>)'
libcore.a(GridFactory.cpp.o):GridFactory.cpp:(.text._ZNK7openvdb6v4_0_24math17ScaleTranslateMap8preShearEdNS1_4AxisES3_[_ZNK7openvdb6v4_0_24math17ScaleTranslateMap8preShearEdNS1_4AxisES3_]+0xce): more undefined references to `openvdb::v4_0_2::math::simplify(std::shared_ptr<openvdb::v4_0_2::math::AffineMap>)' follow
libcore.a(VdbGrid.cpp.o): In function `openvdb::v4_0_2::GridBase::GridBase(openvdb::v4_0_2::GridBase const&)':
VdbGrid.cpp:(.text._ZN7openvdb6v4_0_28GridBaseC2ERKS1_[_ZN7openvdb6v4_0_28GridBaseC5ERKS1_]+0x57): undefined reference to `openvdb::v4_0_2::math::Transform::Transform(std::shared_ptr<openvdb::v4_0_2::math::MapBase> const&)'
libcore.a(VdbGrid.cpp.o): In function `openvdb::v4_0_2::tree::LeafBuffer<openvdb::v4_0_2::math::Vec2<float>, 3u>::doLoad() const':
VdbGrid.cpp:(.text._ZNK7openvdb6v4_0_24tree10LeafBufferINS0_4math4Vec2IfEELj3EE6doLoadEv[_ZNK7openvdb6v4_0_24tree10LeafBufferINS0_4math4Vec2IfEELj3EE6doLoadEv]+0x13c): undefined reference to `openvdb::v4_0_2::io::setStreamMetadataPtr(std::ios_base&, std::shared_ptr<openvdb::v4_0_2::io::StreamMetadata>&, bool)'
libcore.a(VdbGrid.cpp.o): In function `openvdb::v4_0_2::tree::LeafBuffer<float, 3u>::doLoad() const':
VdbGrid.cpp:(.text._ZNK7openvdb6v4_0_24tree10LeafBufferIfLj3EE6doLoadEv[_ZNK7openvdb6v4_0_24tree10LeafBufferIfLj3EE6doLoadEv]+0x13c): undefined reference to `openvdb::v4_0_2::io::setStreamMetadataPtr(std::ios_base&, std::shared_ptr<openvdb::v4_0_2::io::StreamMetadata>&, bool)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/scenemanip.dir/build.make:111: scenemanip] Error 1
make[1]: *** [CMakeFiles/Makefile2:277: CMakeFiles/scenemanip.dir/all] Error 2
[ 83%] Linking CXX executable json2xml
libcore.a(GridFactory.cpp.o): In function `openvdb::v4_0_2::math::AffineMap::postRotate(double, openvdb::v4_0_2::math::Axis) const':
GridFactory.cpp:(.text._ZNK7openvdb6v4_0_24math9AffineMap10postRotateEdNS1_4AxisE[_ZNK7openvdb6v4_0_24math9AffineMap10postRotateEdNS1_4AxisE]+0x7e): undefined reference to `openvdb::v4_0_2::math::simplify(std::shared_ptr<openvdb::v4_0_2::math::AffineMap>)'
libcore.a(GridFactory.cpp.o): In function `openvdb::v4_0_2::math::ScaleTranslateMap::postRotate(double, openvdb::v4_0_2::math::Axis) const':
GridFactory.cpp:(.text._ZNK7openvdb6v4_0_24math17ScaleTranslateMap10postRotateEdNS1_4AxisE[_ZNK7openvdb6v4_0_24math17ScaleTranslateMap10postRotateEdNS1_4AxisE]+0x7e): undefined reference to `openvdb::v4_0_2::math::simplify(std::shared_ptr<openvdb::v4_0_2::math::AffineMap>)'
libcore.a(GridFactory.cpp.o): In function `openvdb::v4_0_2::math::TranslationMap::postRotate(double, openvdb::v4_0_2::math::Axis) const':
GridFactory.cpp:(.text._ZNK7openvdb6v4_0_24math14TranslationMap10postRotateEdNS1_4AxisE[_ZNK7openvdb6v4_0_24math14TranslationMap10postRotateEdNS1_4AxisE]+0x7e): undefined reference to `openvdb::v4_0_2::math::simplify(std::shared_ptr<openvdb::v4_0_2::math::AffineMap>)'
libcore.a(GridFactory.cpp.o): In function `openvdb::v4_0_2::math::ScaleMap::postRotate(double, openvdb::v4_0_2::math::Axis) const':
GridFactory.cpp:(.text._ZNK7openvdb6v4_0_24math8ScaleMap10postRotateEdNS1_4AxisE[_ZNK7openvdb6v4_0_24math8ScaleMap10postRotateEdNS1_4AxisE]+0x7e): undefined reference to `openvdb::v4_0_2::math::simplify(std::shared_ptr<openvdb::v4_0_2::math::AffineMap>)'
libcore.a(GridFactory.cpp.o): In function `openvdb::v4_0_2::math::AffineMap::preShear(double, openvdb::v4_0_2::math::Axis, openvdb::v4_0_2::math::Axis) const':
GridFactory.cpp:(.text._ZNK7openvdb6v4_0_24math9AffineMap8preShearEdNS1_4AxisES3_[_ZNK7openvdb6v4_0_24math9AffineMap8preShearEdNS1_4AxisES3_]+0xce): undefined reference to `openvdb::v4_0_2::math::simplify(std::shared_ptr<openvdb::v4_0_2::math::AffineMap>)'
libcore.a(GridFactory.cpp.o):GridFactory.cpp:(.text._ZNK7openvdb6v4_0_24math17ScaleTranslateMap8preShearEdNS1_4AxisES3_[_ZNK7openvdb6v4_0_24math17ScaleTranslateMap8preShearEdNS1_4AxisES3_]+0xce): more undefined references to `openvdb::v4_0_2::math::simplify(std::shared_ptr<openvdb::v4_0_2::math::AffineMap>)' follow
libcore.a(VdbGrid.cpp.o): In function `openvdb::v4_0_2::GridBase::GridBase(openvdb::v4_0_2::GridBase const&)':
VdbGrid.cpp:(.text._ZN7openvdb6v4_0_28GridBaseC2ERKS1_[_ZN7openvdb6v4_0_28GridBaseC5ERKS1_]+0x57): undefined reference to `openvdb::v4_0_2::math::Transform::Transform(std::shared_ptr<openvdb::v4_0_2::math::MapBase> const&)'
libcore.a(VdbGrid.cpp.o): In function `openvdb::v4_0_2::tree::LeafBuffer<openvdb::v4_0_2::math::Vec2<float>, 3u>::doLoad() const':
VdbGrid.cpp:(.text._ZNK7openvdb6v4_0_24tree10LeafBufferINS0_4math4Vec2IfEELj3EE6doLoadEv[_ZNK7openvdb6v4_0_24tree10LeafBufferINS0_4math4Vec2IfEELj3EE6doLoadEv]+0x13c): undefined reference to `openvdb::v4_0_2::io::setStreamMetadataPtr(std::ios_base&, std::shared_ptr<openvdb::v4_0_2::io::StreamMetadata>&, bool)'
libcore.a(VdbGrid.cpp.o): In function `openvdb::v4_0_2::tree::LeafBuffer<float, 3u>::doLoad() const':
VdbGrid.cpp:(.text._ZNK7openvdb6v4_0_24tree10LeafBufferIfLj3EE6doLoadEv[_ZNK7openvdb6v4_0_24tree10LeafBufferIfLj3EE6doLoadEv]+0x13c): undefined reference to `openvdb::v4_0_2::io::setStreamMetadataPtr(std::ios_base&, std::shared_ptr<openvdb::v4_0_2::io::StreamMetadata>&, bool)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/json2xml.dir/build.make:111: json2xml] Error 1
make[1]: *** [CMakeFiles/Makefile2:74: CMakeFiles/json2xml.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

openvdb is installed:

$ pacman -Ql openvdb | grep libopenvdb.so
openvdb /usr/lib/libopenvdb.so
openvdb /usr/lib/libopenvdb.so.4.0
openvdb /usr/lib/libopenvdb.so.4.0.2

Question about sampleM in HairBCSDF

Hi, Benedikt(@tunabrain)

Thanks for your rendering resources and papers at first, which I used and learned a lot from. I am implementing your Disney Hair/Fur BSDF(BCSDF), and I found some difference between your implementation in tungsten and pbrt's implementation when sampling the longitudinal M.

As mentioned in an open issue of pbrt, your implementation and the paper Importance Sampling for Physically-based Hair Fiber Models both firstly tilt the angle, and then sampling the M. However, pbrt's version is sampling M and then tilting. I think that your implementation and the paper's way are correct.

Please let me know if my opinion is wrong. Thank you very much for your attention.

Zejian Wang

Can't compile with OpenEXR

Hello,
Tungsten won't compile with OpenEXR on Linux Mint 17 64bit. The errors are the following:

/Dev/tungsten/src/core/io/ImageIO.cpp:46:32: error: invalid use of incomplete type ‘class Imf::OStream’
 class ExrOStream : public Imf::OStream
                                ^
In file included from /usr/include/OpenEXR/ImfOutputFile.h:46:0,
                 from /Dev/tungsten/src/core/io/ImageIO.cpp:15:
/usr/include/OpenEXR/ImfHeader.h:63:7: error: forward declaration of ‘class Imf::OStream’
 class OStream;
       ^
/Dev/tungsten/src/core/io/ImageIO.cpp:57:18: error: ‘virtual void Tungsten::ImageIO::ExrOStream::write(const char*, int)’ marked override, but does not override
     virtual void write(const char c[/*n*/], int n) override final
                  ^
/Dev/tungsten/src/core/io/ImageIO.cpp:64:24: error: ‘virtual Imath::Int64 Tungsten::ImageIO::ExrOStream::tellp()’ marked override, but does not override
     virtual Imf::Int64 tellp() override final
                        ^
/Dev/tungsten/src/core/io/ImageIO.cpp:69:18: error: ‘virtual void Tungsten::ImageIO::ExrOStream::seekp(Imath::Int64)’ marked override, but does not override
     virtual void seekp(Imf::Int64 pos) override final
                  ^
/Dev/tungsten/src/core/io/ImageIO.cpp: In constructor ‘Tungsten::ImageIO::ExrOStream::ExrOStream(Tungsten::OutputStreamHandle)’:
/Dev/tungsten/src/core/io/ImageIO.cpp:52:12: error: type ‘Imf::OStream’ is not a direct base of ‘Tungsten::ImageIO::ExrOStream’
     : Imf::OStream("Tungsten Wrapped Output Stream"),
            ^
...

There is more, tell me if you want the complete log. However it works perfectly well when I compile without OpenEXR.
Great software by the way!

About customizing ray directions

Hi Benedit.

I know the path tracing algorithm demands the ωo generated randomly, I want to customize the ωo of the first bounce of each ray though.

I've tried to fathom tungsten's core codes but can't get everything clear, for I just started learning pbrt. I've made PathTracer.cpp load an exr file describing the ωo of each pixel, but I have no idea where I can assign them. I guess the random generation happens in the class PathSampleGenerator, and handleSurface(), estimateDirect(), sampleDirect(), and chooseLight() in the TraceBase.cpp need modifications. Could you teach me a bit?

Thanks. 😊

New features...

Hi Tunabrain.
How about add some new features, like "Path Traced Subsurface Scattering using Anisotropic Phase Functions and Non-Exponential Free Flights", "Spectral and Decomposition Tracking for Rendering Heterogeneous Volumes" and "A Practical Extension to Microfacet Theory for the Modeling of Varying Iridescence".
Thanks.

sudo make uninstall can't find install_manifest.txt of embree

➜  release git:(master) sudo make uninstall
CMake Error at uninstall.cmake:18 (MESSAGE):
  Cannot find install manifest:
  /home/lin/program/CG/tungsten/build/release/src/thirdparty/embree/install_manifest.txt


src/thirdparty/embree/CMakeFiles/uninstall.dir/build.make:57: recipe for target 'src/thirdparty/embree/CMakeFiles/uninstall' failed
make[3]: *** [src/thirdparty/embree/CMakeFiles/uninstall] Error 1
CMakeFiles/Makefile2:540: recipe for target 'src/thirdparty/embree/CMakeFiles/uninstall.dir/all' failed
make[2]: *** [src/thirdparty/embree/CMakeFiles/uninstall.dir/all] Error 2
CMakeFiles/Makefile2:547: recipe for target 'src/thirdparty/embree/CMakeFiles/uninstall.dir/rule' failed
make[1]: *** [src/thirdparty/embree/CMakeFiles/uninstall.dir/rule] Error 2
Makefile:327: recipe for target 'uninstall' failed
make: *** [uninstall] Error 2
➜  release git:(master) 

Cannot Compile Master on Windows

I'm unable to compile master commit 88ea020 on Windows as neither OpenVDB nor OpenEXR are being correctly linked to the executable.

I am using a vcpkg environment with boost, tbb and openexr installed and have compiled openvdb myself. The paths are correctly set in cmake, but I run into unresolved external symbols and could not find header [insert an openexr header] type errors.

I'm not sure how to debug this, so if you have an already compiled version that I can use that'd be great. If not, I'd be grateful for any pointers as to what I should investigate first.

Why do output buffers contain noises?

I rendered a 1spp image and a 64spp image from the scene Country Kitchen and notice that 1spp's output buffers (eg. albedo, normal, and depth) contain some noises. 64spp output buffers are much better, still slightly noisy though.

This confused me a lot, for generating output buffers only requires coordinate transformations in my opinion. Also, other renderers like Baikai seem not to have this problem. Is there any solution I can fix the 1spp output buffers?

albedo_1spp

albedo_64spp

Example Scene

Is there any documentation on re-rendering the example scene shown in Header.jpg ?

Rotation matrix formula inconsistency?

Hi,

I am trying to understand how rotation works in Tungsten. I notice that there are 2 rotation functions in Mat4f, namely rotXYZ() and rotYXZ(). I did not find documentation for the formula so I tried to compose 3 rotation matrices (w.r.t. x, y, and z axes) to reconstruct these 2 functions. However, I found some inconsistency between these 2 functions.

For a certain rotation vector [x_angle, y_angle, z_angle], Assume the rotation matrices are named rot_x(x_angle), rot_y(y_angle) and rot_z(z_angle). Also assume that rot_*.dot(v) is the correct way to rotate a vector v (same convention as in Tungsten). The rotXYZ() function can be reconstructed as rot_z.dot(rot_y).dot(rot_x). However, the rotYXZ() function cannot be reconstructed as rot_z.dot(rot_x).dot(rot_y), as expected, but can be reconstructed by rot_y.transpose().dot(rot_x).dot(rot_z).

Could anyone explain the reason of having 2 different rotation functions that are formulated inconsistently?

Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.