#How would you approach Escape From Duckov’s shadow?

1 messages · Page 1 of 1 (latest)

errant rapids
#

I’m trying to recreate this effect where everything seems like it’s in shadow except for the vision cone. I’m able to procedurally generate the vision cone as a mesh but I’m a bit lost from how to proceed from there and could use some pointers

sullen flax
#

Is the map always covered in shadows and the vision is what reveals / removes the shadowing? So fog of war?

floral field
#

I think they're talking about the edges of the screen, which seems to be a vignette post processing.🤔

errant rapids
narrow valve
# errant rapids I’m trying to recreate this effect where everything seems like it’s in shadow ex...

You can describe the sphere and the cone as distance functions in a shader, combined together
https://iquilezles.org/articles/distfunctions/
And because the view shadowing is separate from shadows of the lighting, you could use it to tint the base color in a Lit shader without having to deal with custom lighting
Or apply it as a screen space post process darkening effect, alternatively
But you probably want it to affect the alpha of each mesh's shader in any case, so they disappear into the fog of war

#

The example uses dithered opaque alpha so it can do smooth fading without having to make the objects transparent

sullen flax
#

I was thinking you can probably do it with post-processing

#

there's still shadowing here so it's not totally light based

#

just map out the vision using orthographic projection then with PP you can darken pixels that weren't revealed

#

well basically what spazi said lel

#

you can also do stencil shapes where you just throw a gigantic transparent quad on the map, then cut holes in it. It works pretty well if you don't have much depth in your games

narrow valve
#

Because it has to be a shader on the meshes, I can't think of any practical advantage of going with the post process route
It'd allow to tint after calculating lighting, but ignore non-depth writing geometry like particles

#

(but custom lighting allows for post-light tinting too, and Unity 6.3 should make that easy (once it's a stable version))