ddiakopoulos / polymer Goto Github PK
View Code? Open in Web Editor NEW๐จ graphics/interaction prototyping sandbox
License: BSD 3-Clause "New" or "Revised" License
๐จ graphics/interaction prototyping sandbox
License: BSD 3-Clause "New" or "Revised" License
Performance optimization to use stencil mask to early-reject fragments not visible through the HMD lenses
https://github.com/ValveSoftware/openvr/wiki/IVRSystem::GetHiddenAreaMesh
A polymer mesh will hold multiple sub-meshes and material instances. It should support multiple workflows:
Scene cameras and skyboxes should be serializable components. For now they are treated more implicitly.
Draw an imgui instance to an aux framebuffer, and then hook up a billboard and laser pointer so it can be interacted with and rendered in VR.
glsl => spir-v => api shader compiler (includes, defines, optimization, reflection)
Somewhat trivial feature that requires renderer modification. We need a better API to disable render passes (for instance, to only leave the skybox). Rendering the procedural skydome every frame is a huge performance hit.
Fixed by removing the check @
polymer/lib-engine/gfx/gl/glfw-app.cpp
Line 66 in 01abd63
According to https://hero.handmade.network/forums/code-discussion/t/1013-opengl_arb_vs_ext it's mandatory for OpenGL 3.0+
Cleanup following #15
The scene editor needs an imgui implementation to describe the scene graph. It currently shows all scene entities as a flat list, but they should be grouped according to the transform graph.
Is there an easy way to add more camera trajectory position?
It seem to bug out when adding more than 4.
It is probably me doing something wrong, not understanding the code completely.
Ps.
Keep up the amazing work you are doing, you are brilliant! ๐
At present, Polymer's renderer is fairly rigid and not exactly hackable/adaptable.
Unity's scriptable render pipeline is worth an investigation alongside LabRender from @meshula
Also: Experiment with compute shader skinning as a job
A generic memory pool is relatively simple and useful enough that Polymer should have one even though it's not presently required for any in-engine features.
While component pools and hash tables provide most of the heavy lifting for the ECS functionality, an object pool can still be useful (i.e. objects that wrap third-party functionality like physics).
Reference: https://github.com/mtrebi/memory-allocators
This is a precursor to #23
Scene light probes were recently moved from being a shader-oriented assets to scene-oriented assets, now we need to build a small pipeline to bake radiance and irradiance cubemaps.
Both samples crash with an access violation here https://github.com/ddiakopoulos/polymer/blob/master/lib-engine/gfx/gl/gl-api.hpp#L572
Hi! I've noticed I have push access to the repo.
Wouldn't it be better if we forked the repo and do PR so we can discuss modifications before pushing a change?
The gl_shader_asset
object has facilities to compile variants based on included defines. A function needs to be written to analyze the currently used texture handles on a material and ensure its variant is compiled appropriately. Current materials simply define all potential shader defines, but this is actually a bug since not all materials will use all the define-available texture slots.
The scene graph is reconstructed every frame to task the renderer. We typically clear the payload and assemble a renderable
object. A renderable
should be refactored to a render_component
which might be cached with a dirty flag.
Separately, materials need one last refactor before being fully usable. Material instances are serialized into separate *.json files containing the uniform values and texture sampling info. A material_component
simply has the handle to a material instance. To recreate a typical metalness/roughness scene, we would need N different materials, each with a single value changed... this is not ideal. Instead, what we actually need is for the uniform values to be stored as part of a material_component
per entity (kind of a prefab). I am imagining that texture samplers are what define the material (and are largely responsible for requiring new shader variants), while uniform properties can be overridden on a per entity/material_component
basis.
Any other thoughts @meshula ?
Different buggy behavior for either
Here:
https://github.com/ddiakopoulos/polymer/blob/master/samples/gl-render/gl-render.cpp#L93
import_model
returns an empty map. I think it finds the file because it logs: "0 shapes, 1 material"
Bullet3 is included and repo already has starter wrapping code. Previously it was integrated into samples on an ad-hoc basis, but it's ideal to have a rigid_body
component type and wired into the the collision_system
in lib-engine
Cereal has a lot of boilerplate for polymorphic relationships.
Polymer is presently uses OpenGL 4.5 features across the codebase. The eventual goal will be to replace all GL with a rendering abstraction capable of targeting multiple graphics backends. A reasonable target might be GL, DX12, and Vulkan. For macOS, it should be possible to use MoltenVK to bring Metal2 support with minimal effort.
glsl => spir-v => api shader compiler (includes, defines, optimization, reflection)
Inspiration
https://github.com/NVIDIAGameWorks/Falcor
https://github.com/sgorsten/workbench
A list of planned future samples
This is relatively trivial just need to put some time into it.
Craft a few basic samples demonstrating features of lib-polymer
and lib-engine
.
Current plan of attack is to use the Microsoft gLTF SDK.
Must be implemented after initial pass at ECS
A transform hierarchy followed by a robust collision system (entity-entity, entity-ray) will form the basis of all VR interactions.
Already implemented, but need to integrate at the renderer level
Results in an editor bug where, for instance, texture_handles, are assigned the last selectable value.
engine-openvr-scene
has the beginnings of a teleportation-style locomotion system. A long time ago, Valve and others discovered that fading to black before the teleport event minimizes locomotion-induced sickness. This will need to be integrated into the renderer as configurable post pass.
A core promise of Polymer is a unified method of treating interactive VR objects. This concept only exists in various bits, pieces, and smaller prototypes. This system should be capable of bringing together the following features:
There are three toolkits worth taking inspiration from:
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.