I generate a high-resolution texture and normal map for each tile, which is where most of the detail comes from. The triangles are really just there to give the outlines shape.
@TristamMacDonald11 жыл бұрын
It's realtime. The fractal generator and the normal map generator both are implemented on the GPU (GLSL shader, with an FBO to render to texture). I don't have it running at the moment, but I believe it took around 4-6 milliseconds per tile.
@jony171012 жыл бұрын
I think it works by interpolation the heights at each point from a lattice of points. This way he can calculate higher resolutions as he zooms in by using the same seed when calculating the hight for the new points.
@as12df1212 жыл бұрын
Oh that's the one I've been using right from the start. The rects are still heavily distorted at the cube corners though. However, I've by now realized that usually you'd use 3D noise for the terrain fractal, essentially rendering the question of distortion mostly irrelevant, and even allowing for alternative sphere tessellations... but thx for the reply anyways ;)
@jony171012 жыл бұрын
That's interesting. I was using the coherent noise library for unity which allows you to calculate to finer detail as and when you need it.
@Recessionist15 жыл бұрын
There's a game in the works right now called "Infinity - The Quest for Earth". It uses procedurally generated planets, nebulas, and even galaxies, all rendered in real time in excellent quality. You should check it out :-)
@TristamMacDonald11 жыл бұрын
It actually does in one part of the video. I have a mode where you freeze the updates to the planet, so that you can zoom out and observe the higher tessellation, but it's just a debug mode.
@as12df1212 жыл бұрын
I have the same question actually. I would assume it's cube mapping. In my experiments I found the mapping distortion of vertices near the former corners of the cube to still be too severe, but I didn't experiment further to see if it would really negatively impact any generated terrain. Seems like a lot of quite good looking projects (including Infinity) use cube mapping for this though, so it's probably usable.
@nazaxprime13 жыл бұрын
@Sourcecode01 Hardly, If I recall correctly 5 months ago they were shopping it around a bit for capital... I could be wrong, but I don't see it going anywhere. There are new'ish uploads on youtube even. "Dont stop Believing, hold on to that feeling!"... @swiftcoder Great work, I look forward to seeing more, thanks.
@TristamMacDonald12 жыл бұрын
There is an improved cube-to-sphere mapping over at the mathproofs blog - check it out some time. It significantly reduces the amount of distortion for corner patches.
@concerned_patient11 жыл бұрын
so when you edit the terrain from above the atmosphere you have to also change that uniform in the below-atmosphere shader also? this looks really great btw, congrats
@concerned_patient11 жыл бұрын
Oh ok I thought that your zoomed out shot showed the high resolution tiles. Thanks for the info!
@TristamMacDonald11 жыл бұрын
No, each tile can be generated independently. At the start I generate only the low-resolution tiles, and as you zoom in, higher and higher-resolution tiles are generated.
@TristamMacDonald12 жыл бұрын
It's actually recalculating the entire terrain every time one modifies the noise generator. The majority of the noise generation happens on the GPU, which is blindingly fast, so the delay isn't too bad - it's still far from interactive though.
@Terran123rd14 жыл бұрын
@swiftcoder I was just wondering, cause I'm a space artist, and this thing would take my art to new heights, as well as I'm planning on making a space mmo during/after college
@TristamMacDonald11 жыл бұрын
The vertex/texture data is the same for both, so it just switches a uniform variable in the shader.
@TristamMacDonald14 жыл бұрын
@SteveDeFacto In the version shown here, the quad-tree is managed entirely CPU side (though the height/normal-maps are generated in a pixel shader). The newer version I am working on moves a bit more to the GPU.
@Expectation24713 жыл бұрын
interestiing... ridge multifractal... i would love to see the formula you used? did you post the code anywhere? i can make very good terrains based on cyclic functions as i did DSP for years and i have tricks to make dunes, ridges, hillocks, rock lines, points, but it is farly cpu intensive so i need to change the sine funciton to another one. how do you manage scaling with the approach? very impressive demo. try porting it to unity you can make some fun games using your work without effort.
@as12df1212 жыл бұрын
Wow, thanks for the answer! Still, I'm curious (if you don't mind answering): how do you deal with the fact that near the cube corners, you essentially get a grid of rhombuses instead a rectangular one? Conceptually, I understand that this is inevitable since there's simply no other way to make the 3 adjacent quads at a cube corner meet... but still, that's some rather heavy distortion on the terrain...
@TristamMacDonald14 жыл бұрын
@gameswindows Running under OpenGL, on a quad-core Phenom II + Radeon 4870HD. At the time this was recorded, only using a single core however.
@concerned_patient11 жыл бұрын
Also (sorry for so many questions) how do you get the terrain to look so detailed from far away (ie above the atmosphere) especially near the coastlines even though there are not many triangles?
@concerned_patient11 жыл бұрын
So at start up don't you have to have the terrain data for a very high resolution already generated in order to create the high resolution normal maps? Or do you just have the above atmosphere ground shader make the maps when you implement it (the shader).
@kevnar13 жыл бұрын
With software this advanced, it's gonna be hard to believe any moon or mars exploration actually happened when they start putting out footage. :-/
@concerned_patient11 жыл бұрын
Since you have a shader for the ground from space and ground from the atmosphere do you have to rerender the terrain upon entering/exiting the atmosphere?
@Lycam13 жыл бұрын
Good work, impressive Its made only with python+pyglet+pyopengl ? Its using culling other than opengl ? How much fps u getting in this demo ? Its possible to improve fps in this demo?
@CaffeinatedGuy15 жыл бұрын
Those Kinks look pretty bad at the moment but it works. If I were you I would spend a few months tweaking the noise functions;). Overall good job sir! Keep rocking it. Looks awesome. Make sure to make a college out of the images when you are done :)
@TristamMacDonald13 жыл бұрын
@Expectation247 Sadly, generating the terrain/textures on the GPU requires render-to-texture, which the free version of Unity doesn't support. Otherwise I would have ported it by now.
@concerned_patient11 жыл бұрын
That is interesting, does the performance suffer much from not loading in lower detailed tiles? So are the normal maps created from a more a detailed output from the multifractal algorithm than the one being applied to the terrain?
@TristamMacDonald13 жыл бұрын
@FireMan24444 Not really - it is procedurally generated each time the program launches.
@TristamMacDonald14 жыл бұрын
@SteveDeFacto Ja, it is just a quad-tree on each face of a cube.
@TristamMacDonald14 жыл бұрын
@xXxDiukexXx undoubtedly. Infinity also has had 4 more years of work put into it ;)
@subspark14 жыл бұрын
The sun needs a massive corona sprite, dude.
@astrixx9 жыл бұрын
How did you implement LOD? Adaptive quadtree?
@TristamMacDonald9 жыл бұрын
+astrixx Yep, 6 adaptive quadtrees arranged in an exploded cube.
@TristamMacDonald12 жыл бұрын
In short, yes, it is a cube-to-sphere mapping.
@TristamMacDonald15 жыл бұрын
The ocean in this video is just solid blue. Since then, I have implemented a deferred renderer, and proper oceans - hopefully be able to record a new video in the next few weeks.
@TristamMacDonald14 жыл бұрын
@stancostin No - ROAM is very obsolete on modern video cards. This uses a very simple form of chunked-LOD.
@thyrampantpigeon12 жыл бұрын
This is the first time I've seen this kind of thing, do you build a planet for a civilization? Or is it solely for creativity?
@gameswindows14 жыл бұрын
Core 2 Duo ? or Nvidia Graphic ? DirectX o OpenGL (I like this)
@TristamMacDonald15 жыл бұрын
That was a a lack of tone-mapping on the final scene - also now corrected.
@莫比-q4r7 жыл бұрын
Hmm correct me if I'm wrong: you are generating heightmaps on the GPU and then feeding that to the CPU to displace vertices ? In that case don't you have to regenerate/delete the heightmap to free GPU memory every time the LOD changes?
@TristamMacDonald7 жыл бұрын
莫比 no, this is a few years ago, and I’d actually implemented the identical procedural algorithms on both the CPU and the GPU. The vertices are placed with the CPU-side generator, a height map is rendered using the GPU-side generator, and then the GPU is used to render a normal map from the height map. It’s something of a miracle that it lines up between the two generators, and I wouldn’t advise this approach anymore. Better to have a static mesh and displace the vertices on the GPU via vertex texture fetch.
@莫比-q4r7 жыл бұрын
Oh ok that clears things up. I'd rather not exclusively rely on vertex shaders because it seems like they can't do jack for physics calculations
@stancostin14 жыл бұрын
are you using ROAM algorithm? or anything like it?
@EmperorLjas13 жыл бұрын
@nazaxprime Infinity is as dead as Lapland on Christmas. The I-Novae developer (inovae_keith) tweeted just yesterday that they're working on a new demo video, and InfinityAdmin has never stopped being active on the forums and saying "it will" instead of "it would have been" when discussing about the game. I'd say there's no reason to believe the game is vaporware yet.
@TristamMacDonald14 жыл бұрын
@Terran123rd Haha! No. I need to start working on it again...
@TristamMacDonald15 жыл бұрын
Ja - I am familiar with Ysaneya's (very impressive) work.
@Terran123rd14 жыл бұрын
Any way to get this thing?
@crticicism12 жыл бұрын
what is this program or game?? :/
@brandonman9415 жыл бұрын
You're to hard on yourself in this video. ;) I was lucky to get particle deposition running a few weeks ago, on a tiny map, with no optimization, at about 10 FPS. This stuff looks horrid with my texture job I did. On the contrare, this is actually an amazing job. I commend you!
@sentrygunner13 жыл бұрын
you should collaborate with the guy whos making infinity the quest for earth and help him out he needs more help so we can get the game earlier
@togmeister86049 жыл бұрын
Hmm, interesting. I'm presuming your using something like OpenGL and your generating a texture using fractals. Then your mapping it to a sphere and then your transforming the spheres polygons to make it have height like this. And are you using some sort of realtime quad-tree. I'd probably generate a sphere use a quad-tree and generate procedural heights and then color it.
@TristamMacDonald9 жыл бұрын
Togmeister It uses an exploded quad-tree. Look at the wireframe (towards the middle of the video).
@togmeister86049 жыл бұрын
Tristam MacDonald Ah.
@FireMan2444413 жыл бұрын
Can you give my your's hightmap ?
@concerned_patient11 жыл бұрын
Ah I see. So does this mean terrain generation is not happening in real time?
@deniszh661511 жыл бұрын
What is this program?
@TristamMacDonald14 жыл бұрын
@SteveDeFacto Ja, I am.
@GeeCeeAte12 жыл бұрын
why would you waste your time on unity?? Its like learning a program that NO studios are ever going to use. This work, is WAY above unity standards
@Sourcecode0113 жыл бұрын
@swiftcoder sadly infinity is looking like it's dead :(~
@GeeCeeAte12 жыл бұрын
pretty sure ive been in the industry for over 10 years now. thanks though. keep playing with your broken toys.
@gameswindows14 жыл бұрын
Impresive =) i habe only core 2 duo 7500 haha. I have to play it wrong. Quad Core costs three times more money. your computer is very powerful
@TheDunhagen12 жыл бұрын
I see a SimLife Remake....
@4chukwuebuka15 жыл бұрын
thnx for da info.
@TristamMacDonald14 жыл бұрын
@sdtuu That and a *really* crappy microphone ;)
@Expectation24712 жыл бұрын
yeah unity boosts productivity for noobs, many people make thousands and some make tens of thousands from it, you could make something like angry birds on it in a couple of weeks for 5 platforms, thatss why people waste time on it. graphics quality isnt the reason why most games are played or remembered.
@TristamMacDonald15 жыл бұрын
I am afraid that my 'engine' doesn't exist - at least not in a form you could use. At the moment all it does is render planets ;)
@nazaxprime13 жыл бұрын
Dude, you need an "S" filter on your MIC.
@4chukwuebuka15 жыл бұрын
what in the world? dude you did not answer my question. i said can you plz tell me where i can get a planet render. sorry for the "hoe" word i mistyped, what you don't forgive ppl? now tell me where to get them.
@JasonSmithDuhmeister14 жыл бұрын
Wheres the FUCKIN CLOUDS!!!!!
@TristamMacDonald15 жыл бұрын
That is what I am trying to tell you - you don't. Planet renderers don't exist. I have a partially complete one (shown here), Ysaneya has a better one, Sean O'Neil has one that is a little dated As far as I know, those are all the real-time planet renderers in existence...
@SPIKEZANDSTUFF12 жыл бұрын
Sadly, you have no clue what you are on about. There are many games that for example, are on steam which have been produced with unity. the unity platform is going to grow and grow because it is easy to use and in most cases free.