Since the images in this article are linked to the IPFS address of xlog, the article images on this site cannot be loaded. For a better reading experience, please visit the original site: https://xlog.xiaohan-kaka.me/ltcgi-use
Preface#
LTCGI is an optimized plug-and-play real-time area light solution that uses the linear transformation cosine algorithm and is suitable for independent Unity and VRChat. It is free to use with proper attribution. It can achieve realistic shadows on static objects using Unity's built-in light maps or Bakery.
Using LTCGI can achieve elegant reflection effects on objects and even video players in VRChat, while also achieving better performance.
This article only provides a general description of usage. For specific details, please refer to the official documentation: https://ltcgi.dev/
Installation#
Make sure your project is using supported shaders:
Shader List |
---|
ORL Shader Family by @orels1 |
Silent's Filamented |
Mochie's Unity Shaders |
Hekky Shaders |
z3y's Shaders |
Basic "Unlit" Test Shader (included) |
Surface Shader (included) |
Add using VCC:
https://vpm.pimaker.at/
If not used for VRChat projects, you can import it via Git in the package manager:
https://github.com/PiMaker/ltcgi.git
After importing the project, find LTCGI_Controller
and place it in the scene wherever you like. This is a prefab used to control LTCGI baking and adjust some settings.
Usage#
LTCGI is used to control the glowing component and is a component called LTCGI_Screen
.
It must be placed on a Mesh Filter
object with at least 3 or 4 vertices.
For example: quad
Controller Explanation#
Name | Meaning |
---|---|
arealight shape | Defines the shape of the light |
color | Light color (the button below is used to try to directly obtain it from the attached object) |
Diffuse mode | Diffuse reflection mode |
specular | Choose whether to reflect |
Dynamic | Marks this screen object as dynamic. It has a slight performance cost but allows the screen to be moved and its color to be changed at runtime |
double sided | Both sides of the object emit light instead of just one side |
flip uv | Flip the UV |
affect avatars | Whether to affect the character itself (provided that the character uses a compatible shader) |
color mode | Color mode |
Affected Renderers | Select which renderers in the scene should receive light from this LTCGI screen |
Lightmap Channel | Select the lightmap channel that this screen will occupy when baking shadows |
Diffuse Reflection Mode#
Type | Meaning |
---|---|
no diffuse | Disable |
LTC Diffuse | Diffuse reflection using the LTC algorithm |
Lightmap Diffuse | Directly use the data calculated in the shadow map baking |
Color Mode#
Type | Meaning |
---|---|
static | Static |
Texture | Choose color from the texture, can be used for video textures or other static textures |
Single UV | Similar to texture, but the screen will be lit at the exact UV coordinates specified below with a single color obtained from the texture |
audiolink | Link to audiolink and detect signals in the specified area, such as bass |
Applying Real-Time Video Textures#
The following example uses the VidViz player. If you are using the ProTV player, you can directly use the button on the controller to configure it with one click. Some players also have options to automate the configuration of LTCGI.
For other players, refer to: https://ltcgi.dev/Getting%20Started/Setup/Realtime_Video
- Add the screen texture used by LTCGI to the output target of the player.
- Go to
LTCGI_Controller
and assign the texture added to the player to the video texture option.
- Then select the
screen
component of the player and add a component, which is theLTCGI_Screen
mentioned above. Configure the options and you're done.
Afterword#
This article roughly covers the basics of LTCGI. I myself only have a partial understanding of this tool. Maybe I will update this article in the future when I become more proficient in using this tool. It can also be combined with audiolink to create some cool effects, but that's another matter.
It is recommended to read the official documentation: https://ltcgi.dev/
This article is synchronized and updated to xLog by Mix Space.
The original link is https://blog.xiaohan-kaka.me/posts/unity/ltcgi-use