Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

I've previously shown how to use stencils using the Amplify Shader Editor. Today, I found out that the Poiyomi shader supports stencils. Here's how you can replicate this effect using that shader, it's gonna be a long thread. (1/6) #VRChat

32,674 görüntüleme • 1 yıl önce •via X (Twitter)

6 Yorum

MyroP profil fotoğrafı
MyroP1 yıl önce

Here's how I setup the window mesh. The mesh uses 3 materials : - The 1st material is applied to the frame, nothing special about it. - The 2nd material is used to render the city. - The 3rd material is used to render the avatar. I called the 2nd and 3rd materials "windows".

MyroP profil fotoğrafı
MyroP1 yıl önce

First of all, we don't need to render our windows, it's just a "portal". Under "Rendering", set "ZWrite = Off", "RGB Source Blend = Zero", "RGB Destination Blend = One". We also want to render our Window before the rest, so we set a lower render queue, here I set it to 1999.

MyroP profil fotoğrafı
MyroP1 yıl önce

The interesting part is in the stencil settings. - For our window materials, under "Rendering > Stencil", set "Stencil Pass Op = Replace" - For our scene and avatar materials, set "Stencil Compare Option = Equals"

MyroP profil fotoğrafı
MyroP1 yıl önce

Our first window should only render the scene, so ensure the "Stencil Reference Value" matches on both the window and scene materials. You can use any value except 0, I personally choose 1. This is because we set the "Stencil Compare Function" to "Equal", so the values must match

MyroP profil fotoğrafı
MyroP1 yıl önce

We need to do the same thing on our second window, but we will use a different "Stencil Reference Value", personally I choose 2. If you use outlines, make sure to apply the same settings under "Outline Stencil" Better explanations how it works

Fancy profil fotoğrafı
Fancy1 yıl önce

You can do some pretty neat tricks with stencils! And it's not only a tool for making these elaborate skits, I've seen people use it for small stylistic things like rendering eyes in front of hair

Benzer Videolar