Title: A fragment for fragmenting into fragments in Fragmentarium :) Post by: Kali on February 11, 2013, 07:10:27 PM Spent hours working on a fractal and you don't like the final result?
Ever thought of smashing it and breaking it to pieces? Don't waste your money on a 3D print only to violently express your frustration! And you don't have to use that hammer on your expensive monitor anymore! I have the solution: https://dl.dropbox.com/s/scxoucnt9nfjw5b/fragmentest.swf?token_hash=AAH6vay72NzJ6WPuJuYpJ2eqrfemn-TLaACHZJAvUEghrw Download the .frag, replace the formula section with that fractal you hate so much, and enjoy the fractal rage! Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: cKleinhuis on February 11, 2013, 07:21:26 PM nice, explosions are always welcome, especially when they give insights ;)
now, next task would be to decrease block size of the grid, apply a little gravity and initial speed and you have the perfect particle system, this would as well fit nicely in my realtime demo i am sooo wanting to do :D nice one! Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: Kali on February 11, 2013, 07:37:08 PM Thanks Chris. You can already specify a lot of smaller blocks in the script parameters... but it's slow!
And I fear it's not so easy to set up a particle system, gravity, etc. using only the fragment shader. This is rather simple, equally sized blocks rotating and getting away from each other. Collisions and general particle tracking should be a nightmare to code using only the shader, I guess... but I'm not an expert so who knows if it can be done. Anyway I can think of some improvements to make more interesting things based on this, like fractal fragmentation or pretransforms of the block grid to get more interesting fragmentation shapes (I already made some tests with sphere inversion). Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: Tim Emit on February 11, 2013, 08:16:34 PM Great stuff Pablo, I will have a play with this tonight.. Thanks as ever for sharing your skills with us :beer:
Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: Kali on February 11, 2013, 08:23:01 PM My pleasure, Tim, and thanks for the comment.
Here's another example with 9x9x9 grid = 729 blocks: https://dl.dropbox.com/s/mz3d7zhokyhl82y/morefragments.swf?token_hash=AAHhKXvbSyxSCLu8dplnXOOqApZBOATO0vA_4Gm9N69qKw Took some minutes to render, even at this low resolution, and no hard shadows... but consider it's a DEcombinate of 729 objects! Always something can be done for optimizing, but I can't think of any yet (eiffie... are you there? ;D) After seeing this, I think I should add some randomness for a better effect, but some blocks will overlap. Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: cKleinhuis on February 11, 2013, 08:45:56 PM it is really slow :(
now this is some compact piece of code, just 2 functions, you are right about problems with fragments and system like stuff, but at the end, is the movement not only just a parabola ( http://en.wikipedia.org/wiki/Parabola ) that could be used to make it look like a fireworks explosion, i was scared from - although tidy - program to fiddle it in collision detection wouldnt be doable with this "fake" approach, but i think it would not disturb so much, when using an even smaller box set up ( i know wouldnt be realtime ) ... :D just to keep you busy ! Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: eiffie on February 12, 2013, 05:04:48 PM OMG awesome idea! Will look for improvements if possible but will definitely steal your idea :)
Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: Kali on February 12, 2013, 08:22:13 PM Thanks eiffie, and it would be an honor to be robbed by you ;D
Now it's time for the Mandelbox/Amazingbox or whatever is called... yeah, I'm tired of it: https://dl.dropbox.com/s/joizi3vvg877ssl/explodingmandelbox.swf?token_hash=AAHvXjg8fOktlxYtRsJ4zAO8j4vwQGcZ6ukujc391yxQsg Here I added some random speeds. If used with "speedvary", the blocks won't overlap. I attached a new version of the script using mandelbox formula, with this speed randomization option and a grid sizing method that makes more sense (you specify the grid size and it remains fixed, then fragment sizes are automatically calculated) P.S.: I noticed AO doesn't work well because of the block/fractal switching when calculating DE, but it's the only optimization I found so far :( Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: Kali on February 12, 2013, 08:39:33 PM I was going to try a central glowing light as an explosion and also volumetric smoke, but my GPU begged me not to do it :pray2:
I leave it to you, eiffie, you have more patience and better scripts for that ;) Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: knighty on February 12, 2013, 09:16:40 PM Very nice!
Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: marius on February 12, 2013, 09:51:39 PM Very nice! Also, slowly morph the blocks into mandelboxes and repeat all the way to the bottom! Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: eiffie on February 13, 2013, 09:18:20 PM Since the pieces fly straight out from the center you could limit the number of cubes that need to be checked per ray, then maybe its possible??? I really want to do what marius suggested with a menger and just keep zooming in, add smoke to hide most of the other cubes. Have the explosions choreographed to music :) Also I want to cut the fractals up fractally. That would be a nice way to see how they are built.
Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: cKleinhuis on February 13, 2013, 10:15:52 PM And to do an endless sequence choose one of the generated parts morph it into another base formula and iexplode again :D
Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: Kali on February 14, 2013, 01:37:49 AM Since the pieces fly straight out from the center you could limit the number of cubes that need to be checked per ray, then maybe its possible??? Also, I was thinking, how can I define a volume containing the current view (including depth defined by distance fading), then limit the object checking to only the ones inside this volume. This should at least speed up the rendering when most of the pieces flew out the view. Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: LMarkoya on February 14, 2013, 03:53:34 AM Very cool guys....really amazing skills
Congrats Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: cbuchner1 on February 14, 2013, 03:42:04 PM needs more recursion! blocks decompose into blocklets, blocklets into grains, grains into dust. Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: Kali on February 14, 2013, 05:02:04 PM needs more recursion! blocks decompose into blocklets, blocklets into grains, grains into dust. And my GPU into fire ;D Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: taurus on February 14, 2013, 05:09:37 PM resistance is futile... ;D
(screenshot) Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: eiffie on February 15, 2013, 12:13:49 AM EDIT: Wait just another bad idea by me - lol. This is discontinuous but I didn't notice because I used it with the original frag which is somewhat symetrical.
Here is a "simple" optimization that should get rid of 7/8 of the blocks but due to parallelism it doesn't come close to that speed. For high numbers of blocks I saw a slight improvement in speed. Code: float sx=((p.x<=0.0)?FragmentsX/2:0); Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: Kali on February 23, 2013, 12:43:53 AM Nice work eiffie, thanks! I saw your post earlier but only tested it today... I don't know what you think is a "slight improvement", but it renders a lot faster for me.
The problem is with the randomize option, but it should be a way to avoid the issue... I attached the optimized frag, just don't use it with randomize. Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: eiffie on February 23, 2013, 05:57:52 PM I think the best solution is ray TRACING to the boxs then using distance estimation from there - but the scripts get more complicated that way. I've been cheating and using OpenGL's poly rendering to do the trace then there is almost no limit to the number of pieces. I still haven't tried cutting the fractal fractally but I will when I find time. Thanks for sharing your ideas and pics!
Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: Kali on February 23, 2013, 08:09:40 PM You are welcome eiffie, thanks to you for your interest and your help.
Btw, I'm having trouble implementing the optimized version of fog shadows in Fragmentarium. Everything seems to be ok, except it does not work ok ;D I had no problems with the buffer, the shadow map seems to be generated ok, but I think the conversion from sphere to screen coordinates is the problem. I'll try a few more things, and if I can't do it I'll have to ask for your help :). P.S.: I'll have to delete the "Iņigo Quilez didn't accept me on Facebook" comment from the .frag, he just did :joy: Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: Tabasco Raremaster on March 12, 2013, 10:49:42 AM Spent hours working on a fractal and you don't like the final result? Genius!Ever thought of smashing it and breaking it to pieces? Don't waste your money on a 3D print only to violently express your frustration! And you don't have to use that hammer on your expensive monitor anymore! I have the solution: https://dl.dropbox.com/s/scxoucnt9nfjw5b/fragmentest.swf?token_hash=AAH6vay72NzJ6WPuJuYpJ2eqrfemn-TLaACHZJAvUEghrw Download the .frag, replace the formula section with that fractal you hate so much, and enjoy the fractal rage! Title: Re: A fragment for fragmenting into fragments in Fragmentarium :) Post by: LMarkoya on March 12, 2013, 12:23:28 PM Sweet....nice job |