Title: IQ Clouds Post by: 3dickulus on November 17, 2013, 05:16:52 AM I've been getting into GLSL with the help of the great people here at Fractal Forums, many many thanks. I'm not able to come up with any ground breaking code on my own yet, hahaha, but I'm learning a lot about GLSL and starting to understand the crazy math a bit better, it either adds up or it doesn't...
lately I've had my head in the IQ clouds and seem to be trapped in the Sphere of Confusion, a grand adventure, here's something I did with Inigo Quilez's cloud code, a masterful work, thank you IQ! and Kali's kalibox, another great piece of code, thank you Kali! http://vimeo.com/moogaloop.swf?clip_id=79580377 Title: Re: IQ Clouds Post by: mclarekin on November 17, 2013, 08:51:49 AM I rate your short animation highly. Flows along beautifully. :) :) :)
Title: Re: IQ Clouds Post by: eiffie on November 17, 2013, 05:57:33 PM Looks good! How did you march both? Did you get a distance to the kalibox and then do the cloud steps thru it? I am trying to put clouds in the SoC renderer so all distance fields can be treated equally (not much success yet).
Title: Re: IQ Clouds Post by: 3dickulus on November 17, 2013, 11:51:21 PM Take #2 IQ Clouds remix
Thankyou both, I'm starting to get the hang of it but not writing anything from scratch yet, it looks good because of the guys who wrote the code, IQ & Kali http://vimeo.com/moogaloop.swf?clip_id=79613106 how/what did I do? Kalis code, Mandelbox Distance Estimator (Rrrola's version), is untouched cuz I would like to make something that any DE can use, kinda like a plugin along the same idea as Kalis ColorPalette.frag but for clouds :dink: I addapted IQs cloud code (uses his raymarcher but just for clouds) to use inputs from Fragmentarium, the main() routine is renamed clouds and takes 2 vec3 inputs, clouds(from, direction) and returns a vec3 color for this location, backColor is set = cloudColor and blended into the floor and background hits, then the obj hitcolor is blended like... Code: gl_FragDepth = ((MaxDistance / (MaxDistance - minDist)) + the above may or may not be correct or ideal, watch the vid and judge for yourself, I figured if I'm calculating depth for spline path occlusion I might as well make use of it for other things too :D that's what I used in Take #2 and found that the cloud code has issues on 0.0 axis, as most if not all DE calculations do. To test this, run Fragmentarium, set Up vector as 0.0,1.0,0.0 then set eye and target at 1.0,0.0,0.0 and -1.0,0.0,0.0, the mandelbulb should disapear, move the camera back to -6.28 or +6.28 an any axis and the mandelbulb should be visible again but only from outside that radius with other 2 axis at 0.0, hmm... 2PI or not 2PI, that is the question, at any rate it still looks pretty good because your eyes follow the objects around and your brain is distracted by foreground movement. I don't think this will work without depth buffers being enabled (front+back+hires+preview yes they all need one to render properly) unless code is added to pass the values around. in the first vid the clouds are static with Eye and the world moves around them in Take #2 the clouds have wind direction and are world relative, looks much better when they move now but has problems when you are looking into the wind? eye lids fluttering? along a particular axis of calculation, maybe changing wind direction will help. the first vid had a lot of speckles so I processed the frames with Gimp 2.8 and lost some detail, but I think I found that little bug and the second vid looks crispier, mmmmm crunch crunch crunch. maybe this will help with the SoC frag, cheers :beer: Edit: don't need depth for clouds as we have depth for everything else ;) Title: Re: IQ Clouds Post by: 3dickulus on November 18, 2013, 04:58:54 AM P.S.
The occlusion formula above has been tested (works or sort of works for spline paths) with these raytracer frags... Brute :( SubBlue :-\ Soft :) Path :) NODE :( IBL :) Fast :) X :) DE :) DE v0.9.1 :) DE v0.9.10 :) testing was just preliminary not extensive. Title: Re: IQ Clouds Post by: Kali on November 18, 2013, 07:17:33 AM Well done! :beer:
Title: Re: IQ Clouds Post by: 3dickulus on November 18, 2013, 09:19:25 PM Tnx :)
it's still at the brutal hack stage, direction, density, base color and highlights are what I'm planning for the variable editor, right now I have some things in trace() that work but I am trying to setup so that it can be #included and then add just a couple of lines to make it work instead of major rearanging of the Raytracer.frag you want to use. Title: Re: IQ Clouds Post by: 3dickulus on November 25, 2013, 11:25:23 AM This shows the cloud object occlusion better with no blending at object/cloud interface, just a hard line.
http://vimeo.com/moogaloop.swf?clip_id=80248121 the cloud code may be a bit too specialized for a generic plugin/add-on type of module but I'm having some fun playing with it :) Title: Re: IQ Clouds Post by: 3dickulus on December 08, 2013, 09:06:27 PM not sure if you'll get this eiffie...
recognize the bulb? Title: Re: IQ Clouds Post by: eiffie on December 08, 2013, 10:26:31 PM It is tricky to layer by depth when you use the SoC method because it returns samples from multiple depths so I just make the clouds SoC too:
http://www.youtube.com/watch?v=stszdnYrD2I (http://www.youtube.com/watch?v=stszdnYrD2I) Title: Re: IQ Clouds Post by: 3dickulus on December 09, 2013, 10:06:23 AM :o wow, really nice stuff, that's quite a showcase of SoC, "by George I think you're on to something there" awesome little render engine... take a bow while the crowd cheers! you make my little hacks look so cheesey, but that's a good thing cuz I'm learning :dink: and I'm glad you share these things. :beer: :beer: :beer: :beer: :beer: |