Comments (3)
Started work with an off-screen PyOpenGL + GLUT (invisible) window which can be rendered to. The idea is to use that canvas to draw the OpenGL related items to before the model forward render. Then, the OpenGL rendered data (RGB + A + Depth) are all passed into the GS rendering backend with compositing working properly given the other OpenGL render. Splats in front of the depth buffer will splat as usual, but after the depth buffer will not be splatted. Instead, the RGBA from the OpenGL render will be composited, and splatting will only continue if the alpha is not saturated yet. Should work well with only a little overhead on backend.
So far I can render a cube outline using PyOpenGL to a hidden window and also obtain the depth buffer (normalized 0.0-1.0 for near/far plane), and obtain both these arrays as numpy/standard float arrays for passing to the GS CUDA backend.
Next steps
- Implement CUDA rasterizer updates to properly draw gaussians on top of/behind the given RGBAD buffers given to the rasterizer.
- Update OpenGL renderer to maintain a consistent view/projection matrix to the GS renderer model such that the buffer objects are pixel-wise accurate with each other per frame.
- Build out the OpenGL renderer with support for arbitrary objects (wireframe rectangles for cameras, images as textures for debug viewing, etc) so the main code can call high-level functions easily.
Useful Links
- https://stackoverflow.com/questions/52036176/pyopengl-get-depth-map-of-drawn-image
- https://pyopengl.sourceforge.net/context/tutorials/nehe2.html
from gstk.
Updates:
- Creates a frameBufferObject (FBO) to render to, which ignores the frame buffer for the actual window output. Truly "off-screen" rendering. Able to read the colors and depths still
- Uses
glLoadMatrixf
to load the exact modelview matrix and projection matrix, so the OpenGL camera has the exact same parameters as the gaussian splatting one. Had to reverse the z-sign for the projection matrix, seems GS and OpenGL use opposite z-signs (camera forward) - Reorganized the OpenGL_renderer into an object that can be rendered with the
render_cam
object we use to render the GS model. Should be trivial to addopengl_renderer.render(render_cam)
in the main render thread.
from gstk.
Updates:
- Moves OpenGL context to glfw. More modern and nicer than GLUT it seems. Plus, GLFW actually allows a fully hidden window for truly off-screen rendering.
- Properly renders depth + rgba in opengl for use later
- Adjusted CUDA code for GS to accept an RGBA + depth buffer. While traversing splats (per pixel), will properly composite OpenGL rendered objects behind/in front of splats as needed.
- OpenGL camera is now the exact same as the GS model at all times.
Left TODO:
- Still need to build out backend OpenGL objects for visualization. At the moment, only a wireframe cube is available. Will begin with this for the selector editor
from gstk.
Related Issues (20)
- Display training camera locations HOT 1
- Render thread slowed down by communication thread HOT 1
- Frontend camera path for renders
- Backend camera path for renders HOT 1
- Create documentation
- Web-based frontend HOT 1
- Loading existing model HOT 1
- Update GitHub landing page to look good! HOT 1
- Initialize model from the start HOT 1
- OpenGL rendering speed HOT 1
- Dataset creation from images HOT 1
- Create executable builds for frontend application HOT 1
- Launch backend from frontend HOT 1
- Edit tool panel HOT 3
- Add points edit operation HOT 1
- Remove points operation HOT 2
- Undo/redo edit operations HOT 1
- Depth rendering HOT 1
- Loading window and error window modals
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 gstk.