Enabling Touch Responsiveness: Difference between revisions

From Warren's Fast Fur Shader
Jump to navigation Jump to search
(Added the "Adding a Directional Light" section)
 
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:


=== Step 2: Select the newly created light, and change the following 4 settings: ===
=== Step 2: Select the newly created light, and change the following 4 settings: ===
[[File:Touch Response - Light settings.png|none|thumb|500x500px|The Directional Light settings]]
'''Step 2a: Make sure the checkmark in the upper-left is enabled.'''[[File:Touch Response - Light settings.png|none|thumb|500x500px|1The Directional Light settings]]


=== Step 3: Confirm that the light is working by enabling "Show Contact Zones". If the lighting is not correct, a checkboard pattern will appear: ===
=== Step 3: Confirm that the light is working by enabling "Show Contact Zones". If the lighting is not correct, a checkboard pattern will appear: ===
[[File:Touch Response - Error.png|none|thumb|600x600px|The checkerboard error pattern]]
[[File:Touch Response - Error.png|none|thumb|600x600px|The checkerboard error pattern]]
== Preventing Self-Triggering ==
The touch-response works by using the camera depth-texture to detect nearby objects. Unfortunately, this means the body will self-trigger in crevasses. The "Show Contact Zones" blue areas indicate where this self-triggering is occurring:
[[File:Touch Response - No occlusion map.png|none|thumb|600x600px|No occlusion map]]
This problem can be reduced by adding an "Occlusion Map" that has been baked in Blender to your avatar. The sensitivity level can then be adjusted so that crevasses are excluded (indicated by the red areas):
[[File:Touch Response - Occlusion map.png|none|thumb|600x600px|Using an occlusion map]]
'''Note: in the future, this feature will be moved to a separate mask, which will be directly editable using the Fur Grooming.'''

Latest revision as of 19:27, 27 June 2024

The touch-responsiveness requires that Unity generate a camera-depth texture, which is dependant on the world's lighting. In worlds that do not have the correct lighting, you can add one to your avatar (note that this will automatically make your avatar rating "Poor").

Adding a Directional Light to your Avatar[edit | edit source]

Step 1: Left-click on your avatar, and select "Light -> Directional Light" to add a new light:[edit | edit source]

Adding a Directional Light

Step 2: Select the newly created light, and change the following 4 settings:[edit | edit source]

Step 2a: Make sure the checkmark in the upper-left is enabled.

1The Directional Light settings

Step 3: Confirm that the light is working by enabling "Show Contact Zones". If the lighting is not correct, a checkboard pattern will appear:[edit | edit source]

The checkerboard error pattern

Preventing Self-Triggering[edit | edit source]

The touch-response works by using the camera depth-texture to detect nearby objects. Unfortunately, this means the body will self-trigger in crevasses. The "Show Contact Zones" blue areas indicate where this self-triggering is occurring:

No occlusion map

This problem can be reduced by adding an "Occlusion Map" that has been baked in Blender to your avatar. The sensitivity level can then be adjusted so that crevasses are excluded (indicated by the red areas):

Using an occlusion map

Note: in the future, this feature will be moved to a separate mask, which will be directly editable using the Fur Grooming.