PyPRP:Footstep Decals

Revision as of 16:07, 21 May 2008 by Nadnerb (Talk | contribs) (Activator regions (Puddles))

NOTE: This feature is not yet available in a release version of PyPRP. It is currently functional in the trunk version from the SVN, however, it's use and interface is subject to change without notice, and may be different at the time of release.

Introduction

Footstep material
Dynamic footprints

Plasma has the ability to add footprint decals to visual surfaces that your avatar steps on. The only requirement for using this feature is setting up a material to represent a footprint.

Setting up the materials

The simplest way to do this is to create a hidden plane somewhere in your age, and texture it with a simple footprint texture. The texture should be partially transparent, and generally foot-shaped. It can be a simple dark mark, or a sandy imprint like those found in Minkata.

You can make your footprint texture quite small, a texture 128x64 pixels will give you plenty of detail (if you want detail).

Make the background totally transparent and the footprint partially transparent (depending on how "strong" you want the footprint to appear). A detailed footprint should look something similar to this:

Footprint.jpg


Once you have created and named this material in blender, you simply need to set up the footprint manager.

Scripting

Add the following script to any object, for instance, one of the surfaces you intend to have footprints on. Fill in the blanks with the name of the material you created, and the names of all the objects you want footprints to appear on in the targets list.

<object name>:
    logic:
        actions:
         - type: footmgr
           footmgr:
               matpreshade: <material ref>
               matrtshade: <material ref>
               targets:
                - <scnobj ref>
                - <scnobj ref>

Activator surfaces (Puddles)

<object name>:
    logic:
        actions:
         - type: puddlemgr
           puddlemgr:
               matrtshade: <material ref>
               targets:
                - <puddle surface>
               notifies:
                - <footmgr ref>