• zozuar Profile Picture

    yonatan @zozuar

    2 years ago

    for(float e,i,a,w,x,g,h;i++<90.;o+=.01-.02/exp(max(s,e)*3e3)/h){vec3 p=vec3((FC.xy-.5*r)/r.y*g+2.,g);p.zy*=rotate2D(.5);e=p.y;h=e+p.x*.3;p.z+=t;for(a=.6;a>.001;a*=.7)p.xz*=rotate2D(5.),x=(p.x+p.z)/a+t+t,e-=w=exp(sin(x)-3.)*a,h+=abs(dot(sin(p.xz/a*.3)*a,r/r));g+=e=min(e,h*.5-1.);}

    176 2K 17K 3.1M 7K
    Download Video
  • zozuar Profile Picture

    yonatan @zozuar

    2 years ago

    twigl.app/?ol=true&ss=-N…

    4 19 384 176K 237
  • calvinducharme Profile Picture

    Calvin @calvinducharme

    2 years ago

    @zozuar bro generated earth

    2 2 747 59K 2
  • dabidoYT Profile Picture

    Dabi (Dr David Liu) @dabidoYT

    2 years ago

    In case anyone was wondering, I asked ChatGPT to figure out why it looks so cool. === Certainly, let's dissect specific parts of the code and correlate them with natural phenomena: 1. **Coordinate Transformation and Perspective**: - `vec3 p=vec3((FC.xy-.5*r)/r.y*g+2.,g);` - This part is setting up the initial position `p` in a 3D space. The transformation `(FC.xy-.5*r)/r.y*g+2.` adjusts the fragment coordinates (`FC.xy`) based on the aspect ratio (`r`), zoom level (`g`), and centers the view. This doesn't directly create natural features but establishes the "camera" perspective from which the natural landscape (mountains and ocean) will be viewed. 2. **Rotation for Variation**: - `p.zy*=rotate2D(.5);` - Applying a 2D rotation to the `z` and `y` components of `p` introduces variation in the terrain's elevation and orientation, contributing to a more natural, less uniform appearance. This mimics how in nature, landforms are not perfectly aligned or uniform but have varied orientations and angles. 3. **Iterative Detailing with Fractal-like Patterns**: - `for(a=.6;a>.001;a*=.7)p.xz*=rotate2D(5.), x=(p.x+p.z)/a+t+t, e-=w=exp(sin(x)-3.)*a` - The loop reduces `a` progressively, adding details at smaller scales, which is a fractal-like approach. Each iteration applies a rotation (`rotate2D(5.)`) to `x` and `z` components, introducing more variation and complexity akin to natural ruggedness in terrain. The expression `exp(sin(x)-3.)*a` modifies the elevation `e`, creating wave-like or undulating patterns similar to mountainous regions or ocean waves. 4. **Noise-like Variation and Complexity**: - `h+=abs(dot(sin(p.xz/a*.3)*a, r/r));` - This line introduces additional complexity to the height `h` by using a sine function on scaled and rotated coordinates, which can create patterns reminiscent of natural noise (similar to Perlin noise but more simplistic). The `dot` product with `r/r` (a normalized vector) and the use of `abs` function ensure that the modifications contribute positively to the height, adding peaks and troughs that resemble natural landforms. 5. **Dynamic Elevation Adjustment**: - `g+=e=min(e,h*.5-1.);` - This part dynamically adjusts the elevation `e` by comparing it with a modified version of `h` (`h*.5-1.`) and choosing the minimum. This adjustment can create sharp transitions and cliffs, akin to how erosion and tectonic movements create sharp features in mountains. 6. **Final Accumulation for Rendering**: - `o+=.01-.02/exp(max(s,e)*3e3)/h;` - This line likely contributes to the final color or intensity of the pixel (`o`), which could be related to the height or depth of the terrain at that point. The use of `exp` and division by `h` suggests that higher regions might be rendered differently from lower ones, simulating how lighting and atmosphere affect the appearance of natural landscapes from a distance. Each piece of this code snippet contributes to creating a visual that mimics natural terrains, through iterative detailing, noise-like variations, dynamic elevation adjustments, and perspective transformations, all of which are essential techniques in procedural terrain generation. ===

    14 34 560 121K 278
  • raffareis Profile Picture

    Rafael Reis @raffareis

    2 years ago

    @zozuar Here is the same code, with improved readability

    raffareis tweet picture

    6 17 613 25K 122
    Download Image
  • TheToddRoy Profile Picture

    Todd Roy @TheToddRoy

    2 years ago

    @zozuar I typed something similar once, when I fell asleep on my keyboard

    2 3 625 75K 4
  • amaldorai Profile Picture

    Amal Dorai @amaldorai

    2 years ago

    @zozuar Can you explain how this “works,” ie how the various parts of this work together to create the output?

    6 1 150 140K 90
  • AndrewHartAR Profile Picture

    Andrew Hart @AndrewHartAR

    2 years ago

    @zozuar “Intro to ML”

    1 0 10 12K 0
  • adam_x_mentis Profile Picture

    Mentis 🇦🇺 @adam_x_mentis

    2 years ago

    @zozuar This is amazing. 👌🏼🙏🏼💜🔥

    1 0 2 19K 0
  • flockaroo Profile Picture

    Florian Berger @flockaroo

    2 years ago

    @zozuar huh! ...would already be incredible without the water ;-)

    0 0 2 2K 0
  • tomthecarrot Profile Picture

    Thomas Suarez @tomthecarrot

    2 years ago

    @zozuar Math is art

    0 0 1 530 0
  • laurogripa Profile Picture

    Lauro Gripa @laurogripa

    2 years ago

    @zozuar That’s one of the best ones I’ve seen so far, hauntingly amazing

    0 0 0 427 0
  • LeeLeepenkman Profile Picture

    Lee Penkman @LeeLeepenkman

    2 years ago

    @zozuar beautiful!

    0 0 0 379 0
  • Lirographe Profile Picture

    Lirographe @Lirographe

    2 years ago

    @zozuar cc @pircasa

    0 0 0 97 0
  • nisheink Profile Picture

    Nishe 光 @nisheink

    2 years ago

    @zozuar Incredibly captivating !

    0 0 0 1K 0
  • petesena Profile Picture

    Pete Sena @petesena

    2 years ago

    @zozuar 🤩 epic

    0 0 0 3K 0
  • vishyfishy2 Profile Picture

    f1shy-dev @vishyfishy2

    2 years ago

    @zozuar how the

    0 0 0 133 1
  • NotLikeMonopoly Profile Picture

    Not LIke Monopoly - Integral and Dynamic Component @NotLikeMonopoly

    2 years ago

    @zozuar @Uus_it @gregeganSF

    0 0 0 50 0
  • plasm0 Profile Picture

    ρŁ𝐀𝔰Mʘ @plasm0

    2 years ago

    @zozuar exactly!

    0 0 0 2K 0
  • edusnahro Profile Picture

    edus @edusnahro

    2 years ago

    @zozuar omg

    0 0 0 3K 0
  • zkMake Profile Picture

    Zubin Khavarian @zkMake

    2 years ago

    @zozuar 🤯 when you see stuff like this, one tends to think that all of reality is just a manifestation of a mathematical formula

    4 3 54 11K 2
  • Edmond_J_ Profile Picture

    EJ @Edmond_J_

    2 years ago

    is this anything close to the supplied function: for(float elevation, iteration, scale, waveHeight, positionModifier, globalOffset, horizontalDisplacement; iteration++ < 90.; offsetIncrement += .01 - .02 / exp(max(scale, elevation) * 3000.) / horizontalDisplacement) { vec3 point = vec3((frameCoordinates.xy - .5 * resolution) / resolution.y * globalOffset + 2., globalOffset); point.zy *= rotate2D(.5); elevation = point.y; horizontalDisplacement = elevation + point.x * .3; point.z += time; // Assuming 't' is a time variable for(scale = .6; scale > .001; scale *= .7) { point.xz *= rotate2D(5.); positionModifier = (point.x + point.z) / scale + time + time; elevation -= waveHeight = exp(sin(positionModifier) - 3.) * scale; horizontalDisplacement += abs(dot(sin(point.xz / scale * .3) * scale, resolution / resolution)); } globalOffset += elevation = min(elevation, horizontalDisplacement * .5 - 1.); }

    0 2 37 55K 28
  • remusrisnov Profile Picture

    Remus @remusrisnov

    2 years ago

    @zozuar Where do you input the above to get the output below?

    4 0 34 65K 24
  • nbrempel Profile Picture

    Nick Rempel @nbrempel

    2 years ago

    @zozuar Where do you even start?

    1 0 31 40K 1
  • mcgroarty Profile Picture

    McGroarty @mcgroarty

    2 years ago

    @zozuar ShaderToy has a ton of other fun real time renders: shadertoy.com/view/ldXXDj

    0 2 25 13K 16
  • ToldFable Profile Picture

    fable @ToldFable

    2 years ago

    @zozuar If you like this, Google “Dwitter”

    0 0 29 16K 11
  • pappapez Profile Picture

    Peter Strömberg aka PEZ @pappapez

    2 years ago

    @zozuar Haha, so fun to just play with some constants in that code. I got more snow on the rocks with one tiny change. Thanks for sharing!

    0 0 27 27K 4
  • HexaField Profile Picture

    HexaField @HexaField

    2 years ago

    @zozuar everything is a function. always has been.

    0 4 13 4K 0
  • robin_knight Profile Picture

    Robin Knight @robin_knight

    2 years ago

    @zozuar Nice. It would be really nice if LaTeX and code sections would be support on X @elonmusk . Maybe similar to markdown?

    0 0 12 4K 1
  • MakotoIchinose6 Profile Picture

    IchinoseP // NO POLITICS @MakotoIchinose6

    2 years ago

    @zozuar To fit all of those minified shader code into precisely 280 characters, and get a what seems to be depth based noise landscape and water... It's wild

    0 0 10 2K 1
  • AviatorJordan Profile Picture

    Michael Jordan @AviatorJordan

    2 years ago

    @zozuar We can use GLSL directly in an X post!? Damn... that's cool.

    AviatorJordan tweet picture

    0 0 8 4K 3
    Download Image
  • emnode Profile Picture

    emily @emnode

    2 years ago

    @zozuar This is where I'm from

    1 0 6 648 0
  • Chuck_Petras Profile Picture

    Chuck Petras @Chuck_Petras

    2 years ago

    @zozuar @BrianRoemmele

    0 0 6 7K 0
  • jacynevermind Profile Picture

    meriç @jacynevermind

    2 years ago

    @zozuar @rauchg

    jacynevermind tweet picture

    0 0 5 619 1
    Download Image
  • _eMaX_ Profile Picture

    Grzegorz Brzęczyszczykiewicz 🐀 @_eMaX_

    2 years ago

    @zozuar Hey. Mind Slartibartfast's patent here. You could at least have quoted him.

    0 0 5 8K 1
  • martyngarcia_ Profile Picture

    martyn ⏩ @martyngarcia_

    2 years ago

    @zozuar This but for qualia.

    0 0 5 5K 0
  • ToddNorthrop Profile Picture

    Todd Northrop @ToddNorthrop

    2 years ago

    @zozuar can you post unminified?

    2 0 4 5K 2
  • Download Image
    • Privacy
    • Term and Conditions
    • About
    • Contact Us
    • TwStalker is not affiliated with X™. All Rights Reserved. 2024 www.instalker.org

    twitter web viewer x profile viewer bayigram.com instagram takipçi satın al instagram takipçi hilesi twitter takipçi satın al tiktok takipçi satın al tiktok beğeni satın al tiktok izlenme satın al beğeni satın al instagram beğeni satın al youtube abone satın al youtube izlenme satın al sosyalgram takipçi satın al instagram ücretsiz takipçi twitter takipçi satın al tiktok takipçi satın al tiktok beğeni satın al tiktok izlenme satın al beğeni satın al instagram beğeni satın al youtube abone satın al youtube izlenme satın al metin2 metin2 wiki metin2 ep metin2 dragon coins metin2 forum metin2 board popigram instagram takipçi satın al takipçi hilesi twitter takipçi satın al tiktok takipçi satın al tiktok beğeni satın al tiktok izlenme satın al beğeni satın al instagram beğeni satın al youtube abone satın al youtube izlenme satın al buyfans buy instagram followers buy instagram likes buy instagram views buy tiktok followers buy tiktok likes buy tiktok views buy twitter followers buy telegram members Buy Youtube Subscribers Buy Youtube Views Buy Youtube Likes forstalk postegro web postegro x profile viewer