adamyuan / sparsevoxeloctree Goto Github PK
View Code? Open in Web Editor NEWA GPU SVO Builder using rasterization pipeline, a efficient SVO ray marcher and a simple SVO path tracer.
License: MIT License
A GPU SVO Builder using rasterization pipeline, a efficient SVO ray marcher and a simple SVO path tracer.
License: MIT License
Where is in code now convert of hdr accumulated image to show to screen - is it right it is path_tracer_viewer_main.frag?
I want to add tone mapper and save to ldr - to png, jpg. In which source code I must add my code?
dep/MyVK/src/imgui/ImGuiRenderer.cpp have encoded code.
Can you show source of this encoded code?
Hi there, what's the license for this code?
If you don't care about its usage and are unsure, might I suggest the MIT license?
Hello,
I just came across this you Sparse Voxel Octree and wanted to replicate the output.
I downloaded the Windows_MSVC in the release section but it seems that it is missing the OBJ files for Crytek Sponza, San Miguel, and Living Room.
Where can I download these and others to test out?
Thanks
Where can I download the OBJs used in the screenshots? I want to test this amazing project out!
Hi Adam
Really cool project - works out of the box on Debian 12 using both integrated and dedicated GPU. I am looking for inspiration for a fast SVO for updating a TSDF and raycasting afterwards - very different from the rasterization pipeline.
Do you have any good references for such a challenge?
Thanks in advance
Jens
Hey just wondering if you can tell me how fast the can build an svo on a couple datasets. Thanks
Hello, Adam.
Please help transform octtrees correctly and render multiple octrees (GL version).
To rotate/transform octtree with "model" matrix uniform, i try multiple matrix like this -
return normalize(mat3(inverse(uView)) * inverse(mat3(uModel)) * (inverse(uProjection) * vec4(coord, 1, 1) ).xyz);
in vec3 GenRay() function;
But i think, it rotate camera, instest of model; Also - try to render second octtree, with some translation.
if my multiply wrong, and i move the camera instead of the object, then I will not be able to see the 2nd object.
here is code to render two objects:
glm::mat4 model = glm::mat4(1.0);
model = glm::rotate(model, (float)glfwGetTime(), glm::vec3(0,0,1));
m_shader.SetMat4(m_shader.GetUniform("uModel"), (GLfloat*)(&model));
m_shader.SetInt(m_unif_view_type, (GLint)m_view_type);
m_shader.SetInt(m_unif_beam_enable, (GLint)m_beam_enable);
quad.Render();
model = glm::translate(model, glm::vec3(0.5, 0.75, 0)); // 1.0 - 2.0 space?
m_shader.SetMat4(m_shader.GetUniform("uModel"), (GLfloat*)(&model));
m_shader.SetInt(m_unif_view_type, (GLint)m_view_type);
m_shader.SetInt(m_unif_beam_enable, (GLint)m_beam_enable);
quad.Render();
beam opt. is disabled ofcourse;
Also disable black color if !hit:
main() {
...
if(uViewType == 2)
oFragColor = vec4( vec3(iter / 64.0f), 1 );
else
//if (!hit) discard; // no effect
//oFragColor = vec4( hit ? ( uViewType == 0 ? color : normal * 0.5f + 0.5f ) : vec3(0), 1 );
if (hit)
oFragColor = vec4( uViewType == 0 ? color : normal * 0.5f + 0.5f, 1 );
...
}
The raytracing gets a decent image basically instantly, would it be possible to navigate the scene in the raytraced mode? Also, I figured out that you can use Shift to go down, but how do you go up?
Severity Code Description Project File Line Suppression State
Error C1091 compiler limit: string exceeds 65535 bytes in length SparseVoxelOctree C:\Projects\vox\SparseVoxelOctree\dep\imgui\imgui_draw.cpp 3777
Hello,
I am wondering if this project is still active and if v2.0 is in the works?
Would like to discuss it in more details if you are interested.
Thanks
When running on macOS Monterey we get this error.
program_source:38:174: error: cannot reserve 'texture' resource locations at index 0
fragment void main0(main0_in in [[stage_in]], device _66& _68 [[buffer(2)]], device _101& _103 [[buffer(3)]], constant _20& _22 [[buffer(4)]], array<texture2d, 1024> _19 [[texture(0)]], array<sampler, 1024> _19Smplr [[sampler(0)]])
^
program_source:38:215: error: cannot reserve 'sampler' resource locations at index 0
fragment void main0(main0_in in [[stage_in]], device _66& _68 [[buffer(2)]], device _101& _103 [[buffer(3)]], constant _20& _22 [[buffer(4)]], array<texture2d, 1024> _19 [[texture(0)]], array<sampler, 1024> _19Smplr [[sampler(0)]])
macbook pro m1.
Hi! I can't build on MacOS (M1 Pro Ventura 13.3.1), though I do have Vulkan installed and working properly. I'm really new to Vulkan though so sorry if my question is silly.
Error is in dep/myVK/src/glfw/Instance.cpp when calling vkCreateInstance(&create_info, nullptr, &ret->m_instance)
it get -9
which translate to VK_ERROR_INCOMPATIBLE_DRIVER
Do you have any idea on how to overcome this?
I tried to do this :
std::vector<const char*> extNames;
const char* extName1 = "VK_KHR_portability_enumeration";
const char* extName2 = VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME;
const char* extName3 = "VK_KHR_portability_subset";
extNames.push_back(extName1);
extNames.push_back(extName2);
extNames.push_back(extName3);
VkInstanceCreateInfo create_info = {};
create_info.flags = VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
create_info.enabledExtensionCount = static_cast<uint32_t>(extNames.size());
create_info.ppEnabledExtensionNames = extNames.data();
create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
create_info.pApplicationInfo = &app_info;
in dep/myVK/src/glfw/Instance.cpp as stated in Vulkan docs, but it does not change anything.
Thanks!
[114/114] Linking CXX executable SparseVoxelOctree.exe
make: [C:\msys64\tmp\ccDCIn3m.mk:60: C:\msys64\tmp\cccgCHMz.ltrans19.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:48: C:\msys64\tmp\cccgCHMz.ltrans15.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:33: C:\msys64\tmp\cccgCHMz.ltrans10.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:24: C:\msys64\tmp\cccgCHMz.ltrans7.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:36: C:\msys64\tmp\cccgCHMz.ltrans11.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:39: C:\msys64\tmp\cccgCHMz.ltrans12.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:69: C:\msys64\tmp\cccgCHMz.ltrans22.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:51: C:\msys64\tmp\cccgCHMz.ltrans16.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:63: C:\msys64\tmp\cccgCHMz.ltrans20.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:66: C:\msys64\tmp\cccgCHMz.ltrans21.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:15: C:\msys64\tmp\cccgCHMz.ltrans4.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:3: C:\msys64\tmp\cccgCHMz.ltrans0.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:78: C:\msys64\tmp\cccgCHMz.ltrans25.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:54: C:\msys64\tmp\cccgCHMz.ltrans17.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:27: C:\msys64\tmp\cccgCHMz.ltrans8.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:45: C:\msys64\tmp\cccgCHMz.ltrans14.ltrans.o] Error 1 (ignored)
C:/msys64/home/Administrator/SparseVoxelOctree/dep/tinyfiledialogs.c: In function 'tinyfd_openFileDialog.constprop':
C:/msys64/home/Administrator/SparseVoxelOctree/dep/tinyfiledialogs.c:3095:1: warning: function may return address of local variable [-Wreturn-local-addr]
3095 | }
| ^
C:/msys64/home/Administrator/SparseVoxelOctree/dep/tinyfiledialogs.c:3043:14: note: declared here
3043 | char lBuff[MAX_PATH_OR_CMD];
| ^
C:/msys64/home/Administrator/SparseVoxelOctree/dep/tinyfiledialogs.c:3043:14: note: declared here
make: [C:\msys64\tmp\ccDCIn3m.mk:81: C:\msys64\tmp\cccgCHMz.ltrans26.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:57: C:\msys64\tmp\cccgCHMz.ltrans18.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:42: C:\msys64\tmp\cccgCHMz.ltrans13.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:75: C:\msys64\tmp\cccgCHMz.ltrans24.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:84: C:\msys64\tmp\cccgCHMz.ltrans27.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:30: C:\msys64\tmp\cccgCHMz.ltrans9.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:12: C:\msys64\tmp\cccgCHMz.ltrans3.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:72: C:\msys64\tmp\cccgCHMz.ltrans23.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:6: C:\msys64\tmp\cccgCHMz.ltrans1.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:18: C:\msys64\tmp\cccgCHMz.ltrans5.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:9: C:\msys64\tmp\cccgCHMz.ltrans2.ltrans.o] Error 1 (ignored)
make: [C:\msys64\tmp\ccDCIn3m.mk:21: C:\msys64\tmp\cccgCHMz.ltrans6.ltrans.o] Error 1 (ignored)
Hello.
Why you use m_bounce to calculate spp for divide accumulated but not use real frame number?
SparseVoxelOctree/shader/path_tracer.comp
Line 123 in 3b175fc
Hello!
What do this
SparseVoxelOctree/shader/quad.vert
Line 2 in 3b175fc
and this piesces of code
SparseVoxelOctree/shader/sobol.comp
Line 83 in 3b175fc
i.e. "find lsb of 'not' of..."
Why LSB? Why 'not'?
Can I use any obj file I have with SparseVoxelOctree? Do you have any of the scenes shown in the README available to download?
Previously I use commit Avoid using samplers per texture and save to hdr is worked ok.
In new commit save to hdr is broken and program abnormally exit.
Hello.
Why do you use meshoptimizer?
What pros and cons for use it?
I need to save tonemapped png or jpg, not hdr image.
How to do it?
Or maybe implement it in code, please
hmm
-- Building for: Visual Studio 16 2019
-- The C compiler identification is MSVC 19.24.28314.0
-- The CXX compiler identification is MSVC 19.24.28314.0
-- Check for working C compiler: D:/Software/VS/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: D:/Software/VS/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- 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: D:/Software/VS/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: D:/Software/VS/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenGL: opengl32
CMake Error at CMakeLists.txt:18 (find_package):
By not providing "Findglfw3.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "glfw3", but
CMake did not find one.
Could not find a package configuration file provided by "glfw3" with any of
the following names:
glfw3Config.cmake
glfw3-config.cmake
Add the installation prefix of "glfw3" to CMAKE_PREFIX_PATH or set
"glfw3_DIR" to a directory containing one of the above files. If "glfw3"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
See also "C:/Projects/vox/SparseVoxelOctree/CMakeFiles/CMakeOutput.log".
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.