POV-Ray : Newsgroups : povray.text.scene-files : Ridged Multifractal Planet Server Time
28 Apr 2024 18:08:19 EDT (-0400)
  Ridged Multifractal Planet (Message 1 to 5 of 5)  
From: Samuel B 
Subject: Ridged Multifractal Planet
Date: 7 Oct 2023 16:00:00
Message: <web.6521b8508c5c46f716bed5696e741498@news.povray.org>
/*
 RidgedMFPlanetB.pov

 2023 Sam Benge

 Inspired by:

https://old.reddit.com/r/proceduralgeneration/comments/16y8rnz/the_wonderful_worlds_of_procedural_generation_100/

 Recommended command line options:
  +fn +f +a0.03 +am2 +r2 +w1920 +h1080

 Note: for some reason the cloud layer enhances the planet's surface normal, so
the
 planet's surface normal amount will need to be doubled when not rendering the
clouds.
*/

#version 3.7;

global_settings{ assumed_gamma 1.0 }

#default{ finish{ambient 0} }

#include "functions.inc"

camera{
 orthographic
 right x*1.77 up y
 //right x up y
 location <0, 0, -10>
 look_at <.15, .8, 0>
 angle 10
}

// sunlight
light_source{
 <1, .7, .5>*1e5, 2 * <2, 1.95, 1.9>
 #if(1)
  #declare ALRes = 2;
  #declare ALSize = .1 * 1e5;
  area_light x*ALSize, z*ALSize, ALRes, ALRes
  jitter
  adaptive 1
  area_illumination
 #end
}

// planet
#if(1)

 sphere{
  0, 1

  // first multifractal
  #local FRidged1 =
   function{
    pattern{
     function{
      f_ridged_mf(
       x, y, z,
       0.61, // H
       2.2, // Lacunarity
       15,  // Octaves
       0.42, // Offset
       90.0, // Gain
       2
      )
      }
      warp{turbulence .15 lambda 3}
     }
   }

  // second multifractal
  #local FRidged2 =
   function{
    pattern{
     function{
      f_ridged_mf(
       x, y, z,
       0.54, // H
       1.42, // Lacunarity
       15,  // Octaves
       0.3, // Offset
       100, // Gain
       2
      )
      }
      warp{turbulence .25 lambda 3 octaves 7}
      translate z*20
     }
   }

  // combine multifractals
  #local FRidged =
   function{
    min(
     FRidged1(x, y, z)
     + .02,

     #local Scale = 1;
     .03 + 1.44 * FRidged2(x*Scale, y*Scale, z*Scale)
    )
   }

  // planet texture
  texture{

   pigment{
     function{FRidged(x, y, z)}
     color_map{
      [0 rgb .025]
      [1 rgb <.8, .7, .5>]
     }
    }

    normal{
     function{FRidged(x, y, z)}
     .075/2
     accuracy .001/3
    }

    finish{diffuse 1}

    // adjustment
    scale .75
    translate 25*x

  }

  hollow
 }

#end // /planet

// clouds
#if(1)

 #local CloudHeight = 0.002;

 sphere{
  0, 1+CloudHeight

  // for cloud detail
  #local FGranite = function{pattern{granite scale .1}}

  // main clouds shape
  #local FRidged3 =
   function{
    pattern{
     function{
      max(
       0,
       min(
        1,
        f_ridged_mf(
         x, y, z,
         0.53, // H
         1.72, // Lacunarity
         15,  // Octaves
         -.16, // Offset
         15.0, // Gain
         2
        )
        - .3
       )
      )
      }
      scale 3
      warp{turbulence .5 lambda 1.5}
      scale 1
     }
   }

  // combine cloud shape with sine details
  #local FClouds =
   function{
    max(
     0,
     min(
      1,
      2 * FRidged3(x, y, z)
      - .5
      + .125*FGranite(x, y, z)
      + .25*FGranite(x*3, y*3, z*3)
     )
    )
   }

  // clouds texture
  texture{

   pigment{
     //function{FRidged3(x, y, z)}
     function{FClouds(x, y, z)}
     poly_wave 2
     color_map{
      [.2 rgbt 1]
      [1 rgb 1 transmit .65]
     }
    }

    normal{
     function{FRidged3(x, y, z)}
     .02
     accuracy .0025
    }

    finish{diffuse .6 brilliance .5}

    // adjustment
    translate 9*z
    scale .35
  }

  hollow
 }

#end // /clouds

// atmosphere
#if(1)

 #local SkyRGB     = <.2, .5, 1>;
 #local SkyThickness  = .007;
 #local SkyScattering = 30000;
 #local SkyAbsorption = 120000;

 sphere{
  0, 1+SkyThickness
  pigment{rgbt 1}
  interior{
   media{
    scattering{5, SkyRGB*SkyScattering}
    absorption SkyRGB*SkyAbsorption
    intervals 1
    samples 1, 1
    jitter .2
    density{
     spherical
     poly_wave 2
     scale 1+SkyThickness
    }
   }
  }
  hollow
 }

#end // /atmosphere


Post a reply to this message

From: Khelito
Subject: Re: Ridged Multifractal Planet
Date: 24 Oct 2023 06:25:00
Message: <web.65379a8d38ad654ab810f357eef557e0@news.povray.org>
That's nice !
I saw a lot of things I did't understand at first

I did not know about f_ridged_mf

I kinda wish you added oceans. But then you may need to use iso surfaces, no ?

Or just a clipping in low f_ridged_mf value ?


Post a reply to this message


Attachments:
Download 'planet.png' (1059 KB)

Preview of image 'planet.png'
planet.png


 

From: Thomas de Groot
Subject: Re: Ridged Multifractal Planet
Date: 24 Oct 2023 10:39:39
Message: <6537d72b@news.povray.org>
Op 24-10-2023 om 12:22 schreef Khelito:
> That's nice !
> I saw a lot of things I did't understand at first
> 
> I did not know about f_ridged_mf
> 
> I kinda wish you added oceans. But then you may need to use iso surfaces, no ?
> 
> Or just a clipping in low f_ridged_mf value ?
> 

Edit the texture map... and presto! :-)

-- 
Thomas


Post a reply to this message


Attachments:
Download 'sb_ridgedmfplanetb_3.jpg' (265 KB)

Preview of image 'sb_ridgedmfplanetb_3.jpg'
sb_ridgedmfplanetb_3.jpg


 

From: Samuel B 
Subject: Re: Ridged Multifractal Planet
Date: 15 Nov 2023 20:40:00
Message: <web.6555725d38ad654a16bed5696e741498@news.povray.org>
"Khelito" <nomail@nomail> wrote:
> That's nice !
> I saw a lot of things I did't understand at first
>
> I did not know about f_ridged_mf
>
> I kinda wish you added oceans. But then you may need to use iso surfaces, no ?
>
> Or just a clipping in low f_ridged_mf value ?

Thanks, Khelito. No need for isosurfaces, as a lot can be done with surface
stuff as Thomas demonstrated.

Sam


Post a reply to this message

From: Samuel B 
Subject: Re: Ridged Multifractal Planet
Date: 15 Nov 2023 20:40:00
Message: <web.655572ed38ad654a16bed5696e741498@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> Op 24-10-2023 om 12:22 schreef Khelito:
> > That's nice !
> > I saw a lot of things I did't understand at first
> >
> > I did not know about f_ridged_mf
> >
> > I kinda wish you added oceans. But then you may need to use iso surfaces, no ?
> >
> > Or just a clipping in low f_ridged_mf value ?
> >
>
> Edit the texture map... and presto! :-)
>
> --
> Thomas

Looks pretty good, Thomas! If we keep pumping plant food into our atmosphere,
maybe we'll have one as green as it someday ;)

Sam


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.