(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | Cirrus, as well as being high altitude clouds is also my high-level [[Nuaj]] wrapper also available at the same | + | Cirrus, as well as being high altitude clouds is also my high-level [[Nuaj]] wrapper also available at the same GIT repository as Nuaj' [https://github.com/Patapom/NuajFramework here]. |
It's loaded with cool stuff like a FBX scene importer that allows you to load any FBX scene from your favorite 3D package like 3DS Max and Maya into a Cirrus scene that can later be saved as a unit using the (quite lousy) Cirrus proprietary format. | It's loaded with cool stuff like a FBX scene importer that allows you to load any FBX scene from your favorite 3D package like 3DS Max and Maya into a Cirrus scene that can later be saved as a unit using the (quite lousy) Cirrus proprietary format. | ||
Line 37: | Line 37: | ||
So you see this basic organization is actually quite powerful, here are some examples of renderings I have already achieved in a few weeks. | So you see this basic organization is actually quite powerful, here are some examples of renderings I have already achieved in a few weeks. | ||
+ | === Cascaded Shadow Maps === | ||
I have written some "advanced" render techniques already like the Cascaded Shadow Map technique that computes shadow maps for your scene and provides shadow map support for the shaders : | I have written some "advanced" render techniques already like the Cascaded Shadow Map technique that computes shadow maps for your scene and provides shadow map support for the shaders : | ||
Line 45: | Line 46: | ||
+ | === Sub-Surface Scattering === | ||
Another technique is able to perform sub-surface scattering for realistic skin rendering : | Another technique is able to perform sub-surface scattering for realistic skin rendering : | ||
Line 51: | Line 53: | ||
+ | === Voxel Terrain === | ||
This technique can render voxel terrains (an adaptation of the [http://http.developer.nvidia.com/GPUGems3/gpugems3_ch01.html GPU Gems 3 - Chapter 1]) : | This technique can render voxel terrains (an adaptation of the [http://http.developer.nvidia.com/GPUGems3/gpugems3_ch01.html GPU Gems 3 - Chapter 1]) : | ||
Line 58: | Line 61: | ||
− | This one is not a technique but a brute force effect that renders a mesh as particles which are then deformed by 3D Perlin noise (basically, it's the same as in the [http://www.youtube.com/watch?v=ON4N0yGz4n8 CNCD/Fairlight demo], except i'm using geometry shaders whereas I'm assuming they're using point sprites) : | + | === Perlin Noise Particles === |
+ | This one is not a technique but a brute force effect that renders a mesh as particles which are then deformed by 3D Perlin noise (basically, | ||
+ | it's the same as in the [http://www.youtube.com/watch?v=ON4N0yGz4n8 CNCD/Fairlight demo], except i'm using geometry shaders whereas I'm assuming they're using point sprites) : | ||
[[File:NoiseParticles0.jpg]] | [[File:NoiseParticles0.jpg]] | ||
Line 65: | Line 70: | ||
+ | === Realtime Caustics === | ||
This render technique is an entire effect in itself showing realtime caustics cast by light reflection/refraction through a deforming sphere : | This render technique is an entire effect in itself showing realtime caustics cast by light reflection/refraction through a deforming sphere : | ||
Line 73: | Line 79: | ||
+ | === Inferred Lighting === | ||
The following image is my first result from a complete deferred renderer setup featuring many pipelines (depth pass, standard, emissive, shadow, lighting and post-processing) that implements a variation of the [http://graphics.cs.uiuc.edu/~kircher/inferred/inferred_lighting_paper.pdf "Inferred Lighting" technique]. | The following image is my first result from a complete deferred renderer setup featuring many pipelines (depth pass, standard, emissive, shadow, lighting and post-processing) that implements a variation of the [http://graphics.cs.uiuc.edu/~kircher/inferred/inferred_lighting_paper.pdf "Inferred Lighting" technique]. | ||
You can see here 1024 non-shadow casting omnis... and 1 spot light (the blue light on top the head mesh [[File:S1.gif]]), all running on my GeForce 320M at a minimum of 30 FPS when viewing all the lights (with light culling it easily reaches 120 FPS on average) : | You can see here 1024 non-shadow casting omnis... and 1 spot light (the blue light on top the head mesh [[File:S1.gif]]), all running on my GeForce 320M at a minimum of 30 FPS when viewing all the lights (with light culling it easily reaches 120 FPS on average) : | ||
[[File:Inferred_Lighting.png]] | [[File:Inferred_Lighting.png]] | ||
+ | (video available [http://www.patapom.com/Temp/DeferredLighting.wmv here]) | ||
+ | |||
+ | |||
+ | |||
+ | === Clouds & Atmospheric Effects === | ||
+ | Here is an example of a terrain with clouds and atmospheric effects. Clouds are a single 3D noise texture that is traced using standard ray-marching. | ||
+ | |||
+ | [[File:Clouds.png]] | ||
+ | (video available [http://www.youtube.com/watch?v=I1_f0z3Ht-k here]) | ||
+ | |||
+ | |||
+ | |||
+ | === Optical Effects === | ||
+ | This is an example of a lens-flare from "Optical Flares" by Video Copilot ([http://www.videocopilot.net/products/opticalflares/ http://www.videocopilot.net/products/opticalflares/]) that Nuaj' can almost completely reproduce (more infos on the [[Lens Flares|Lens Flares]] page). | ||
+ | |||
+ | [[File:LensFlare.png]] | ||
+ | (video available [http://www.youtube.com/watch?v=b0mSNwpFHSM here]) |
Latest revision as of 14:03, 7 September 2013
Cirrus, as well as being high altitude clouds is also my high-level Nuaj wrapper also available at the same GIT repository as Nuaj' here.
It's loaded with cool stuff like a FBX scene importer that allows you to load any FBX scene from your favorite 3D package like 3DS Max and Maya into a Cirrus scene that can later be saved as a unit using the (quite lousy) Cirrus proprietary format.
Cirrus is not a 3D engine filled with humongous amounts of code and 3rd party libraries : as for Nuaj its sole purpose is to ease the development of 3D projects so you can quickly come up with a 3D application that fills your needs (and some polygons at the same time, mirf hirf hirf ).
The architecture in Cirrus is quite simple and is organized like this :
Contents
Structures
There's nothing much to say about the Renderer and the Pipelines, a Renderer is (usually) a singleton (although you can create as many as you like) that contains a collection of pipelines which, in turn, contain a collection of RenderTechniques. The RenderTechniques on the other hand are quite interesting as they are the main render units that actually draw the polygons.
The base RenderTechnique class contains 3 abstract methods that need to be implemented :
- Render(), that performs the rendering of the primitives registered to the technique
- CreatePrimitive(), that creates a primitive of the type supported by the technique
- GetPrimitiveInfos(), that returns the informations about a primitive supported by the technique (basically, its name, vertices/indices count and the content of the vertex/index buffers for serialization)
Large Scenes Support
I have refurbished my old FBX importer that I used to import O3D scene and adapted it to Cirrus so you can easily load FBX scenes.
The FBX scene loader takes a bunch of parameters to load and convert an FBX scene into the Cirrus proprietary format that you can later save and load as you like.
As an input, the FBX scene loader needs what I call a "Texture Provider" that is able to create textures from a path. The default provider loads files from the disk but it's really simple to create another one that would load textures from an archive, or to make the provider part of a larger "texture manager" or even to handle textures streaming.
Also, the scene loader needs what I call a "Material Mapper". This is basically a collection of delegates that are interrogated one after another and that should be able to convert an FBX material into a Cirrus RenderTechnique. This is quite important otherwise materials cannot be rendered, the RenderTechnique then takes the charge of creating the primitives from the FBX meshes. It's also that render technique that is able to save and reload the primitive once it's in Cirrus proprietary format.
Examples
So you see this basic organization is actually quite powerful, here are some examples of renderings I have already achieved in a few weeks.
Cascaded Shadow Maps
I have written some "advanced" render techniques already like the Cascaded Shadow Map technique that computes shadow maps for your scene and provides shadow map support for the shaders :
Sub-Surface Scattering
Another technique is able to perform sub-surface scattering for realistic skin rendering :
Voxel Terrain
This technique can render voxel terrains (an adaptation of the GPU Gems 3 - Chapter 1) :
Perlin Noise Particles
This one is not a technique but a brute force effect that renders a mesh as particles which are then deformed by 3D Perlin noise (basically, it's the same as in the CNCD/Fairlight demo, except i'm using geometry shaders whereas I'm assuming they're using point sprites) :
(Demo EXE available here)
Realtime Caustics
This render technique is an entire effect in itself showing realtime caustics cast by light reflection/refraction through a deforming sphere :
(video available here) (Demo EXE available here)
Inferred Lighting
The following image is my first result from a complete deferred renderer setup featuring many pipelines (depth pass, standard, emissive, shadow, lighting and post-processing) that implements a variation of the "Inferred Lighting" technique. You can see here 1024 non-shadow casting omnis... and 1 spot light (the blue light on top the head mesh ), all running on my GeForce 320M at a minimum of 30 FPS when viewing all the lights (with light culling it easily reaches 120 FPS on average) :
(video available here)
Clouds & Atmospheric Effects
Here is an example of a terrain with clouds and atmospheric effects. Clouds are a single 3D noise texture that is traced using standard ray-marching.
(video available here)
Optical Effects
This is an example of a lens-flare from "Optical Flares" by Video Copilot (http://www.videocopilot.net/products/opticalflares/) that Nuaj' can almost completely reproduce (more infos on the Lens Flares page).
(video available here)