IMPORTANT: THIS REPOSITORY IS NO LONGER MAINTAINED. PLEASE CHECK CRIMILD'S MAIN REPOSITORY FOR EXAMPLES
A repository for crimild-based demos and code examples
git clone --recursive https://github.com/hhsaez/crimild-demos.git
git pull origin <BRANCH_NAME>
git submodule update --init --recursive
cmake .
cmake .
make clean all test -j4
cmake . -G Xcode
Requirements
- CMake
- Visual Studio 2019 or above
cmake . -G "Visual Studio 16 2019" -A x64 -S . -Bbuild
cmake --build build --config Release --target Triangle
mkdir build-web
cd build-web
cmake .. -DCMAKE_TOOLCHAIN_FILE=#{EMSCRIPTEN_HOME}/cmake/Modules/Platform/Emscripten.cmake
make clean all -j8
It's safe to ignore SDL_Mixer2 warnings, if any.
Basics | ||
![]() |
Triangle | Basic (and very explicit) example for rendering a single colored triangle using Crimild. This shows the most important concepts and tools in the engine like geometries, buffers, pipelines and render passes. |
![]() |
Transformations | Creates a scene with many objects, each of them with a different transformations. Shows how to specify translations, rotations and scales using the local transformation of nodes. |
Primitives | ||
![]() |
Points | Shows how to use a POINTS primitive to build a point cloud. |
![]() |
Lines | Shows how to use a LINES primitive. |
![]() |
Spheres | Shows how to use a Sphere primitive. |
![]() |
Boxes | Shows how to use a Box primitive. |
![]() |
Parametric Primitives | Shows how to use each of the parametric primitives, using different generator params, to construct several objects objects. |
Textures | ||
![]() |
Textures | Loads an image from disk and create an image view, a sampler and a texture to display it on screen. Shows how to use primitives with texture coordinates as well. |
![]() |
Texture Mipmaps Generation | Automatically generate mipmaps in runtime for a texture. |
![]() |
Texture Filters | Create textures by using different min/mag filter options in samplers. |
![]() |
Texture Wrap Mode | Create textures by using different wrap modes options in samplers. |
Environment | ||
![]() |
Skybox | Use a cubemap texture to render a skybox around a scene. |
![]() |
Environment Mapping | Implements simple reflection and refraction effects using environment mapping. |
Lighting | ||
![]() |
Lighting Unlit | Uses an unlit material to show how colors are displayed when no lighing is available. |
![]() |
Lighting Material | Renders a scene with several objects using the LitMaterial class. |
![]() |
Lighting Diffuse Map | Renders Planet Earth with diffuse texture and single point light, using Phong shading model. |
![]() |
Lighting Directional | Uses a single directional light to lit a scene. |
![]() |
Lighting Point | Uses a single point light to lit a scene. |
![]() |
Lighting Spotlight | Uses a single spotlight light to lit a scene |
![]() |
Lighting Multiple | Creates a scene with lots of cubes and adds multiple light sources: one directional light, two point lights moving around the scene and a flashlight (using a spot light). Camera can be controlled with WASD and the mouse. |
![]() |
Normal Mapping | Uses a normal texture to provide more detail to models |
Loaders | ||
![]() |
OBJLoader | Shows how to use the OBJ loader to create a simple scene by loading models from files. |
Depth/Stencil | ||
![]() |
Depth | Visualizes the depth buffer by implementing a custom shader. |
![]() |
Depth Functions | Visualizes what happens when depth testing is disabled. |
![]() |
Stencil Outline | Renders an outline around some objects using the stencil buffer and multiple passes |
Alpha | ||
![]() |
AlphaDiscard | Displays a scene with several objects, discarding fragments if the alpha value is lower than some threshold. |
Pipelines | ||
![]() |
Pipeline Cull mode | Modify a pipeline to disable back-face culling for a rotating quad. |
Compositions | ||
![]() |
Postprocessing Negative | Applies a "negative" post processing effect by using frame compositions |
![]() |
Postprocessing Grayscale | Converts a color scene into grayscale by using frame compositions |
![]() |
Postprocessing Sharpen | Applies a sharpen convolution to a rendered scene by using frame compositions |
![]() |
Postprocessing Blur | Applies a blur convolution to a rendered scene by using frame compositions |
![]() |
Postprocessing Edges | Process a rendered scene, highlighting edges by using frame compositions |
Shadows | ||
![]() |
Directional | A simple scene is rendered using a directional light that cast shadows on both dynamic and static objects. |
![]() |
Spot | A simple scene is rendered using a spot light that cast shadows on both dynamic and static objects |
![]() |
Point | A scene is rendered using a point light that casting shadows for all objects in all directions |
![]() |
Directional (many lights) | A simple scene is rendered using two directional lights, each one casting shadows on both dynamic and static objects. |
![]() |
Spot (many lights) | A simple scene is rendered using three spot lights with different colors, each one casting shadows on both dynamic and static objects |
![]() |
Point (many lights) | A scene is rendered using three point lights with different colors, each one casting shadows for all objects in all directions |
Image Effects | ||
![]() |
HDR | Renders a scene with HDR enabled, providing more control over bright and dark colors |
![]() |
Bloom | Filters brigth areas, applying blur to the result, to generate a light bleeding effect |
Shaders | ||
![]() |
Smiley | TBD |
PBR | ||
![]() |
PBR Basic | TBD |
![]() |
PBR Texture | TBD |
![]() |
PBR Image Based Lighting | TBD |
![]() |
PBR 3D Model | TBD |
Particles | ||
![]() |
Fire | TBD |