8 ms·
The most advanced MySQL raytracer on the market
- deckar01 7y ago> This is a raytracing engine contained in a single Mysql SELECT statement. In the beginning of the code there are a few parameters that can be modified. The scene can be specified using the @triangles and @squares parameters, but everything is explained in the comments. The whole query returns a bitmap file which can be written to the filesystem using the "INTO DUMPFILE" syntax at the end of the query, if mysql has filesystem write permissions. > The raytracer supports shadows and reflections, which makes it, to my knowledge, the most advanced MySQL raytracer on the market right now. https://demozoo.org/productions/268459/info/2923/ https://demozoo.org/productions/268459/info/2923/
- TuringTest 7y agoIsn't it the same code? https://demozoo.org/productions/268459/ https://demozoo.org/productions/268459/
- deckar01 7y agoThat is the same link I posted without the path to the readme.
- Flockster 7y agoThis is nice. So this is one SELECT statement in which the triangles and/or spheres are defined, and the raytracing-engine is written. Then it calculates the Pixels and dumps them into a .bmp-file.
- xemdetia 7y agoThis is actually a pretty neat mechanism that builds a string (including BMP magic number and header) and shoves it into a dump file, doing a ray trace per byte. I wish there was a commented/not collapsed version of it to better enjoy reading. Right now it's just a blob.
- mwexler 7y agoIt is surprising to discover that there is actually a market for multiple MySQL Raytracers, much less that this is the best of them. Clever stuff.
- sp332 7y agoHere's one for SQLite https://observablehq.com/@pallada-92/sql-3d-engine https://observablehq.com/@pallada-92/sql-3d-engine
- jolmg 7y agoCalling it "the most advanced [...] on the market" is probably tongue in cheek. Notice that this is being given away free and there is no mention of price anywhere.
- yellowapple 7y agoWherefore the fuck? Though I'm suddenly curious if this can be done in other SQL engines, too.
- hultner 7y agoWell, yes of course, there's probably an ripe untapped market there. Lot's of potential!
- etaioinshrdlu 7y agoI wonder if something like this might even be slightly practical using BigQuery or similar..
- nerpderp82 7y agoUDFs are throttled, so to get max perf out of BQ one would need to make sure it was pure sql.
- luismedel 7y agoClever (and unreadable) :-) Here's another raytracer written in Linq (2007) https://blogs.msdn.microsoft.com/lukeh/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer/ https://blogs.msdn.microsoft.com/lukeh/2007/10/01/taking-lin...
- bherrmann7 7y ago"Released under the do whatever the fuck you want license. If you use it for commercial purposes, like rendering your Hollywood studio's new big animated A-Movie, please let me know at holtsetio@gmail.com. " -- https://demozoo.org/productions/268459/info/2923/ https://demozoo.org/productions/268459/info/2923/
- james_s_tayler 7y agoIs there a TL;DR legal entry for that? LMAO.
- windsurfer 7y agoHere is probably the best source for that: http://www.wtfpl.net/faq/ http://www.wtfpl.net/faq/
- deleted 7y ago[deleted]
- QuercusMax 7y agoIs there a "this is probably a bad idea; if you use this code I'm not responsible" license?
- jniedrauer 7y agoSounds like you want the MIT license
- simtel20 7y agoYep, that's the one.
- deleted 7y ago[deleted]
- m463 7y agoSo to accelerate this, do I need an SSD or a GPU or a DBA?
- PedroBatista 7y agoYes.
- ShteiLoups 7y agoMany "cube"s, whatever they are
- erik_seaberg 7y agoIf you tesselate models down to triangles, you're going to want to persist them in a triplestore.
- skrebbel 7y agoIf you're unfamiliar with navigating the fabulous Pouet.net, the relevant background is in the so-called "infofile": https://www.pouet.net/prod_nfo.php?which=83222 https://www.pouet.net/prod_nfo.php?which=83222 (or click [nfo] in the right top)
- Reisen 7y agoI really appreciate comments like this for the quick time save they offer. Thank you for this comment, it was the most useful in this post for me.
- ivalm 7y agoDid we break it? (site doesn't load for me)
- FridgeSeal 7y agoSite just loads really slowly.
- tpmx 7y agoNow this is art! I think us geeks have finally hit upon the formula the high brow art people are used to. Now we just need to start a physical market so that: a) demoscene creators can get rich b) "art investors" can launder their money
- brokensegue 7y agothe problem with "demoscene art" is that the final product is often only impressive if you know how it was done. really you want to display it in a way that shows off the mechanism. i guess quines don't have this problem.
- detaro 7y agoI'd argue a good chunk of "Art art" is quite similar: the thing you see is quite unimpressive and really only considered important because of context.
- brokensegue 7y agoagreed that it is true for a lot of "high art" too. but much of it can still be appreciated at face value.
- mntmoss 7y agoA lot of art derives value from craft, but when craft is systematized, it becomes product design and targeted towards consumers instead. Demoscene folks have often crossed over to the industrial side of computer graphics and gaming. A good proportion of the art-as-art world either finds new and original ways to push craft, or focuses on medium facilitating message(which in turn falls neatly into the product-marketing framework).
- skrebbel 7y agoA nice demoscene example is "Piledriver", which contains all of the last 2 decades worth of demoscene tropes, no exceptions. Hexagonal cones, walking robots, purple explosions, drum'n'bass with rap vocals, television walls with earlier scenes, it's all there. And it's extremely well executed, which hides that it's a parody. So I guess it only works as a work of art if you saw the demos it mocks. https://www.pouet.net/prod.php?which=82882 https://www.pouet.net/prod.php?which=82882 https://m.youtube.com/watch?v=4zkSd3-6I2A https://m.youtube.com/watch?v=4zkSd3-6I2A
- benibela 7y agoFun fact: The official XPath/XQuery test suite of the W3C contains an raytracer written in XQuery. So most xml databases should support raytracing
- pankajdoharey 7y agoOk so now I am curious if it could be done in other engines Cassandra,SPARQL ...
- chx 7y agoRelated: there's a codegolfing answer to draw the biohazard symbol -- in Microsoft SQL Server. It has graphics! For real. https://codegolf.stackexchange.com/a/191323/7733 https://codegolf.stackexchange.com/a/191323/7733
- jandrese 7y agoUnrelated question: Is there an Ignobel for Computer Science?
- bane 7y agoAnybody in North America who's interested in this kind of technical magic should consider attending one of the few demoscene parties (meetings/competitions) in the U.S. such as Demosplash [1] 1 - https://www.youtube.com/watch?v=A-GTf7b9PKk https://www.youtube.com/watch?v=A-GTf7b9PKk If you are in Europe, especially Northern Europe, there's a ton of very well attended parties. There's even a few in Japan! It's really for people who are extremely passionate about technology for technology's sake and like to show off a little.
- aitchnyu 7y agoNow that PostGIS outputs pngs directly, we can imagine future databases handling 3d assets (select * from objects where can_fit_in(x);) and even rendering them. https://postgis.net/docs/RT_ST_AsRaster.html https://postgis.net/docs/RT_ST_AsRaster.html
- v3nomsoup 7y agoBy the way, you can find all releases of that party here: https://demozoo.org/parties/3800/ https://demozoo.org/parties/3800/ Youtube captures of all events and competitions are here: https://www.youtube.com/playlist?list=PL1nWnZ0_fy8DvL13vfLD8zvXVdLsazEvB https://www.youtube.com/playlist?list=PL1nWnZ0_fy8DvL13vfLD8... And here's another production which is an insane tech-feat: https://demozoo.org/productions/268576/ https://demozoo.org/productions/268576/ Moving cubes with pathtracing, lighting and ambient sound in 64 bytes