Comments (17)
for M_PI is not defined:
#define _USE_MATH_DEFINES
And this line can't be compiled with MSVC. variadic macro here is non-standard. replace args VA_ARGS here to resolve error.
Line 3 in ba37316
from redner.
Just FYI, I'm currently working on Windows compatibility. I added prebuild windows binaries to the dependencies, adapted the imports of embree and optix and implemented MSVC replacements for the GCC intrinsics. I was able to compile Redner using Visual Studio 2019 today and successfully interfaced with the renderer using the Python bindings.
from redner.
Thanks for the report!
I plan to handle windows build within a few months.
Testing CUDA support on windows might be tricky though due to me lacking machines.
Contribution is welcome any time ; )
from redner.
@BachiLi I am still working on it.
On my Windows machine with miniconda 3. After some modification to code and cmake script. I can successfully build a redner.dll now.
But fail to install redner into python 3.6 in conda environment.(pyredner is installed successfully)
from redner.
@tim37021 I also fail to import redner.dll into python3.6 in conda environment, in the same situation with yours. "ImportError: DLL load failed: The specified module could not be found." is reported by python.
Do you have any solution for this problem?
from redner.
I think it has to do with the fact that I did not link the Python libraries while building. This can cause problems on windows. For now you can try adding ${Python_LIBRARIES} in target_link_libraries() and see if it works. I'll take a look once I get a windows machine.
from redner.
@swordigo1995 other dependencies dlls(embree3.dll, tbb.dll, tbb_malloc.dll) are also missed when importing redner.
@BachiLi
how about including pybind11 in this repo as a submodule?
cmake script does not check pybind11 installation at all.
target_include_directores(redner pybind11/include)
btw, I've successfully built and tested on linux
conda python 3.7.1, CUDA 10 OptiX, Pytorch(CUDA 10)
from redner.
@tim37021 @BachiLi Thanks a lot for your advice!! 👍
I copied other dependencies to the same folder with redner.pyd when importing redner, and it works! But I got another error when it initializes redner.Scene
class in the forward()
func.
@tim37021 Do you have successfully test it on Windows? If not, I think it's time for me to setup a linux environment..
$ python tutorials/01_optimize_single_triangle.py
Traceback (most recent call last):
File "tutorials/01_optimize_single_triangle.py", line 97, in
img = render(0, *scene_args)
File "D:\Anaconda3\envs\redner\lib\site-packages\pyredner\render_pytorch.py", line 216, in forward
pyredner.get_use_gpu())
RuntimeError: Caught an unknown exception!
from redner.
@swordigo1995 I switched to linux quickly when I've failed on windows. On linux some modifications are still necessary to get it work. And you need to build pytorch on your own for using CUDA 10.
from redner.
Would be great to have a windows build working.. Not sure why windows always get the short shrift. Lots of ML practitioners still use windows, particularly those from a graphics background.
from redner.
Check out #11
from redner.
Just FYI, I'm currently working on Windows compatibility. I added prebuild windows binaries to the dependencies, adapted the imports of embree and optix and implemented MSVC replacements for the GCC intrinsics. I was able to compile Redner using Visual Studio 2019 today and successfully interfaced with the renderer using the Python bindings.
This is merged. GPU support still needs some work so not closing this issue yet. I also need to figure out a way to publish windows pip packages.
from redner.
This is merged. GPU support still needs some work so not closing this issue yet. I also need to figure out a way to publish windows pip packages.
Thanks for merging! I will look into GPU support the next weeks. At least in theory it shouldn't be too hard.
EDIT: Ok, the problem with using CUDA as language is that you cannot compile cpp files with NVCC that way. That's probably the issue you've run into.
EDIT 2: I was able to compile the GPU version on Windows and get it running. I figured, it would be easiest to modify the pybind scripts, so introducing a new function called pybind11_setup_module
that does all the steps pybind11_add_module
does, except for the add_library
call. I don't like the idea of maintaining our own fork of pybind, so it's probably best to supply the code as extra CMake script.
from redner.
Thank you for the excellent work!
I am able to build and run the forward rendering examples on Windows successfully.
But it will be stuck at the backpropagation of the gradient step.
Are there any updates on how to run with GPU version on Windows?
from redner.
I am able to build and run the forward rendering examples on Windows successfully.
That's great news!
But it will be stuck at the backpropagation of the gradient step.
This is however not. Tbh, I didn't try the backprop samples under Windows yet but a functional backpropagation is also crucial for my use case. So I will probably also run into this issue soon, thanks for the warning.
Are there any updates on how to run with GPU version on Windows?
I managed to get the GPU version to compile under Windows and also built the python package. From what I've tested, deferred rendering works as expected but path tracing does not. Essentially something triggers a segmentation fault. I did dive deeper into the issue and traced it back to cudaDeviceSynchronize
call failing in a thrust function. Unfortunately, this can be caused by any previous cuda call, so I wasn't yet able to pin down the exact location of the cause.
For now, I find a fully working CPU version more important, so I'll probably look into that first.
EDIT: You are right. Backpropagation does not work under Windows. Created an issue (#93).
from redner.
@guanming001 GPU support is now added for Windows builds. Unfortunately, path tracing currently does not work, but at least the albedo and deferred rendering operations (as well as backpropagation with these).
If you encounter weird linking issues (e.g. VS trying to link against optimized.lib
), then try to patch pybind11 with these changes pybind/pybind11#2104. It's a bug on their side.
from redner.
Windows machines should be able to pip install redner-gpu
and pip install redner
from now on. TensorFlow is not supported yet due to some compilation issues (MSVC is not happy with the TensorFlow headers).
from redner.
Related Issues (20)
- Inconsistent formulation of SH_reconstruct
- CUDA Runtime Error: out of memory at E:\redner\src\buffer.h:55 HOT 2
- Can redner support glasses/transparent material now?
- RTX 30 Series Compatibility HOT 14
- weird render behavior
- Windows package on PyPI is at version 0.4.25 while OSX and Linux packages are at 0.4.28
- I have intrinsic parameters in terms of fx, fy, skew, cx, cy. I tried extracting parameters from the file (param: vertices, indices, normals and colors) and creating an object, and using intrinsic parameters to set up the perspective camera. But orientation of scene in output is not lining up, can I get some guidance?
- build from source problem HOT 3
- Icosphere normals generation seems buggy
- Unable to load some obj files with pyredner.load_obj()
- Support pointLight in "render_pathtracing".
- Build for 3.9 no attribute 'CameraType' HOT 1
- How to get the z_buffer or depth information at the rendering process?
- [Question] What is AABB6 and BVHNode6 in "aabb.h" and "edge_tree.h" used for?
- Assertion `false' failed when running the test scripts. HOT 2
- How to set material and environment map obtained by inverse rendering in blender ? HOT 1
- Pip install not compatible with python 3.9? HOT 2
- Is warp-area sampling method easier to understand and implement in path space? HOT 1
- How to realize automatic differentiable in interior term?
- Edge Sampling Integrator broken in Warped Area Integrator branch?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redner.