I have started to play around with building a software rasterizer from scratch, and I am wondering if this might be something that I could potentially leverage to cheat at some of the math problems. The document mentions CAD, but I am not sure if the performance is such that real-time (i.e. 30+fps) queries would be feasible over meaningful datasets. Does anyone have any experience directly using SQL for this sort of…
You might have some success using hand-coded routines for the last / hardest-working portion of the rasterizer, and just use SQLite to translate data from a format produced by the front-end to a format that matches the back-end. I'm interested in relational programming for 3D meshes. For example what if we could use the form of a query to write a routine that splits a 3D mesh (creating new triangles at the boundary?)
The SQLite R*Tree Module
11–17 of 17 posts
Re: The SQLite R*Tree Module
#12I have started to play around with building a software rasterizer from scratch, and I am wondering if this might be something that I could potentially leverage to cheat at some of the math problems. The document mentions CAD, but I am not sure if the performance is such that real-time (i.e. 30+fps) queries would be feasible over meaningful datasets. Does anyone have any experience directly using SQL for this sort of…
It might be feasible if you use sqlite's in-memory feature, because hitting the disk on each query is way too slow for a real-time application. Why not just use an r-tree library for the language you're using? It'll be faster and easier to work with. Since scene data is usually hierarchial, sql doesn't seem like a great choice for storing it
Maybe when you first start or access a new piece of data for the first time you maybe get a hiccup (maybe not - always profile to figure out how your specific application performs). If hiccups like that actually manifest, a nice way to solve that would be to attach the on-disk DB to the in-memory one, copy everything over (and maybe detach). If that DB is ever mutable at runtime, just copy the changes back in a background transaction to the on-disk DB (in this case I wouldn’t detach probably). This way you still get the persistence of the disk with the performance of RAM.
Re: The SQLite R*Tree Module
#13I have started to play around with building a software rasterizer from scratch, and I am wondering if this might be something that I could potentially leverage to cheat at some of the math problems. The document mentions CAD, but I am not sure if the performance is such that real-time (i.e. 30+fps) queries would be feasible over meaningful datasets. Does anyone have any experience directly using SQL for this sort of…
Re: The SQLite R*Tree Module
#14Earlier quoted context omitted.
It might be feasible if you use sqlite's in-memory feature, because hitting the disk on each query is way too slow for a real-time application. Why not just use an r-tree library for the language you're using? It'll be faster and easier to work with. Since scene data is usually hierarchial, sql doesn't seem like a great choice for storing it
Page cache and SQLite cache means you don’t actually end up hitting the disk usually. Also SSDs are pretty fast and NVMEs more so. Maybe when you first start or access a new piece of data for the first time you maybe get a hiccup (maybe not - always profile to figure out how your specific application performs). If hiccups like that actually manifest, a nice way to solve that would be to attach the on-disk DB to the i…
I’m not saying it can’t be done, or that it can’t be fast. But it’s very much against the grain and needs more justification Than “NVMe is fast”
Re: The SQLite R*Tree Module
#15Re: The SQLite R*Tree Module
#16I have started to play around with building a software rasterizer from scratch, and I am wondering if this might be something that I could potentially leverage to cheat at some of the math problems. The document mentions CAD, but I am not sure if the performance is such that real-time (i.e. 30+fps) queries would be feasible over meaningful datasets. Does anyone have any experience directly using SQL for this sort of…
Re: The SQLite R*Tree Module
#17I love SQLite's software model (embeddable library rather than a separate binary), but I often sorely miss the rich data model provided by postgres. I miss things like strong type checking, special types to represent times/coordinates/etc., and advanced index types like GiST indices.
How close does DuckDB get to fulfilling your needs?