Logo by Trifox - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Did you know ? you can use LaTex inside Postings on fractalforums.com!
 
*
Welcome, Guest. Please login or register. April 25, 2024, 07:13:42 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: IQ Clouds  (Read 2947 times)
Description: getting into clouds code by Inigo Quilez
0 Members and 1 Guest are viewing this topic.
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« 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!

<a href="http://vimeo.com/moogaloop.swf?clip_id=79580377" target="_blank">http://vimeo.com/moogaloop.swf?clip_id=79580377</a>
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #1 on: November 17, 2013, 08:51:49 AM »

I rate your short animation highly. Flows along beautifully. smiley smiley smiley
Logged
eiffie
Guest
« Reply #2 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).
Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #3 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

<a href="http://vimeo.com/moogaloop.swf?clip_id=79613106" target="_blank">http://vimeo.com/moogaloop.swf?clip_id=79613106</a>

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  wink

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)) +
(MaxDistance * minDist / (minDist - MaxDistance)) /
clamp(totalDist/length(dir), minDist, MaxDistance));

// cloud occlusion ??
return mix(hitColor,cloudColor,1.0-gl_FragDepth);

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 cheesy

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  A Beer Cup

Edit: don't need depth for clouds as we have depth for everything else wink
« Last Edit: November 18, 2013, 05:56:52 AM by 3dickulus » Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #4 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 sad
SubBlue undecided
Soft smiley
Path smiley
NODE sad
IBL smiley
Fast smiley
X smiley
DE smiley
DE v0.9.1 smiley
DE v0.9.10 smiley

testing was just preliminary not extensive.
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Kali
Fractal Supremo
*****
Posts: 1138


« Reply #5 on: November 18, 2013, 07:17:33 AM »

Well done!  A Beer Cup
Logged

3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #6 on: November 18, 2013, 09:19:25 PM »

Tnx  smiley
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.
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #7 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.

<a href="http://vimeo.com/moogaloop.swf?clip_id=80248121" target="_blank">http://vimeo.com/moogaloop.swf?clip_id=80248121</a>

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  smiley
« Last Edit: November 28, 2013, 10:39:37 AM by 3dickulus, Reason: fudge » Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #8 on: December 08, 2013, 09:06:27 PM »

not sure if you'll get this eiffie...

recognize the bulb?


* SoClouds.mpg (179.23 KB - downloaded 176 times.)
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
eiffie
Guest
« Reply #9 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:
<a href="http://www.youtube.com/v/stszdnYrD2I&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/stszdnYrD2I&rel=1&fs=1&hd=1</a>
Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #10 on: December 09, 2013, 10:06:23 AM »

 shocked 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  wink and I'm glad you share these things.

 A Beer Cup A Beer Cup A Beer Cup A Beer Cup A Beer Cup
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Mandala of Sun & Clouds Images Showcase (Rate My Fractal) Kali 0 1392 Last post March 25, 2011, 04:03:45 AM
by Kali
Dark clouds Images Showcase (Rate My Fractal) thargor6 0 670 Last post May 30, 2012, 12:24:02 AM
by thargor6
3D Kaliset as fog/mist/clouds 3D Fractal Generation Kali 12 5713 Last post January 25, 2013, 09:40:08 PM
by LMarkoya
Castle in the Clouds Fractal Science Kit Gallery Ross Hilbert 0 731 Last post February 17, 2015, 08:44:10 PM
by Ross Hilbert
Watching clouds Kalles Fraktaler Gallery TheRedshiftRider 0 465 Last post July 13, 2015, 05:59:55 PM
by TheRedshiftRider

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.21 seconds with 25 queries. (Pretty URLs adds 0.024s, 2q)