Making these recordings feels a bit weird. I love talking to real audiences, but this feels more like leaving a message in someone's answering machine.
Following one man's task of building a virtual world from the comfort of his pajamas. Discusses Procedural Terrain, Vegetation and Architecture generation. Also OpenCL, Voxels and Computer Graphics in general.
Showing posts with label VoxelFarm Realtime. Show all posts
Showing posts with label VoxelFarm Realtime. Show all posts
Sunday, April 28, 2013
Video Update for April 2013
An update about clouds and a surprise topic for the second part.
Making these recordings feels a bit weird. I love talking to real audiences, but this feels more like leaving a message in someone's answering machine.
Making these recordings feels a bit weird. I love talking to real audiences, but this feels more like leaving a message in someone's answering machine.
Wednesday, April 24, 2013
The Unity plugin is looking good!
Here is an update on the Unity front. Let's see if a screenshot is worth a thousand words:
This is the same terrain generation you see in other screenshots and videos I have posted. This image in particular was not created by me, but by some very talented guys who took the Voxel Farm engine and are using it from Unity.
The sky and clouds in the screenshot is a box with a static image on it, it is not related to the clouds and sky streak of posts I had earlier. The thing is, once you are in Unity there are several plugins that will do real-time skies for you. Actually there are plugins that will do real-time anything for you. That is the point. We are hoping to become another one.
This is the same terrain generation you see in other screenshots and videos I have posted. This image in particular was not created by me, but by some very talented guys who took the Voxel Farm engine and are using it from Unity.
The sky and clouds in the screenshot is a box with a static image on it, it is not related to the clouds and sky streak of posts I had earlier. The thing is, once you are in Unity there are several plugins that will do real-time skies for you. Actually there are plugins that will do real-time anything for you. That is the point. We are hoping to become another one.
Monday, April 15, 2013
Some Clouds
Clouds come in many forms. When it comes to generating them it seems there is no silver bullet method. Part of the problem is we call clouds to just one aspect of a more general process: water particles suspended in air. This could also be fog, or the misty breath coming out of trees and plants in a jungle. This is what the initiated in this occult science call "The Participating Media".
I decided to tackle this problem by having different layers working together. Which layer to do first? Even in the highest places in Earth, it is likely to find a layer of clouds over your head. I did some experiments over the weekend on how this particular layer could be rendered.
Here are a couple of early screenshots for your consideration:
It is a very simple and fast method that allows clouds to animate and evolve over time. You can go from a clear sky to a very cloudy one as well. It takes into account the sun's position and does some basic scattering and self shadowing.
These clouds are rendered in the same skydome that performs the day-night cycle, so they do not add any new geometry. This is also the problem with this method: This is a flat layer. There is the impression of volume thanks to how the light is computed, and this trick holds as long as the clouds do not move too fast. If you make them sprint over your head it becomes obvious it is a flat layer. You cannot also come too close to these clouds, that also kills the illusion.
For what it does, I think the method is quite neat, especially if you don't have much GPU cycles to spend in clouds. It does not use any textures or any other resources. This is 100% GPU so it would run nicely in demos or WebGL frames. I think it deserves a future technical post on its own, that of course assuming you guys like how they look.
Let me know what you think by dropping a comment.
I decided to tackle this problem by having different layers working together. Which layer to do first? Even in the highest places in Earth, it is likely to find a layer of clouds over your head. I did some experiments over the weekend on how this particular layer could be rendered.
Here are a couple of early screenshots for your consideration:
It is a very simple and fast method that allows clouds to animate and evolve over time. You can go from a clear sky to a very cloudy one as well. It takes into account the sun's position and does some basic scattering and self shadowing.
These clouds are rendered in the same skydome that performs the day-night cycle, so they do not add any new geometry. This is also the problem with this method: This is a flat layer. There is the impression of volume thanks to how the light is computed, and this trick holds as long as the clouds do not move too fast. If you make them sprint over your head it becomes obvious it is a flat layer. You cannot also come too close to these clouds, that also kills the illusion.
For what it does, I think the method is quite neat, especially if you don't have much GPU cycles to spend in clouds. It does not use any textures or any other resources. This is 100% GPU so it would run nicely in demos or WebGL frames. I think it deserves a future technical post on its own, that of course assuming you guys like how they look.
Let me know what you think by dropping a comment.
Wednesday, April 10, 2013
The sun rises in ProcWorld, again
Last week I posted some early screenshots of the nigh-day cycle. There was a lot going wrong in them and you guys were very helpful in pointing out solutions.
I did another iteration on this, while not everything is as it should, I think there was some improvement. This time I have captured a video. The transitions are better appreciated like this. Again let me know what you think.
The main issues with the previous iteration were the brightness of the sky (or lack of it), and how the distant features failed to blend with the sky. This time I made sure there was enough atmosphere so more light was trapped between the horizon and the eye. The distance to the sky is also consistent with the terrain dimensions, now the colors in terrain and sky match better.
A few comments in the previous post suggested a different method called "Precomputed Atmospheric Scattering". It certainly produces better results than the method I am using here, which is the one from O'Neil in GPU Gems 2.
I had a quick look at the method and saw that in its vanilla form it could run slower than what I have now. While the method uses precomputed tables as textures to accelerate rendering, all the work is done in the fragment shader. That means every pixel on screen now had to perform two or three additional texture fetches.
The method from O'Neil does all the heavy lifting in the vertex shader. Consider this scene:
The main issues with the previous iteration were the brightness of the sky (or lack of it), and how the distant features failed to blend with the sky. This time I made sure there was enough atmosphere so more light was trapped between the horizon and the eye. The distance to the sky is also consistent with the terrain dimensions, now the colors in terrain and sky match better.
A few comments in the previous post suggested a different method called "Precomputed Atmospheric Scattering". It certainly produces better results than the method I am using here, which is the one from O'Neil in GPU Gems 2.
I had a quick look at the method and saw that in its vanilla form it could run slower than what I have now. While the method uses precomputed tables as textures to accelerate rendering, all the work is done in the fragment shader. That means every pixel on screen now had to perform two or three additional texture fetches.
The method from O'Neil does all the heavy lifting in the vertex shader. Consider this scene:
The sky, even if it appears softly shaded, has only a few vertices:
I think in this case it makes a big difference.
The precomputed method could also run in the vertex shader, but then it would take some time to port the tables, which now are in pixel formats that cannot be read by the vertex shader.
Of course there is a chance I am reading this wrong. If you have worked in this area before and see what I am missing please let me know.
Wednesday, April 3, 2013
The sun rises in ProcWorld
So I finally added some proper light scattering to the sky atmosphere in the realtime demo.
I am using the classic approach devised by O'Neil, which produces great results but it is also very sensitive to any change in the input parameters. A lot of tweaking is still required.
Here is a series of shots, keep in mind this is a work in progress but any early comments surely will help.
I am using the classic approach devised by O'Neil, which produces great results but it is also very sensitive to any change in the input parameters. A lot of tweaking is still required.
Here is a series of shots, keep in mind this is a work in progress but any early comments surely will help.
Saturday, March 30, 2013
Network Update
Here is a new video I recently captured. It shows the networking and storage components in action.
When it comes to networking this is the smallest test possible, you cannot really go below two connected clients. I have tested this same server code with nearly a hundred clients performing queries and changes at rates many times higher than what humans would do. Network tests are good at showing why some stuff does not work. But when the results are good it does not really mean anything. The real network is so complex you cannot replace it by any model. In this case results are as good as any network test can be at this stage. There is very little overhead from the thread and connection management, which is what I was looking for.
While this is good news and by all means necessary, the real bottleneck comes from how any application using this engine chooses to store and process information. So again what you are seeing here is just a brick. You could create many different houses with it.
You could do it like Minecraft servers do, have everything including procedural generation run in the server. You could do like this particular demo does, where user-created content is stored in a server and everything else remains client-side. And you could have solutions in-between, for instance have some custom server-side generation which is merged later with the rest of the client-side generation.
This is a fascinating subject to me, I will be covering some of these approaches in the future.
When it comes to networking this is the smallest test possible, you cannot really go below two connected clients. I have tested this same server code with nearly a hundred clients performing queries and changes at rates many times higher than what humans would do. Network tests are good at showing why some stuff does not work. But when the results are good it does not really mean anything. The real network is so complex you cannot replace it by any model. In this case results are as good as any network test can be at this stage. There is very little overhead from the thread and connection management, which is what I was looking for.
While this is good news and by all means necessary, the real bottleneck comes from how any application using this engine chooses to store and process information. So again what you are seeing here is just a brick. You could create many different houses with it.
You could do it like Minecraft servers do, have everything including procedural generation run in the server. You could do like this particular demo does, where user-created content is stored in a server and everything else remains client-side. And you could have solutions in-between, for instance have some custom server-side generation which is merged later with the rest of the client-side generation.
This is a fascinating subject to me, I will be covering some of these approaches in the future.
Monday, February 25, 2013
This one is a talkie!
Here are two new videos showing some new features.
I finally decided to add an audio track to a video. It does help describing what is new as it appears on screen:
I finally decided to add an audio track to a video. It does help describing what is new as it appears on screen:
Let me know if you like this format. I think I could do one of these every month.
The second video is some sort of fast steady-cam flyover:
Thursday, February 21, 2013
Undergrowth
Last weekend I took some time to add a new feature to the engine. It is some sort of mesh instancing system that brings additional detail on top of the geometry output. It can be used to add a new vegetation layer under trees, like the following images show:
I will be using it for rocks, pebbles, even man-made elements sticking out of the blocks you place.
Polygon counts are now escalating quickly because of this. My old 4770 still averages 40 FPS at 1080p but begins to struggle. It is still manageable, there are some polygons right now I can cut.
This one was long needed. I will be posting a video later so you guys can see how the LOD transitions are managed. I think this has improved a lot.
I will be using it for rocks, pebbles, even man-made elements sticking out of the blocks you place.
Polygon counts are now escalating quickly because of this. My old 4770 still averages 40 FPS at 1080p but begins to struggle. It is still manageable, there are some polygons right now I can cut.
This one was long needed. I will be posting a video later so you guys can see how the LOD transitions are managed. I think this has improved a lot.
Monday, February 18, 2013
Unity makes strength
I like writing everything from scratch, but not everyone shares this form of dementia.
Many in the past have asked whether any of this would run on mainstream game engines. I could not see a reason why not. The VoxelFarm engine outputs traditional polygons, in theory it could be plugged into any engine using polygons for rendering, physics, etc. That remained a nice theory until recently. Now we have some hard proof:
This screnshot shows the VoxelFarm realtime engine providing polygons for terrain in Unity.
Here is are a video. It shows a simple physics test and a little bit of walking. The capture speed and resolution is not good, but hopefully you will get the idea.
I understand if this tech is to be widely used, it will likely come in the form of plugins for mainstream engines. So think this is very encouraging news.
Many in the past have asked whether any of this would run on mainstream game engines. I could not see a reason why not. The VoxelFarm engine outputs traditional polygons, in theory it could be plugged into any engine using polygons for rendering, physics, etc. That remained a nice theory until recently. Now we have some hard proof:
This screnshot shows the VoxelFarm realtime engine providing polygons for terrain in Unity.
Here is are a video. It shows a simple physics test and a little bit of walking. The capture speed and resolution is not good, but hopefully you will get the idea.
Sunday, January 20, 2013
Don't be square!
Minecraft gets many things right, but the top in my list is how easy it is to create. Nothing is simpler than laying out boxes. Since everything is square (even the cows), being limited to boxes does not feel bad at all.
If you are doing some sort of sandbox environment going beyond just boxes is not trivial. One possible approach is to do like Blockscape, where in addition to the classic box you now have a large repertoire of prefixed angular shapes. I do not like this approach as it makes the interface very complex and frustrating. It makes you forehead veins pop.
So I chose a different approach, where you still lay boxes the same as in Minecraft, but then you can go back and alter them. I saw that a single operation was enough to produce both curved and straight angled surfaces. If you applied it gently you would get curves. If you applied it more, it would straighten out.
Here you can see a round hole and a needle, both initially created as boxes. It only takes a few clicks to shift their shapes:
I think this is the right direction. Still it is not simple to implement. While I got this thing working, there are many issues to fix.
I leave you with a video, let me know what you think:
If you are doing some sort of sandbox environment going beyond just boxes is not trivial. One possible approach is to do like Blockscape, where in addition to the classic box you now have a large repertoire of prefixed angular shapes. I do not like this approach as it makes the interface very complex and frustrating. It makes you forehead veins pop.
So I chose a different approach, where you still lay boxes the same as in Minecraft, but then you can go back and alter them. I saw that a single operation was enough to produce both curved and straight angled surfaces. If you applied it gently you would get curves. If you applied it more, it would straighten out.
Here you can see a round hole and a needle, both initially created as boxes. It only takes a few clicks to shift their shapes:
I think this is the right direction. Still it is not simple to implement. While I got this thing working, there are many issues to fix.
I leave you with a video, let me know what you think:
Wednesday, January 16, 2013
Monkey Testing
It is hard to find bugs in software you have written. A developer is always conditioned to the way the software its built. The scenarios that you will test are only those you anticipated. It is like playing chess against yourself.
When it comes to a fresh point of view, nothing can rival an actual monkey. Monkeys are guaranteed to exercise every bit of interface you expose. Now monkeys are hard to come by. If you lack one the next best thing is a two-year old human.
I have two-year old twins girls, so I decided to give it a try. It was surprisingly easy to get them to play with the software. (I did tell them there was a pretty bird hiding somewhere in the trees.)
Did they find any bugs?
They found several bugs I had not seen before. Most were about camera collisions, and there was one really nasty synchronization bug with a garbage collector. That bug alone was worth the experiment.
And there is also proof you can advance a software project and look absolutely adorable in the process.
When it comes to a fresh point of view, nothing can rival an actual monkey. Monkeys are guaranteed to exercise every bit of interface you expose. Now monkeys are hard to come by. If you lack one the next best thing is a two-year old human.
I have two-year old twins girls, so I decided to give it a try. It was surprisingly easy to get them to play with the software. (I did tell them there was a pretty bird hiding somewhere in the trees.)
Did they find any bugs?
They found several bugs I had not seen before. Most were about camera collisions, and there was one really nasty synchronization bug with a garbage collector. That bug alone was worth the experiment.
And there is also proof you can advance a software project and look absolutely adorable in the process.
Monday, December 3, 2012
Videos of Caves and Buildings
Here is a series of videos I captured over the weekend.
The first one shows a bit of the architecture, also how a couple of useful underground passages can save you time while travelling:
The second is a trip I did to get close to a tower I saw. It seemed simple at the beginning, but the terrain had some severe accidents so I had to figure out my way. I found some caves that helped me get there, also saw I needed to do a quick bridge over a chasm. It runs at double the speed so you would not get bored by all the wandering. Also note that at the end of the video I carve some holes into the tower walls.
The next video also runs at double the speed. It shares the same beginning as the first video posted here, but goes a lot farther.
And the last video shows how the caves can sometimes go really deep underground. You often see cave openings into the surface, but also they could be right under your feet and you would not know. I cheated in this video by showing the wireframe, otherwise it would have taken an awful lot of time to find these caves.
The first one shows a bit of the architecture, also how a couple of useful underground passages can save you time while travelling:
The second is a trip I did to get close to a tower I saw. It seemed simple at the beginning, but the terrain had some severe accidents so I had to figure out my way. I found some caves that helped me get there, also saw I needed to do a quick bridge over a chasm. It runs at double the speed so you would not get bored by all the wandering. Also note that at the end of the video I carve some holes into the tower walls.
The next video also runs at double the speed. It shares the same beginning as the first video posted here, but goes a lot farther.
And the last video shows how the caves can sometimes go really deep underground. You often see cave openings into the surface, but also they could be right under your feet and you would not know. I cheated in this video by showing the wireframe, otherwise it would have taken an awful lot of time to find these caves.
Architecture On-The-Fly
Boy this was a tough one. I always knew it was coming, tried to postpone it for as long as I could.
In the past I had succeeded creating complex buildings out of L-Systems. While it was fast, it was for a different approach to world generation. It was for static game worlds like Skyrim's. I had the luxury of time.
In a world that generates as the viewer moves, most of the time I had for generation was already taken by the terrain and trees.
Architecture is something you cannot just instance. You want buildings to be different, even if they belong to the same class. I needed the actual grammar programs to run in real time, its polygonal output voxelized and then merged with the rest of the voxel data.
You may think going from polygons to voxels then back to polygons is an awful waste of time. It had been, except for the fact I needed changes made Minecraft-style to also work over buildings. When you are wielding that pickaxe you don't really care if that rock in front is a natural formation or a cathedral wall.
At the end I did manage to make it work. As usual most of the solution went into creating indices to accelerate the actual work.
I had to make compromises. For starters, the voxel resolution in the realtime engine is much coarser than what I had for the pre-computed worlds. This meant a lot of the detail in buildings had to go. This also applied to the following levels of detail. Detail had to be removed in all levels.
I also saw I needed simpler grammars just so the system could keep up in lower-end hardware. I found it common to have thousands of different buildings in a single scene. The solution I found was to pass the LOD parameter to the building grammar at evaluation time. It made it possible, but now the building programmer has to worry about creating different views for the same building.
I am still very happy with the results of something I feared almost impossible. There is room for improvement, and this is a good thing. The hard part is over.
I leave you with some screenshots of a single tower grammar that appears scattered everywhere. Please do not mind the lack of actual cities, or the fact it is the same tower over and over again. This is rather a test for the system. I will be posting some videos later.
In the past I had succeeded creating complex buildings out of L-Systems. While it was fast, it was for a different approach to world generation. It was for static game worlds like Skyrim's. I had the luxury of time.
In a world that generates as the viewer moves, most of the time I had for generation was already taken by the terrain and trees.
Architecture is something you cannot just instance. You want buildings to be different, even if they belong to the same class. I needed the actual grammar programs to run in real time, its polygonal output voxelized and then merged with the rest of the voxel data.
You may think going from polygons to voxels then back to polygons is an awful waste of time. It had been, except for the fact I needed changes made Minecraft-style to also work over buildings. When you are wielding that pickaxe you don't really care if that rock in front is a natural formation or a cathedral wall.
At the end I did manage to make it work. As usual most of the solution went into creating indices to accelerate the actual work.
I had to make compromises. For starters, the voxel resolution in the realtime engine is much coarser than what I had for the pre-computed worlds. This meant a lot of the detail in buildings had to go. This also applied to the following levels of detail. Detail had to be removed in all levels.
I also saw I needed simpler grammars just so the system could keep up in lower-end hardware. I found it common to have thousands of different buildings in a single scene. The solution I found was to pass the LOD parameter to the building grammar at evaluation time. It made it possible, but now the building programmer has to worry about creating different views for the same building.
I am still very happy with the results of something I feared almost impossible. There is room for improvement, and this is a good thing. The hard part is over.
I leave you with some screenshots of a single tower grammar that appears scattered everywhere. Please do not mind the lack of actual cities, or the fact it is the same tower over and over again. This is rather a test for the system. I will be posting some videos later.
Sunday, November 11, 2012
A System of Caves
A true exploration and adventure game-world needs a decent system of caves.
Caves are exiting. You do not know what lies next. It could be that motherload you have been tracking for hours, it could be a band of nasty creatures.
Caves are also beautiful and interesting. I like it when caves surface and create openings in the face of mountains, or when a large portion of ground has collapsed and you can see part of the cave's profile like a giant ant farm.
Over the past few weeks I did many attempts on creating a good cave system. It is a lot more difficult than it seems, especially if you want to generate them in real time.
I tried different solutions until I hit what I thought it was the winning formula. The key wast think of the cave system more like a dungeon in a castle, pretty much like roguelikes do in ASCII. You end up with a system of narrow tunnels that connect in meaningful ways and often lead to large interior spaces. It is then possible to give an interesting rhythm to the system. You can count on the system to reward the explorer with awesome crypts after enough tunnels have been explored.
Another challenge was to create the connections between the caves and the surface. I wanted caves to be fun and beautiful, and actually help you get around the world. For instance they often serve as shortcuts below mountains.
I also had to pay close attention on how the caves played with the rest of the terrain. If you had all the time in the world this would be hardly a problem. To generate this on-the-fly and make sure there are no odd floating bits, it is kind of tricky.
I leave you with a series of screenshots showing some caves I have encountered in my travels. At the end you will find a wireframe video that shows the profile of a cave system. I hope you like them.
Here is the video:
Caves are exiting. You do not know what lies next. It could be that motherload you have been tracking for hours, it could be a band of nasty creatures.
Caves are also beautiful and interesting. I like it when caves surface and create openings in the face of mountains, or when a large portion of ground has collapsed and you can see part of the cave's profile like a giant ant farm.
Over the past few weeks I did many attempts on creating a good cave system. It is a lot more difficult than it seems, especially if you want to generate them in real time.
I tried different solutions until I hit what I thought it was the winning formula. The key wast think of the cave system more like a dungeon in a castle, pretty much like roguelikes do in ASCII. You end up with a system of narrow tunnels that connect in meaningful ways and often lead to large interior spaces. It is then possible to give an interesting rhythm to the system. You can count on the system to reward the explorer with awesome crypts after enough tunnels have been explored.
Another challenge was to create the connections between the caves and the surface. I wanted caves to be fun and beautiful, and actually help you get around the world. For instance they often serve as shortcuts below mountains.
I also had to pay close attention on how the caves played with the rest of the terrain. If you had all the time in the world this would be hardly a problem. To generate this on-the-fly and make sure there are no odd floating bits, it is kind of tricky.
I leave you with a series of screenshots showing some caves I have encountered in my travels. At the end you will find a wireframe video that shows the profile of a cave system. I hope you like them.
Here is the video:
Sunday, November 4, 2012
Into the sandbox
This is a follow up on my earlier post, where I announced a new take on my engine so it could be used for games like Minecraft.
Here is a video of me building a nice house on a hillside. The video is a bit long (38min) even if it plays at double the speed. You may want to get some snacks.
Here is one shot of the house, it is far from finished, but I really like the view out of the bedroom:
Here is the video:
The video shows how anything from the world can be removed. You can also add new blocks, which are all square, pretty much like Minecraft.
But unlike Minecraft, you can use tools to smooth out the blocks creating nice curves and slopes. The idea is to work initially in squares, then smooth it out as needed. Smoothness and slopes comes in a second phase. Otherwise it would be too difficult to place them and control the resulting shapes. I think it is the best approach possible. It combines the simplicity of square blocks with the rich appearance you can find everywhere else in this virtual world.
Something else about the video. Right at the beginning you can see a green progress bar. This is how long it takes to get into the world, no matter if you are starting it from scratch.
This video was taken from a i5 with 4 cores, running a Radeon 4770.
I continued to work on the house after I stopped recording. The save data for the entire world is around 300K.
As usual I look forward to you opinions and questions.
Here is a video of me building a nice house on a hillside. The video is a bit long (38min) even if it plays at double the speed. You may want to get some snacks.
Here is one shot of the house, it is far from finished, but I really like the view out of the bedroom:
Here is the video:
The video shows how anything from the world can be removed. You can also add new blocks, which are all square, pretty much like Minecraft.
But unlike Minecraft, you can use tools to smooth out the blocks creating nice curves and slopes. The idea is to work initially in squares, then smooth it out as needed. Smoothness and slopes comes in a second phase. Otherwise it would be too difficult to place them and control the resulting shapes. I think it is the best approach possible. It combines the simplicity of square blocks with the rich appearance you can find everywhere else in this virtual world.
Something else about the video. Right at the beginning you can see a green progress bar. This is how long it takes to get into the world, no matter if you are starting it from scratch.
This video was taken from a i5 with 4 cores, running a Radeon 4770.
I continued to work on the house after I stopped recording. The save data for the entire world is around 300K.
As usual I look forward to you opinions and questions.
Saturday, November 3, 2012
What if I told you...
Yes, I know I said I would not do it. But it was hard to resist the temptation. After all I had all the required pieces, so why not?
All the videos I have posted recently were captured from this new engine, codenamed "VoxelFarm Realtime". It means all you see here is generated on-the-fly, as the viewer moves. It takes less than 15 seconds to boot an entirely new world, which can be larger than Planet Earth.
You can also carve, dig, and build into everything you see. You are not restricted to square shapes anymore. The blocks you can add are no different that the same blocks you already see in trees, rocks. Organic and all kind of angled surfaces are very much possible.
Now the cat is out of the bag, more on this to come.
Monday, October 29, 2012
Snow, Biomes
Last week's video was about adding variety to foliage.
Here are three new videos that show something similar but at a larger scale. The first two show transitions from snowy terrain to green terrain. The last one goes from green to some kind of rocky desert.
Do not pay too much attention to the sound, you will hear chipping birds no matter if it is snow or desert.
I did some improvement on the LOD switches. They are still happening pretty much on your face, but in general should be smaller.
Here are three new videos that show something similar but at a larger scale. The first two show transitions from snowy terrain to green terrain. The last one goes from green to some kind of rocky desert.
Do not pay too much attention to the sound, you will hear chipping birds no matter if it is snow or desert.
I did some improvement on the LOD switches. They are still happening pretty much on your face, but in general should be smaller.
Saturday, October 20, 2012
Fall colors
Here is a video showing the new skylight feature. Trees now can have different foliage. Adding fall colors was a nice way to test this. These trees share the same foliage texture, it is colorized on-the-fly by the shaders.
Friday, October 19, 2012
Realtime global illumination, sort of
I just added skylight to the realtime renderer. I am very happy with the results. In my opinion it adds a lot of depth, and it is quite fast to compute. You can see it here in two series of screenshots I took for a forest setting.
In each series, the first image is the final results, the second image is the contribution from the skylight and the third is the direct sunlight illumination:
In each series, the first image is the final results, the second image is the contribution from the skylight and the third is the direct sunlight illumination:
Second series:
This is already looking good, and it runs in realtime. If there was some large character moving around in the scene, you would see its contribution to the shadowing.
The skylight is a standard shadow map, but it is sampled taking a lot of neighbors into consideration. This creates nice soft transitions between areas of light and penumbra.
There are no light bounces here, however. I have been toying with the idea of a screen-space radiosity solution. I think it is possible. If you know of any papers on the subject, please drop a link in the comments section.
As usual I look forward to your comments and criticism.
Tuesday, October 9, 2012
Realtime Shadows
I decided to give dynamic shadows a quick try. I used a shadow map with percentage-closer filtering to smooth shadow boundaries. The results are quite fast and smooth. The main trick was to run the shadow evaluation on the vertex shader. I realized I had enough vertex density for consistent results. The shadow interpolation between vertices would make the shadows even smoother.
Here are the results.
If you wait to the end of the video you will see there is some kind of mysterious object rising from the ground. This is unlike anything you have seen in my videos before. It certainly means something, a sign of things to come...
Subscribe to:
Posts (Atom)