Fractal Terrain 4. Weather, water and distance field objects. HD

Поделиться
HTML-код
  • Опубликовано: 22 сен 2024
  • Watch in full screen HD with headphones for a better experience! : )
    This is rapidly turning into an exploration game!
    The update shows underwater caustics and weather effects, including rain on water and ground.
    No textures used. It's all mathematically generated.
    Also included is a distance field example, which enables mathematical and fractal objects to be included anywhere in the landscape. This gives the possibility of an infinite number of objects all based on a few different fractal definitions.
    These objects are perfectly smooth, and don't need level of detail changes as they are mathematically correct at any distance.
    Also included are some foley and atmospheric sound effects.

Комментарии • 92

  • @TheWinnieston
    @TheWinnieston 12 лет назад +1

    Fractals are mathematical shapes that usually have self-similarity. They are always defined by a function for which you can graph them. More often than not, they require the use of imaginary numbers (any of the powers/multiples of sqrt(-1)). Perhaps the most famous fractal of all is the Mandelbrot set, and it's function is amazingly simple:
    z=z^2+c
    More on fractals and the Mandelbrot set on wikipedia

  • @AuBurnedLime
    @AuBurnedLime 11 лет назад +13

    You guys are semigods. There's a guy who created Space Engine universal sim, I only could wish David and him would communicate and combine their works somehow to create a truly universal beautiful simulator of the whole universe and processed rendering of every world in details David does. That's just a dream, but who knows...

    • @artshield
      @artshield Год назад

      2012... "HD" and 720 and such astronomical... indescribable... magnificence indeed...

  • @DaveHoskinsCG
    @DaveHoskinsCG  11 лет назад

    Thanks! The textures are created with a fractally generated height map, so it's highly unlikely that any two parts are identical. It uses things like flatness and height to determine colour. For example grass only appears below a certain height and when a surface tends to towards facing upwards.

  • @DaveHoskinsCG
    @DaveHoskinsCG  11 лет назад +1

    "Wow amazing dude, just a question, all of that was done only with code?"
    Yes, it only loads a font for graphics. I use samples for audio simply because I wanted it to sound as natural as possible.

  • @GeorgeFosberry
    @GeorgeFosberry 11 лет назад

    I don't have enough words to describe how awesome it is. Now I want to learn how to write stuff like this.

  • @iiiears
    @iiiears 11 лет назад

    In the previous video 3 months ago David Hoskins said:
    "The cut down source code for the latest terrain is now on Shadertoy - search for 'Mountains'"

  • @DaveHoskinsCG
    @DaveHoskinsCG  11 лет назад

    Thank-you for the comment. The landscape is 5 levels of fractal FBM for the polygon verticies and then goes down to level 11 for the pixel resolution. I calculate the height map on the GPU then send it up to the CPU and grab the pixels for converting to vertices. The spider's parts are warped distance fields, which means I can put any distance field object in a stretch cube area, of course they get expensive when up close. The whole thing boots up in 2 seconds! ; )

  • @DaveHoskinsCG
    @DaveHoskinsCG  11 лет назад

    The normal is generated by sampling 3 close points on the height map. This gives you a triangle with which you can calculate the direction of the normal. See 'Shadertoy' for many examples of this with distance fields.

  • @andrewlove9739
    @andrewlove9739 11 лет назад

    Intensely impressive! Very awe-inspiring, loving your work! Keep up everything! Wow!

  • @BohdanKornienko
    @BohdanKornienko 10 лет назад +2

    Amazing! Amazing! Amazing!
    Wonderful!
    How did you do that?
    Can you share what software\framework did you use?

  • @DaveHoskinsCG
    @DaveHoskinsCG  12 лет назад +1

    @Patrick Jackson hello, it's my own work. It runs in real-time, I think at this resolution it averaged at about 120 fps with a GTX-260 card.

  • @marclarell
    @marclarell 12 лет назад

    do you remember that popular video about an unlimited detail graphics engine? This video is like:
    "In yo' face!!"

  • @TepMuHamoP
    @TepMuHamoP 8 лет назад

    Superman simulator, but there is no one to be saved :( , nice job man it's awesome!

  • @DaveHoskinsCG
    @DaveHoskinsCG  11 лет назад

    I don't see why not. Unity has procedural mesh creation, I've seen their examples of it. It could be constrained to a massive island if there's a limit to number ranges.

  • @DaveHoskinsCG
    @DaveHoskinsCG  11 лет назад

    The cut down source code for the latest terrain is now on Shadertoy - search for 'Mountains'

  • @DaveHoskinsCG
    @DaveHoskinsCG  12 лет назад

    Thanks Christian, yes of course you can use it! Please mention that it's all by numbers, and no art package was involved in it's making. ; )

  • @GabrielSperrer
    @GabrielSperrer 10 лет назад

    Hey Dave, I'm just a beginning programmer in DX11, but I have a few questions:
    - If I understood it right, everything is generated random? I so, are your textures 'only' colored pixels?
    - Is the terrain created solved? Or is there every time you restart the programm a completely new world?
    - How are you creating that impressive water? :)
    Greetings,
    Gabriel!
    PS: Sorry for my English, I'm from germany and a little bit tired today ;)

  • @icewolfy1
    @icewolfy1 11 лет назад

    Impressive work! I really enjoyed your videos and they are very inspiring! I'm working on my own terrain engine based on GPU noise (variation of ridged simplex noise) and the results are quite promising! There's one question I'd like to ask you in regards to normal mapping, how are you generating the normal map from a height map? Do you have any blog? Thanks :-)

  • @alexfritz4232
    @alexfritz4232 11 лет назад

    This is very impressive, especially for close up detail when close to the ground, your use of fractals is very tight, I use them myself in my project, and this sort of thing would enhance the closer stuff no end in mine. Now that fractal spider, that's cool !!!, been toying around with that kind of idea myself. I haven't implemented that yet though. I'm very interested in the fractals you use, Simplex as the base I would imagine with a Multifractal as the process, is it all GPU fractals?

  • @hcromwell661
    @hcromwell661 8 лет назад

    Absolutely beautiful. Sweet, sweet math.

  • @user-tu9ox4hj9g
    @user-tu9ox4hj9g 9 лет назад

    You should make the camera able to become closer to terrain so that the terrain scales properly around the camera. This is great, however it looks like miniature mountains. If you can continue to get closer to the terrain with camera and detail still coming about, like trees and grass, that would be amazing.

    • @user-tu9ox4hj9g
      @user-tu9ox4hj9g 9 лет назад

      +Jeremiah HIll To summarize, it appears that the camera is far away from the terrain, even though the camera is close. Could you fix that?

    • @DaveHoskinsCG
      @DaveHoskinsCG  9 лет назад

      +Jeremiah HIll This project was from 3 years ago. Yes, trees would make a human's size clearer. Scale is a subjective thing though. I didn't say these were mountains. There is snow on some of the peaks that only appear to be hundreds of feet high, but, hey, this could be anywhere on any planet!!! :)
      It was only an experiment in fractals.

  • @williammanning7207
    @williammanning7207 9 лет назад +1

    Very cool! What's the basic idea behind terrain color? Is it just a function of height and the derivative of height?

    • @DaveHoskinsCG
      @DaveHoskinsCG  9 лет назад

      William Manning It's mostly height and normals, plus a lot of 2D (horizontal) random variation in colour to show different earth types. To get a strong contrast in the flatter areas the normal is exaggerated in places.
      In short it was a lot of trial and error, plus the time spent looking for nice areas.

  • @Hardts
    @Hardts 12 лет назад

    Thanks David, of course! That's what I find so fascinating.
    I'll send you a pm later with some questions ;)

  • @deviljerome
    @deviljerome 11 лет назад

    wow amazing dude, just a question, all of that was done only with code?

  • @m4r5w0n6
    @m4r5w0n6 10 лет назад +2

    This is the closest thing to real life in a terrain engine I've ever seen. Using pixels as pho-atoms is just another example of the realism of mathematics over hand-made texture art. Once technology catches up a bit, we'll be seeing this in every engine for every purpose. I guarantee it.

    • @Piddus
      @Piddus 3 года назад

      Are you sure?

  • @DaveHoskinsCG
    @DaveHoskinsCG  12 лет назад

    Cheers! It looks like the GT640 M is a mobile/notebook graphics chip. Although it should render something.
    What did it do when you ran it? Did you wait for a while when it ran?
    Also, have you updated your graphics drivers recently?

  • @DaveHoskinsCG
    @DaveHoskinsCG  11 лет назад

    I know! :) I would really like to, and I have the first hour or so of it planned out.
    It'll probably need to work in a game engine like Unity first.

  • @jcfag2
    @jcfag2 12 лет назад

    Amazing work!
    This looks awsome, I would have loved to try it but the executable you give in your other video just doesn't work on my computer (I'm running windows seven, my grafic card is a geforce gt650 M maybe this come from here...), now what you need is trees and you'll have an HD version of minecraft :).

  • @bobbill1589
    @bobbill1589 11 лет назад

    well do you know whether or not your terrain formula works in unity?
    I use unity quite a bit and the terrain system doesnt seem to have opening for things like that, i mean the infinite world part...

  • @jcfag2
    @jcfag2 12 лет назад

    Yeah, I'm on an asus N56V notebook, my graphics drivers should be up to date (I'm gonna check this to be sure), however when I ran it, it didn't even started, I had a black screen for like two seconds and then a windows message telling me "DH_Terrain_2.exe has stopped working."

  • @m04gigdeadmoroz
    @m04gigdeadmoroz 11 лет назад

    Very beautiful!

  • @r3x_747
    @r3x_747 8 лет назад

    Just out of interest, is this method of terrain generation more efficient than the conventional modelling and texture mapping? In summery is the load times and FPS notably faster?

  • @Hardts
    @Hardts 12 лет назад

    Hi David, I'm very impressed by, interrested in your program.
    May I use some of your footage to present the principles in a documentary sort of video, where I explore some of the different terrain generation technologies out there at present?
    Hardts/Christian

  • @I77AGIC
    @I77AGIC 9 лет назад

    well this is amazing! great job

  • @cobrarick780
    @cobrarick780 10 лет назад

    Just wondering, how are you able to get these really realistic/nice-looking colors? I'm working on a terrain generation of my own but its coming to be very unrealistic. Like you I'm not using an textures but yours looking really smooth and blended while mine is jaggedy and stuff because I don't know how I should make it choose colors.

    • @DaveHoskinsCG
      @DaveHoskinsCG  10 лет назад

      Hi, it's hard to explain in a tube comment, but it's basically all to do with the height and angle of each pixel. So greenery fades out after a certain height, and snow appears after a certain height up a mountain. But snow is also dependent on slope angle. Many of the features are closely tied to the angle of the height map at any fractal pixel. The fractal formula is a result of many, many hours fiddling with scales and other fractal numbers.

    • @cobrarick780
      @cobrarick780 10 лет назад

      David Hoskins
      Hmmm... Alright thanks for the explanation. I guess I'll try finding the angle out. Probably the reason it's not too good is because I pretty much build my program in a day. I've added shadow and clouds and fog on the water to mine so it's getting better but I think I'm going to be blocked at a certain point because my computer is slow and it is in Java so OpenGL is slower I believe. As a result I can pretty easily still see the individual squares. Thanks again for the tips.

    • @travistrue4842
      @travistrue4842 9 лет назад

      cobrarick780 David Hoskins If you're writing this in Java+OpenGL, then I can totally understand the performance hits you'll eventually be encountering lol. Have you thought about porting it over to C/C++? If I'm not mistaken, I'm guessing you're using using a texture palette (hopefully a texture array) with texture splatting based on an algorithm that takes each point's elevation and slope angle as control variables. Is this correct? I've only read about this. Haven't gotten into this yet.

    • @cobrarick780
      @cobrarick780 9 лет назад

      Travis True Wow you were exactly correct. I am using Java and OpenGl. At one point I tried to move to C++ and OpenGl but I didn't put that much effort into it and couldn't really figure how to get it setup.

    • @DaveHoskinsCG
      @DaveHoskinsCG  9 лет назад +1

      cobrarick780 You could easily write this is Java, becuase all of the effort is done by the OpenGL shaders.

  • @DaveHoskinsCG
    @DaveHoskinsCG  12 лет назад

    *chuckle* Thanks for that! Yes I've heard of them, can they do lights yet? ; )

  • @SlipOutt
    @SlipOutt 12 лет назад

    Is this based on published works?

  • @rbaleksandar
    @rbaleksandar 9 лет назад

    Neat thought the depth of field you have is a little bit over-exaggerated.

    • @DaveHoskinsCG
      @DaveHoskinsCG  9 лет назад

      rbaleksandar Probably. The depth of field is only used when it's raining, the idea was to make it look more torrential.

  • @iamkrazashell3679
    @iamkrazashell3679 7 лет назад

    +David Hoskins Well it's now 2017 and every game I've seen (thus far) doesn't even compare to the level of graphic godness you have implemented here. My only question.. well maybe 2, lol.. are 1) can this be done in python? and 2) would you make a tutorial on the way to accomplish this awesomeness? If yes to either of these then please let me know I will be an avid student :)
    Again I thank you for creating this and putting it out there for all to enjoy.

    • @DaveHoskinsCG
      @DaveHoskinsCG  7 лет назад +1

      Thanks Tim! It was written in a simple C++ framework, with OpenGL so yes, of course it could be done in Python, most of the work is on the GPU anyway.

    • @iamkrazashell3679
      @iamkrazashell3679 7 лет назад

      +David Hoskins I'm still a novice in Python and have yet to attempt C++. Would you be willing to teach how to accomplish this great work?

    • @DaveHoskinsCG
      @DaveHoskinsCG  7 лет назад

      No I can't, sorry. It would be massive, and I wouldn't know where to start if I wanted to.

    • @iamkrazashell3679
      @iamkrazashell3679 7 лет назад

      I understand. Thank you for the great demo. I hope onday games will be made like this.

  • @Broken1334
    @Broken1334 12 лет назад

    Awesome! When we can download this miracle program?

  • @TheMashina20
    @TheMashina20 11 лет назад

    sir, I'm working in a Unity 3D game project, Is there a way to implement this system or is it independent?
    sorry for my english and thank you for showing this.... really great stuff!

  • @bobbill1589
    @bobbill1589 11 лет назад

    so when are you planning on making the most BA adventure game of all time?

  • @ViscaeleusXtheXGreat
    @ViscaeleusXtheXGreat 10 лет назад

    Nice one!

  • @TheWinnieston
    @TheWinnieston 12 лет назад

    what's the program?

  • @zenmastakilla
    @zenmastakilla 10 лет назад +1

    Is this real life?

  • @TheWinnieston
    @TheWinnieston 12 лет назад

    Could you put the program up for download? :-)

  • @deviljerome
    @deviljerome 11 лет назад

    impressive, imreally interested on learning this kind of 3d via Programming language, there are some webs , books or information where i could begin to learn? thx in avance.

  • @davidsirmons
    @davidsirmons 9 лет назад

    Is there an understructure for gameplay? Setting up characters, animation calls, effects, collision, etc.? I'm trying to get a 3 faction game going in Unity with planet rendering, but have stalled a bit on the programming side. Let me know.

    • @DaveHoskinsCG
      @DaveHoskinsCG  9 лет назад

      If I use Unity's Terrain system then all of Unity's resources and add-ons will be compatible with it. As it's a height map based system, all the collision stuff automatically works- and it's fast.
      What kind of factions are you talking about, and how much of the land do they cover that you can see? Is it a type of political game?

    • @davidsirmons
      @davidsirmons 9 лет назад

      David Hoskins Thanks for the reply. The game style will require a spherical terrain system, which the programmer was working on, but a few things have come up for him recently in private life. The game is all-out super power battles, zero politics. There are tons of political/standard rts games, and I wanted to create something not done before, at least to this level and intensity. They won't cover land so much, as have powers that will reach literally to the heavens. I'm not going to give any more away here, but I've done all the concept art, done modeling and texturing for over a dozen units of the mechanical faction, and the sound designer has done over 200 sounds for one class, which includes many iterations as he went along with my guidance. I'd like to get some strong progress made on this game, but it requires someone as passionate and dedicated as the sound designer and myself.

    • @davidsirmons
      @davidsirmons 9 лет назад

      David Hoskins Have you had a chance to think over the game setup I mentioned? If I can get an email, I can give more information if you're interested.

  • @RynaxAlien
    @RynaxAlien 7 лет назад

    What software and engine you used to create this?

    • @DaveHoskinsCG
      @DaveHoskinsCG  7 лет назад

      It's was written in C++ using OpenGL as the 3D API and FMOD for sound.

  • @monstercameron
    @monstercameron 12 лет назад

    this is really interesting...what are fractals?

  • @tituspinta5093
    @tituspinta5093 11 лет назад

    where can i lern to do something like this?

  • @oreonengine9444
    @oreonengine9444 8 лет назад

    How many fractal stages you use?

    • @DaveHoskinsCG
      @DaveHoskinsCG  8 лет назад +1

      +Curseye3DEngine I think there was about 11 octaves used in this.

  • @ErickXavier
    @ErickXavier 9 лет назад

    What is the Engine you used?

    • @DaveHoskinsCG
      @DaveHoskinsCG  9 лет назад +3

      Erick Xavier I used C++ and OpenGL for this one.

    • @ErickXavier
      @ErickXavier 9 лет назад +1

      It's just awesome, David Hoskins! I would love to put my hands on this code... Would love to migrate it to Unity...

  • @iiiears
    @iiiears 11 лет назад

    Thank You for sharing the code. (Hoping you might add your project to github.)

  • @alanaugusto8768
    @alanaugusto8768 10 лет назад

    your professional work, you use opengl?
    If such uses can draw so much without halting, with vertex Array?
    Could spend the source code?

  • @Psiloable
    @Psiloable 10 лет назад

    You should sell this as an Oculus Rift app when and if the consumer version comes out. Just saying :) Then again, not sure how well it would work on it...

  • @nagakontot1591
    @nagakontot1591 10 лет назад

    can I buy the source code, it looks great!

  • @depthx9784
    @depthx9784 2 года назад

    Excelente, subilo el codiguito al git...

  • @alleycatsphinx
    @alleycatsphinx 10 лет назад

    Hey Dave, what do you do for a living?

    • @DaveHoskinsCG
      @DaveHoskinsCG  10 лет назад

      I sell audio plug-ins via QuikQuak.com. Why?

    • @alleycatsphinx
      @alleycatsphinx 10 лет назад

      I'm creating a company aimed at creating massive virtual worlds, and you're one of the best I know. : )
      We're just getting started on incorporation (though the tech is 2+ years in dev.) so I'm not hiring at the moment, but I was wondering if you might be interested in doing this for a living down the line. I understand if your current work is your sweet spot, though. I'm happy to share a bit more if you're curious.
      We're in SF, by the way; where are you located?

    • @DaveHoskinsCG
      @DaveHoskinsCG  10 лет назад

      That's sounds very interesting, I live 8500Ks away, in sunny England. Not sure if that's a problem.

    • @alleycatsphinx
      @alleycatsphinx 10 лет назад

      David Hoskins Well, that's what contracts can solve. =) There are very few in the world who can do what you do. People have a hard time understanding this all can come out nothing more than x,y pixel coordinates.
      SF isn't so bad, though, if you had ever considered relocating. Our tech allows for this to be editable ala minecraft, but more like clay and shared over the network. I'll share some of what I've been working on once it gets a little further along, and maybe we can swap algorithms. (Though, yours are a bit better than mine, for now at least. ; )

  • @biffrapper
    @biffrapper 9 лет назад

    I want to play. :)

  • @PvPigCreations
    @PvPigCreations 9 лет назад

    I want dat formula

  • @Pixelar
    @Pixelar 5 лет назад

    i am a shape

  • @_zproxy
    @_zproxy Год назад

    2023

  • @DragonsLord76
    @DragonsLord76 10 лет назад

    Нафига размытость заднего плана сделал? Туман и размытость делают исключительно криворучки, чтобы скрыть неспособность движка рисовать вдали (ограничение обзора). У тебя же идеальная картинка до горизонта. Не нужно ничего ухудшать :)

  • @TNIZZLE2424
    @TNIZZLE2424 11 лет назад

    And I thought GTA V looked good...