GithubHelp home page GithubHelp logo

crimild-demos's Introduction

IMPORTANT: THIS REPOSITORY IS NO LONGER MAINTAINED. PLEASE CHECK CRIMILD'S MAIN REPOSITORY FOR EXAMPLES

Crimild Demos and Examples

A repository for crimild-based demos and code examples

Table of Contents

git clone --recursive https://github.com/hhsaez/crimild-demos.git

Updating existing code

git pull origin <BRANCH_NAME>
git submodule update --init --recursive
cmake .

Unix Makefiles

cmake .
make clean all test -j4

Xcode

cmake . -G Xcode

Windows

Requirements

  • CMake
  • Visual Studio 2019 or above
cmake . -G "Visual Studio 16 2019" -A x64 -S . -Bbuild
cmake --build build --config Release --target Triangle

Web (Wasm/WebGL)

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

crimild-demos's People

Contributors

hhsaez avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.