Crystal - 2D Lighting Engine
A downloadable asset pack
Documentation | Forum Thread | DEMO is now available below!
๐ Are you frustrated by the lack of a feature you want so much?
โ Crystal offers the most complete and efficient lighting solution for any kind of 2D game. Everything you see in other lighting systems, you can do with Crystal.
๐ฅ The ultimate 2D lighting & shadows with Disney's PBR support solution for GameMaker. All this in a package of less than 500 kbytes of code!
"But I just just need a simple lighting system!" no problem, you can turn everything off and it will work as if it were. ๐
FEATURES:
- Flexible systems allows you to use from basic to advanced without compromising performance;
- Easy to use and fully customizable, you have control of literally everything, every visual aspect (artist-friendly);
- MVP easily achievable;
- Free updates and individual customer support;
- You don't need to know how it works internally, everything you need is exposed;
- Ideal for both 2D pixel-art and HD/high resolution games. Platformer, Top-Down, RPG, Isometric, etc.
- Deferred Rendering;
- Render unlimited number of lights, shadows and materials;
- Your hardware is the limit.
- Between 5.000 - 10.000 lights at the same time without slow down!*
- Unlike other lighting systems that use multiple surfaces for a few lights.
- Render unlimited number of lights, shadows and materials;
- Take control of the final rendering and use your own shaders to apply the effects you want! (Very Easy)
- Fast performance;
- Culling is used to render and calculate only on-screen lights, shadow casters and materials;
- Disable lights, shadows and materials outside of camera view (optional);
- Easily disable features you don't want;
- VRAM friendly too;
- Very fast shader compilation;
- Render resolution adjustable;
- Also adjust the individual resolution of each pass easily: Lights, Normals, Emissive, Reflections, Materials, etc.
- HDR (High Dynamic Range)!
- Use this to have extremely beautiful and contrasting lights!
- Bloom light support;
- Optional;
- Lights collision!
- Inspired by Rayman Legends and Among US, you can detect collision (get pixel color & intensity) with lights to create interesting mechanics.
- Rotated Cameras!
- Supports rotation, zoom, 2D cameras + orthographic 2D cameras (matrix);
- Light penetration (edge lighting);
- Useful for Terraria style lighting;
- Fast GPU vertex shadows;
- Soft + hard shadows (customizable smoothness);
- Animated shadow casters;
- Shadow depth adjustable (per-occluder + per-light);
- Shadow length adjustable (per-occluder + per-light);
- Shadow penumbra adjustable (per-light);
- Shadow umbra adjustable (per-light);
- Dynamic shadows (moving objects);
- Static shadows (e.g. scenario);
- Prevents freezing when adding or removing multiple static shadows;
- Transformed and non-transformed shadow casters (for optimization);
- Functions to create circular, rectangular, from bounding boxes, path and others shadow casters;
- Create shadow casters using objects and code;
- Activate and deactivate shadow casters without having to destroy them;
- Self-shadows support;
- Sprite shadows;
- Normal mode + with perspective;
- Offset + angle + alpha + depth;
- Vertex buffer mode allows you to render multiple shadows in a single batch;
- Blur support;
- Render resolution support;
- Dynamic + static;
- Animation support;
- Depth is supported for everything, including lights, shadows, materials etc. It is possible to place everything on specific layers and depth!
- Powerful Debug UI:
- As a bonus, there is a compact UI script where you can edit and test stuff in-game!
- Lights are objects with Variable Definitions - useful for modularization in the room editor;
- 8 Light Possibilities (ultra customizable):
- Point;
- With natural/cozy look;
- Spot;
- Ultra customizable cone light;
- Width, corner and tilt support;
- 3D cookie projection sprite support (gobo);
- Sprite:
- Use any sprite as light, with animation support. Useful for light projected from a window or trees, for example.
- Supports normal maps and BRDF too.
- Directional (Sun):
- Supports rotation, shadows, infinite lights and more;
- Shape (Free Form):
- Define points using paths! Visually edit the shape of the light in the room editor;
- Inner and outer colors;
- Self-adjusting corners with precision amount;
- Supports shadows too;
- Basic light:
- Ultra efficient sprite light;
- Allows you to draw whatever you want in the Draw event;
- Ultra efficient sprite light;
- Line;
- Ambient;
- Color overlay support, with intensity;
- Also allows you to use customized hue/saturation/brightness using a single sprite!
- Point;
- Define per-light shader complexity (for performance control);
- Basic;
- Blinn-Phong;
- BRDF (PBR);
- Uses Disney's GGX implementation;
- Light Blend Modes:
- Multiply;
- Multiply Normalized;
- Multiply Linear;
- Add;
- Materials (optional) - with animation support + fast realtime GPU baking + multiple per-instance materials:
- Albedo;
- Normal Map (supports rotation and scaling);
- Metallic;
- Roughness;
- Ambient Occlusion;
- Emissive (with natural blending!);
- Unlit (with black color + alpha support - useful for UI)
- Reflections: useful for crystals, water, floor, etc;
- + SSR (Screen-space reflections) - optional;
- Sets a sprite as the sky too - animation support.
- Back sprite rendering support;
- + SSR (Screen-space reflections) - optional;
- Layer Materials:
- Support for all materials listed above ^;
- Render a layer as if it were a light, emission, and others;
- Renderize a range of layers into a single surface too;
- Tilesets support or any layer type: place normal map sprites, materials and other stuff easily;
- Particles support: drag and drop a particle system into the room and it will emit bloom. It works via code too! :D
- Layer effects (customizable):
- Automatic normal map generator for layers;
- Outline/edge normal map generator;
- Create your own layer effects;
- Spine support;
- Materials, including normal maps, also work;
- Also works with delta time, rotation, scale, etc;
- Materials, including normal maps, also work;
- Box2D (built-in GM physics) support;
- Works with online games;
- Efficient: no surface will be created, until you use something (example: there will be nothing related to normal map in memory/VRAM, if you don't use it);
- Automatically deletes surfaces from the renderer when not in use;
- This is true for everything, including materials, lights, emission, etc;
- No memory leaks;
- Automatically deletes surfaces from the renderer when not in use;
- Emissive particles via custom pass (beyond the layers);
- No need to "Separate Texture Page" from anything;
- Optimizing texture swaps and batch breaks.
- Direct access to all render passes;
- Get the lighting surface and others, for special effects.
- Draw your own custom things in each pass easily.
- With support for your custom shaders, blend modes and so on.
- Just call crystal_submit().
- Dithering (for retro aesthetic);
- Optional - you can even disable it at compile time;
- Define how the light and shadow will be lit on the layer;
- Allowing lights and shadows not to reach the sky, for example and more advanced effects.
- Day and Night cycle easy-to-use with LUTs;
- Both manual (your own time) and automatic (you can control everything);
- It is possible to set the clock speed, being able to have 24-minute days, for example.
- Set the time using 24h-like values and it will be reflected smoothly!
- Customize literally any hue/saturation/contrast as efficiently and quickly as possible;
- Use curves to define when the lights should turn off/on!
- This feature also allows you to extrapolate the intensity of the lights, as well as the intensity of the ambient light.
- Supports Strip, Grid and Hald LUTs!
- Delta time support (optional);
- Both manual (your own time) and automatic (you can control everything);
- Support lights on during the day (no need to darken the image to see them);
- UI pass: Support for emissive materials for User Interface;
- Light Cookie Generator;
- Allows you to create light masks from images, super customizable;
- .IES (Illuminating Engineering Society) files support!
- Industry standard lighting format IESNA LM-63 (2019, 2002 and 1995).
- Modular: It was developed for the end user in an intuitive way;
- Function to calculate VRAM usage;
- Purposeful compatibility with Post-Processing FX (works independently)
- Also works with other libraries like Scribble, Input and so on;
- Compatible with my other libraries;
- Easy migration from other lighting systems;
- Cross-platform;
- HTML5 is not supported. Use WASM instead;
- Frequently tested on Windows, mobile devices (Android), and GX.Games/Opera GX.
- GLSL ES shaders;
- Super well written and well documented code;
- Documentation available + Discord server for help;
* Using Basic Lights. Note that using lights with shadows will have an added cost regardless, this is expected. Performance also depends on other factors such as hardware.
Some screenshots (from some games) on this page are illustrative and do not demonstrate sprites included in the project. They are used only as demonstration and the copyright belongs to their respective owners.
What are you waiting for? You have the complete lighting solution in front of you! :D
Published | 9 hours ago |
Status | Released |
Category | Assets |
Rating | Rated 5.0 out of 5 stars (4 total ratings) |
Author | Foxy Of Jungle |
Genre | Platformer, Role Playing |
Tags | 25d, 2D, Effects, GameMaker, lighting, Perspective, Pixel Art, Retro |
Purchase
In order to download this asset pack you must purchase it at or above the minimum price of $59 USD. You will get access to the following files:
Download demo
Development log
- Crystal Lighting Engine v1.0 Launched!9 hours ago
Comments
Log in with itch.io to leave a comment.
Epic! Can this be used for an Art App, practically and legally? Anyhow, this is really impressive!
Yes, anything made with GameMaker! =] Thanks ^^
Congratulations on the release! It's been a fantastic journey from first discovering your previews earlier this year to this moment. Cannot wait to take our games to the next level with such a powerful tool.
I'm extremely flattered! I can't wait to see what you're going to do with Crystal! ^^ Feel free to tag me on Twitter/X and I'll repost :D
Nice, does it work with tilemaps or just objects?
Works with everything =], tilemaps, backgrounds, instances/objects, etc. Check out what else is here
Congrats on the release, looking forward to trying it out soon! <3
Thank you kindly!! If you have any questions, feel free to ask =]
OMGG :D
๐ฅ
Iโve been checking for this page every hour for the last month and finally here it is
That makes me so happy to hear! I can't wait to see what you'll do with Crystal! :D