wjakob / nori Goto Github PK
View Code? Open in Web Editor NEWNori: an educational ray tracer
Home Page: https://wjakob.github.io/nori
Nori: an educational ray tracer
Home Page: https://wjakob.github.io/nori
Hello,
I believe the git submodule for OpenEXR is pointing to an old version that doesn't support C++17, due to the following code in the ImfAttribute.cpp
file:
struct NameCompare: std::binary_function <const char *, const char *, bool> // std::binary_function was removed in v17
{
bool
operator () (const char *x, const char *y) const
{
return strcmp (x, y) < 0;
}
};
The master branch of OpenEXR seems to have fixed that issue with this commit.
On macOS 10.14.3 (Mojave) CMake could not find pthread.h
:
-- Looking for pthread.h - not found
CMake Error at /Applications/CMake.app/Contents/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
/Applications/CMake.app/Contents/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/Applications/CMake.app/Contents/share/cmake-3.14/Modules/FindThreads.cmake:191 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
ext/nanogui/ext/glfw/CMakeLists.txt:60 (find_package)
It is due to the directory, where pthread.h
is located on newer versions on MacOs (starting from Mojave). A fix that worked for me is:
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
/src/ttest.cpp:12:10: fatal error: 'hypothesis.h' file not found
#include <hypothesis.h>
/src/warptest.cpp:29:10: fatal error: 'pcg32.h' file not found
#include <pcg32.h>
clang have these library or not?
I am getting the following error when I build nori in VS2015 Professional.
(atomic_support.obj) : error LNK2026: module unsafe for SAFESEH image.
The solution is to edit the atomic_support.asm properties and enable Use safe exception handlers:Yes in Project properties->Microsoft Macroassember->Advanced settings.
I tried downloading an compiling nori on the newest mac Mojave but the compilation failed giving me the following error:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libIlmThread.a(IlmThreadMutex.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libIlmThread.a(IlmThreadSemaphore.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libIlmThread.a(IlmThreadSemaphorePosix.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libIlmThread.a(IlmThread.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libIlmThread.a(IlmThreadMutex.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libIlmThread.a(IlmThreadSemaphore.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libIlmThread.a(IlmThreadSemaphorePosix.cpp.o) has no symbols
I'm unsure what caused this error.
Thank you.
Successfully compile nori.exe
put it to nori\scenes\pa1 folder
run command below:
nori bunny.xml
get error
Fatal error: Error while parsing "bunny.xml": A constructor for class "normals" could not be found!
(at line 8, col 13)
Try other xxx.xml,same error.
All Compile return success, no fail was seen.
What should I do?
Hi, with the updated version of nanogui, you're also using a few C++17 features, e.g. here.
You may want to adjust the ext/CMakeLists.txt
to use C++17 or even C++20 when available.
g++ 11.2.1 will otherwise not compile Nori.
clang++ 11 seems to work fine, though.
Hi,
I was wondering whether its possible to use an NVIDIA-GPU for the renderer or whether it is entirely CPU-multithreading based.
Thanks in advance!
I am able to build and run the nori executable, however it appears that the nano gui will return a segmentation fault once I close the window, and no .exr file is saved. I change the order of saving and nano gui in main.cpp, and it is able to save but the same segmentation fault will pop up when the window is closed. This happens on my Ubuntu 16.06 machine (with discrete GPU), but not on my Windows Machine (integrated GPU). What could potentially be the problem?
Hello,
is there any particular reason why preprocess from the Integrator interface is called in main.cpp but not in ttest.cpp?
Thanks.
Hello.
I built nori successfully in Ubuntu 16.04.
However when I try to run it with example scene, it throws error like this.
Fatal error: Error while parsing "../scenes/pa2/ajax-normals.xml": A constructor for class "normals" could not be found! (at line 8, col 6)
I tried both of scenes in scenes folder and both of them gives me same error.
So I open ajax-normals.xml file and there is only one line has type "normals".
<!-- Render the visible surface normals --> <integrator type="normals"/>
So does it means should I implement integrator for normals?
Or is there anything else that I'm missing?
I tried building nori on my Mac in 2020 and got errors like the following:
/Users/cortis/Save The Machine/Experiments/nori/ext/nanogui/ext/glfw/src/cocoa_init.m:282:1: error: expected identifier or '('
@interface GLFWLayoutListener : NSObject
^
/Users/cortis/Save The Machine/Experiments/nori/ext/nanogui/ext/glfw/src/cocoa_init.m:292:1: error: expected identifier or '('
@EnD
^
....
The problem can be fixed by deleting (or commenting out) lines 75-79 of
nori/ext/nanogui/ext/glfw/src/CMakeLists.txt
Specifically you need to remove these lines for modern macs (Tested with macOS Catalina 10.15.4 and Xcode 11.6):
if (APPLE)
# For some reason, CMake doesn't know about .m
set_source_files_properties(${glfw_SOURCES} PROPERTIES LANGUAGE C)
endif()
Due to an update of the fork of tinyformat which loses previous commits, the submodule cannot successfully be cloned. An update of the submodule resolves the issue.
Hi,
Windows 10
Cmake 3.22.0 rc 2
g++ (Rev2, Built by MSYS2 project) 10.3.0
CmakeError.log
Performing C++ SOURCE FILE Test HAVE_SYSCONF_NPROCESSORS_ONLN failed with the following output:
Change Dir: E:/nori/build/CMakeFiles/CMakeTmp
Run Build Command(s):C:/msys64/mingw64/bin/mingw32-make.exe -f Makefile cmTC_c370a/fast && C:/msys64/mingw64/bin/mingw32-make.exe -f CMakeFiles\cmTC_c370a.dir\build.make CMakeFiles/cmTC_c370a.dir/build
mingw32-make[1]: Entering directory 'E:/nori/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_c370a.dir/src.cxx.obj
C:\msys64\mingw64\bin\g++.exe -DHAVE_SYSCONF_NPROCESSORS_ONLN -std=c++14 -fvisibility=hidden -Wno-deprecated-declarations -Wno-misleading-indentation -Wformat-truncation=0 -Wno-int-in-bool-context -Wimplicit-fallthrough=0 -Wno-unused-result -Wno-deprecated -o CMakeFiles\cmTC_c370a.dir\src.cxx.obj -c E:\nori\build\CMakeFiles\CMakeTmp\src.cxx
E:\nori\build\CMakeFiles\CMakeTmp\src.cxx: In function 'int main()':
E:\nori\build\CMakeFiles\CMakeTmp\src.cxx:5:17: error: '_SC_NPROCESSORS_ONLN' was not declared in this scope; did you mean 'HAVE_SYSCONF_NPROCESSORS_ONLN'?
5 | sysconf(_SC_NPROCESSORS_ONLN);
| ^~~~~~~~~~~~~~~~~~~~
| HAVE_SYSCONF_NPROCESSORS_ONLN
E:\nori\build\CMakeFiles\CMakeTmp\src.cxx:5:9: error: 'sysconf' was not declared in this scope
5 | sysconf(_SC_NPROCESSORS_ONLN);
| ^~~~~~~
mingw32-make[1]: *** [CMakeFiles\cmTC_c370a.dir\build.make:77: CMakeFiles/cmTC_c370a.dir/src.cxx.obj] Error 1
mingw32-make[1]: Leaving directory 'E:/nori/build/CMakeFiles/CMakeTmp'
mingw32-make: *** [Makefile:126: cmTC_c370a/fast] Error 2
Source file was:
#include <unistd.h>
int main()
{
sysconf(_SC_NPROCESSORS_ONLN);
}
Hi,
This is just a minor comment w.r.t the parser of Transform, for rotation, when the axis provided in the XML is not normalized, the produced transformation is actually not a rotation.
Is this the intended behaviour. If not I would suggest normalizing the axis in the parser, here :
parser.cpp#L270C1-L271C1
Best regards, Loic Simon
Issue:
The documentation in mesh.h maybe wrong, or the documentation is correct and the chosen type (MatrixX&, Reference Type) is wrong. References can't be null by the C++ standard, and if they are this may lead to undefined behaviour.
See https://en.cppreference.com/w/cpp/language/reference_initialization and https://en.cppreference.com/w/cpp/language/reference
How to reproduce the bug:
`
const auto m_N(lRec.mesh->getVertexNormals());
std::cout << m_N(0) << std::endl;
return { 0.0f };
`
This crashes with an AccessViolationException@NULL, which can't or shouldn't happen with references, since they can't be null.
Solution:
Change the reference to a ptr type (MatrixX*) or change the MatrixX to be an empty matrix and provide a function to check whether normals exist (bool hasVertexNormals() for instance).
I would like to run my renders automatically in sequence but the execution is blocked until the GUI window is dismissed. I'd like to modify my instance of Nori so that it closes the window and continues execution when it finishes rendering.
Can I achieve this in a simple way?
I tried to makefile for both cmake ver=3.11.4 and 3.12 but receive the same issue nori/ext/tbb/include/tbb/pipeline.h:328:74: error: ‘has_trivial_copy_constructor’ is not a member of ‘std’
OpenEXR's CMakeList is not compatible with CMake 3.12, and it only supports up to CMake 3.11.4. Please add to Readme that CMake 3.12 is not compatible with this nori.
In nori
2023.10.18 can see assianment.
2023.10.19 can not see assianment.
Hello,
I'm not sure if it's the right place for this issue but still : g++ version 13.2.0 raises the following warning (which ends in a failed compilation).
'''' extract of the compilation ''''
In file included from nori/ext/tbb/src/old/concurrent_vector_v2.cpp:20:
nori/ext/tbb/include/tbb/task.h:274:20: error: declaration of ‘tbb::task& tbb::internal::task_prefix::task()’ changes meaning of ‘task’ [-Wchanges-meaning]
274 | tbb::task& task() {return *reinterpret_cast<tbb::task*>(this+1);}
'''' end extract ""
As a workaround, I'm currently using cmake -DCMAKE_CXX_FLAGS="-Wno-changes-meaning"
.
Best, Loic Simon
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.