Difference between revisions of "PyPRP:Footstep Decals"

(Activator regions (Puddles))
m (Deledrius moved page Footstep Decals to PyPRP:Footstep Decals: Change page name to conform with naming conventions.)
 
(17 intermediate revisions by 4 users not shown)
Line 1: Line 1:
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.
+
{{Tutorial|Footstep_Decals|PyPRP}}
  
 
== Introduction ==
 
== Introduction ==
Line 21: Line 21:
 
== Scripting ==
 
== 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.
 
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.
 +
 +
(Version 1.4.0 of the plugin needs you to set the lifespan of the footprints (how many seconds you want each footprint to be visible until they dissapear)
  
 
  <object name>:
 
  <object name>:
 
     logic:
 
     logic:
 
         actions:
 
         actions:
          - type: footmgr
+
          - type: footmgr
            footmgr:
+
            footmgr:
                matpreshade: <material ref>
+
                matpreshade: <material ref>
                matrtshade: <material ref>
+
                matrtshade: <material ref>
                targets:
+
                lifespan: 20
                 - <scnobj ref>
+
                 waitonenable: 0
                - <scnobj ref>
+
                targets:
 +
                  - <object name>
 +
                  - <object name>
  
== Activator surfaces (Puddles) ==
+
== Activator surfaces ==
 +
 
 +
=== Non-Waveset Surfaces ===
 +
Puddles are used to create the ripples in water caused by the avatar walking through a surface. To add them, either add the water plane the "targets" list, or, if you are using a waveset; see below. The material references should point to a circular ripple material, or whatever sort of disturbance you want the avatar to make on the water's surface.
 +
 
 +
 
 +
To make your avatar ripple texture have the spreading-out effect set 'initu', 'initv', 'finalu' and 'finalv'.  To make your ripple texture not tiled-looking go to the 'texture' settings in the buttons window for the ripple texture and select the 'clip' button.
 +
 
 +
The numbers added to the init and final vars are times that the texture is tiled.  So a good values to start with would be 'initu: 4', 'initv: 4', 'finalu: 1' and 'finalv: 1'.
 +
 
 +
 
 +
Puddles also allow for "wet feet" effects, where walking through the puddles will cause you to have footprints for a short period of time. The puddle surface will be the activator. When you walk through it, making ripples, the puddle will trigger the footmgrs in the "notifies" list. You will also need to set "waitonenable: 1" in the footmgrs you want activated this way, which will stop them from being on by default.
 
  <object name>:
 
  <object name>:
 
     logic:
 
     logic:
 
         actions:
 
         actions:
          - type: puddlemgr
+
          - type: puddlemgr
            puddlemgr:
+
            puddlemgr:
                matrtshade: <material ref>
+
                matpreshade: <material ref>
                targets:
+
                matrtshade: <material ref>
                - <puddle surface>
+
                targets:
                notifies:
+
                  - <puddle surface>
                 - <footmgr ref>
+
                notifies:
 +
                  - <footmgr ref>
 +
                 initu: <initial size of ripple in U-axis>
 +
                initv: <initial size of ripple in V-axis>
 +
                finalu: <final size of ripple in U-axis>
 +
                finalv: <final size of ripple in V-axis>
 +
 
 +
=== Waveset Surfaces ===
 +
Use the same method as you do to create the puddle materials.
 +
 
 +
Then use "ripplevsmgr" instead of the "puddlemgr" and add a ref for your waveset object.
 +
 
 +
For these ripples, it is suggested that you use materials with the "add" or "multiply" blend modes, as they may appear strange in the default mode.
 +
 
 +
<object name>:
 +
    logic:
 +
        actions:
 +
          - type: ripplevsmgr
 +
            ripplevsmgr:
 +
                matpreshade: <material ref>
 +
                matrtshade: <material ref>
 +
                targets:
 +
                  - <waveset surface>
 +
                notifies:
 +
                  - <footmgr ref>
 +
                waveset: <waveset ref(same name as waveset surface)>
 +
                initu: <initial size of ripple in U-axis>
 +
                initv: <initial size of ripple in V-axis>
 +
                finalu: <final size of ripple in U-axis>
 +
                finalv: <final size of ripple in V-axis>
 +
 
 +
[[Category:PyPRP]]

Latest revision as of 09:32, 4 March 2020

Disambig gray.png

This is a tutorial page.Versions available: PyPRP; 3ds Max; Korman.
 

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.

(Version 1.4.0 of the plugin needs you to set the lifespan of the footprints (how many seconds you want each footprint to be visible until they dissapear)

<object name>:
    logic:
        actions:
          - type: footmgr
            footmgr:
                matpreshade: <material ref>
                matrtshade: <material ref>
                lifespan: 20
                waitonenable: 0
                targets:
                  - <object name>
                  - <object name>

Activator surfaces

Non-Waveset Surfaces

Puddles are used to create the ripples in water caused by the avatar walking through a surface. To add them, either add the water plane the "targets" list, or, if you are using a waveset; see below. The material references should point to a circular ripple material, or whatever sort of disturbance you want the avatar to make on the water's surface.


To make your avatar ripple texture have the spreading-out effect set 'initu', 'initv', 'finalu' and 'finalv'. To make your ripple texture not tiled-looking go to the 'texture' settings in the buttons window for the ripple texture and select the 'clip' button.

The numbers added to the init and final vars are times that the texture is tiled. So a good values to start with would be 'initu: 4', 'initv: 4', 'finalu: 1' and 'finalv: 1'.


Puddles also allow for "wet feet" effects, where walking through the puddles will cause you to have footprints for a short period of time. The puddle surface will be the activator. When you walk through it, making ripples, the puddle will trigger the footmgrs in the "notifies" list. You will also need to set "waitonenable: 1" in the footmgrs you want activated this way, which will stop them from being on by default.

<object name>:
    logic:
        actions:
          - type: puddlemgr
            puddlemgr:
                matpreshade: <material ref>
                matrtshade: <material ref>
                targets:
                  - <puddle surface>
                notifies:
                  - <footmgr ref>
                initu: <initial size of ripple in U-axis>
                initv: <initial size of ripple in V-axis>
                finalu: <final size of ripple in U-axis>
                finalv: <final size of ripple in V-axis>

Waveset Surfaces

Use the same method as you do to create the puddle materials.

Then use "ripplevsmgr" instead of the "puddlemgr" and add a ref for your waveset object.

For these ripples, it is suggested that you use materials with the "add" or "multiply" blend modes, as they may appear strange in the default mode.

<object name>:
    logic:
        actions:
          - type: ripplevsmgr
            ripplevsmgr:
                matpreshade: <material ref>
                matrtshade: <material ref>
                targets:
                  - <waveset surface>
                notifies:
                  - <footmgr ref>
                waveset: <waveset ref(same name as waveset surface)>
                initu: <initial size of ripple in U-axis>
                initv: <initial size of ripple in V-axis>
                finalu: <final size of ripple in U-axis>
                finalv: <final size of ripple in V-axis>