春季创作者特卖将于(北京时间)4月18日晚上21:59结束!

Virtual Lighting (Advanced Stylized Shading)

Flotto - 代码插件 - 2023/05/22

Completely custom plugin system to bring your material based stylized shaders to the next level!

  • 支持的平台
  • 支持的引擎版本
    4.27, 5.1 - 5.3
  • 下载类型
    引擎插件
    此产品包含一款代码插件,含有预编译的二进制文件以及与虚幻引擎集成的所有源代码,能够安装到您选择的引擎版本中,并根据每个项目的需求启动。

Warning: Some of the screenshots include assets not included in this Plugin. One of my examples is made by throwing this system onto a Modular Dungeon Pack. Keep in mind that this is a system for custom lighting in the material editor, not an asset pack!


Walk around the packaged demo/showcase project on your own before deciding on whether you like it or not!

**Included all recently (v1.5) added features like virtual dynamic shadows, outlines & stylized specular calculations. All recreatable without having to ever touch post processing at all**


Short preview Video

Documentation

Quick setup video guide

Example Project


_________________________________________________________________________________________________


If for any reason during one of the later updates some of the materials have stopped working in earlier 5.X versions you can grab all of the nodes again here: https://blueprintue.com/blueprint/l90tdquu/

This may have something to do with 5.3s new Strata Materials making them incompatible with the older versions.


* 1.7 Changelog *

General/QOL

  • Improved the editor UI Experience by making disabled fields invisible, using dropdowns instead of checkboxes and adding more tooltips and default settings
  • Added the "On Begin Play" dropdown option to both shadow and smooth normal calculations to eliminate the need to recalculate these for static/immobile meshes

Virtual Vertex Shadows:

  • Smaller Bugfixes, added additional checks to minimize any potential crashes during multithreading
  • Added "On Begin Play" mode for virtual shadows which means the shadows are only calculated once at the start of the game or (if a max distance setting is maintained) whenever the player enters the specified distance. This makes the operation similar to baking lightmaps and will make it possible to use auto generated shadows on a huge number of meshed without significant performance impacts

Outlines:

  • Added a completely new function to bake smooth mesh normals into the vertex color RGB channels which enables smooth outlines even on low poly meshes & sharp edges. Performance will have to be increased to make this game ready for skeletal meshes (on tick) but generating them once during the begin play event will work wonders for static mesh outlines

__________________________________________________________________________________________________


All things considered is a product primarily aimed at a very specific minority of Unreal Engine users.


If you, just like me:

  • Want to make (a) stylized or cel shaded game(s)
  • Tried everything to make desired your look work, including post processing cel shaders, material based cel shaders or even building your own custom engine shading model from source but for some reason couldn't get it to look just right
  • Still ended up with results that either look uncanny, off or even outright too simple


Then this may be exactly the thing you've been looking for.

In essence, my Virtual Lighting System is a Plugin that allows you to easily create beautiful, complex and dynamic Material based(!) cel shaders that are able to react to the outside influences of being currently lit/unlit, a potentially infinite amount of dynamic movable point lights with a potentially infinite amount of possible colors (within the RGB spectrum of UE ;)) all at the same time!

How do we do that? Simple, by attaching a custom Actor component to our cel shaded actors that'll take care of generating dynamic material instances at runtime and live update their unique parameters to ensure everything is handled smoothly for you.


"But why would I use material based cel shading when things like post processing already exist?!"

There was one simple reason for me why using post processing (only) for my cel shading wasn't an option and that reason is visual clarity. Subjectively speaking post process based cel shading will always look a bit off, as it will always be based on physically "accurate" lighting information, which will never match the simply beautiful clarity of a basic unlit material, nor does it give me the creative freedom to precisely fine tune each object and characters shading the way I'd want to.

If you're interested in objective reasons only, here's the list of benefits I've found so far:

  • Post processing based cel shading breaks when using volumetrics. The ScreenUV based texture coordinate of post processing simply doesn't allow this, which means they lose you the ability to use actual volumetrics in your game
  • Post processing cel shading does only allow for very janky implementations of colored lights. There are indeed workarounds that make things look somewhat right, but the result is never 100% accurate.
  • Post processing materials do have a large performance cost and simply making one or two characters who may not even be on screen at all times cel shaded you'll have to render out the full screen view and do, what you could call a cut out, afterwards
  • You have complete creative freedom over stylistic choices because your lighting system is not bound to any physical accuracy anymore. Want your Postprocess based outlines to be simple, but have extremely detailed shading visuals? Just do you shading calcs but don't actually use the normal map. Want your default shading to smooth and simple, but have extremely detailed shading when exposed to another external light source? No issue, just use different Normal-Solutions for the different lighting calculations.

技术细节

Features:

  •  Fully custom virtual lighting subsystem, with the main goal of creating goodies and functionality for material based cel shaders that do not need to rely post processing to achieve stunning results
  •  Carefully prepared blueprint actors to make using the plugin as convenient as possible
  •  A selection of material functions to be able to just plug right into Virtual Lighting without ever having to worry about the actual in depth implementation
  • A fully setup cel shading material to demonstrate how the material function library can be used to easily get stunning results from using Virtual Lighting
  • An easy to use actor component as the link between the system and your dynamically shaded actors

Code Modules:

  •  VirtualLighting, Runtime Module

Number of Blueprints: 2 (Default Directional Light that self registers & a more user friendly Virtual Point Light Actor for you to use)

Number of C++ Classes: 3 (Subsystem, Actor Component & Virtual Point Light)

Materials: 2

Material Functions: 6

Textures: 1 (Default Engine texture to not break materials)

Network Replicated: No

Supported Development Platforms: Windows

Supported Target Build Platforms: Windows

Documentation: Link

Example Project: Project Files (~300MB zipped)

Important/Additional Notes: