Skip to content

Wake‐up Option

nkdtr edited this page Apr 22, 2024 · 3 revisions

Summary

image
Intersections between 3D backgrounds and camera-facing sprites are often problematic, especially in Top-View games.
image

The Wake-up option eliminates this problem to some extent, but should be implemented with caution because it does not work well from a near-vertical perspective and other side effects are to be expected.

Caution:
This is only for AnimSpriteRender component (provided by A2S).

How to setup

When using material instances based on embedded materials (M_AnimSprite/M_AnimSprite_Toon), check "bWakeSprite" to enable this option.
"WakeRate" determines the strength of its effect.
image

If you use your original material, just immitate M_AnimSprite.

MF_WakeSprite does the calculation.
image

Then check "Use Subdivided Mesh" in the details of AnimSpriteRender component.
image

Technical Explanation

This section describes the actual effect of this option.
This may help in analyzing the side effects that would occur.

Wake Sprite option offsets the vertices toward the camera so that the mesh stands vertically.
image

This requires a subdivided mesh to deter image distortion.
A2S provides a quad mesh subdivided into 8x8 rectangles.