Attaching particles to Moviestorm props, it's a bit complicated
 
Ben_S
post Aug 24 2011, 3:19 PM
Post #1


Master Director
Group Icon

Group: Administrators
Posts: 4,236
Joined: 18-January 07
Member No.: 116



How to attach particle special effects to your props

Moviestorm props can have particle effects attached to bones that are part of the prop.

Set object props can have a continious particle effect attached; held props can have a either a duration based effect, or a burst effect, and the effects are triggered by animations.

The existing examples of these behavious are best seen in the props in the Special Effects content pack.

Moviestorm Particle Systems are defined in .mps files; we have a number of them already defined in the SpecialEffects content pack, and they are in Data/fx. These are, like much of moviestorm, xml text files.
These were initially generated in a particle editor in the modders workshop, which unfortunatly doesnt work in the user version. One could make new effects based on existing particle systems, just by tweaking the numbers with copies of the existing effects.
Continious effects are <fuze3d.particles.ParticleFountain> or possibly <fuze3d.particles.ParticleStream>, and the burst ones are <fuze3d.particles.ParticleBurst>.

Props which are to use particle effects use the 'PyroProp' class, instead of the more normal 'Prop' class; this means that objects that would not normally be of the 'Prop' class cannot be made into 'PyroProps' while retaining their normal function. This means that particle effects cannot work with 'Car' or 'AutoAnimate' or 'Door' or 'Window' props.


To make your prop have an attached particle effect, you need to, while making your prop in your 3D package, create a bone that will be the source position for the particles; if you are using sketchup with our sketchup importer, you dont get to create bones, but you get one by defaul.
Then, in the modders workshop, you need to set up your prop as normal, except that you need to change the type from 'Prop' to 'PyroProp'.
You need to set up the template or template and parts as normal, but then you need to edit the .template file (or the .part if you are using parts instead) in a text editor.

Near the end of the template (before the </mscope.things.factory.ModelTemplate> ), add a <bindings> section
an example:
CODE
  <bindings>
    <boneBindings>
        <EffectBinding>
            <name>fire</name>
            <bone>emitter_bone</bone>
            <mpsPath>Data/fx/Barrel_Fire_Small.mps</mpsPath>
        </EffectBinding>
    </boneBindings>
  </bindings>


The name isnt important, except for held props with particles; change it to something apropriate.
The bone is the name of the bone in your model that will emit the particles; you can see the bone names in the modders workshop on the Bones tab.
the mpsPath shows the path to the particle effect, and it's filename; you can use any of the particle effects in the fx folder, although the ones with ParticleFountain or ParticleStream effects will work better than the ones with ParticleBurst effects (as the latter will only fire once).

You can also have a light attached, eg:
CODE
  <bindings>
    <boneBindings>
        <EffectBinding>
            <name>flame</name>
            <bone>emitter_bone</bone>
            <mpsPath>Data/fx/Fireball_Medium.mps</mpsPath>
            <light>
                <type>flicker</type>
                <color>1 0.95 0.4 1</color>
                <halo>
                    <radius>0.8</radius>
                    <offset>0.05</offset>
                </halo>
            </light>                
        </EffectBinding>
    </boneBindings>
  </bindings>

The different types available are 'flicker' or 'standard'. The color is in Red Green Blue Alpha.
The halo goes around the light, and the radius can be changed; the offset affects how far in front of the object the halo is visable.


If your prop is a held prop, then it needs to be set up like this, except that when setting up the animations, events need to be added to the animation transitions, to trigger the particle effects.
Examples can be found for the wand, sparkler and torch, in the Special Effects pack.
The event used is custsom, playEffect, and the number seems to be 1 for one off effects, 3 for duration effects (and the duration effects need a 3 for the stopEffect, too).


--------------------
Ben Sanders
Moviestorm Ltd
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
PapaG
post Feb 2 2012, 4:27 AM
Post #2


Master Director
Group Icon

Group: Pioneers
Posts: 800
Joined: 17-March 09
Member No.: 4,574



cool one of these days Ill have to try this


--------------------
Go to the top of the page
 
+Quote Post

Posts in this topic
- Ben_S   Attaching particles to Moviestorm props   Aug 24 2011, 3:19 PM
- - Chris Ollis   before people get very excited, can I remind that ...   Aug 24 2011, 3:31 PM
- - lucindamc123   Thanks Ben, I think I might be able to do this. Al...   Aug 24 2011, 5:45 PM
- - Reacher   Good info, thanks for sharing Ben! -- Reacher   Aug 25 2011, 12:21 AM
- - daleh   Successfully created my first Pyroprop yesterday, ...   Nov 7 2011, 10:57 AM
- - Ben_S   You could change the light colour to something low...   Nov 7 2011, 11:39 AM
|- - daleh   QUOTE (Ben_S @ Nov 7 2011, 11:39 AM) You ...   Nov 7 2011, 12:21 PM
- - Ben_S   If you dont like losing out on the halo, you could...   Nov 7 2011, 1:23 PM
- - Nahton   I have a quick question on this but it's more ...   Jan 31 2012, 11:22 AM
|- - Ben_S   QUOTE (Nahton @ Jan 31 2012, 11:22 AM) I ...   Jan 31 2012, 2:58 PM
- - corthew   How did I miss this thread? Nahton. thanks for bum...   Jan 31 2012, 12:06 PM
|- - Nahton   QUOTE (corthew @ Jan 31 2012, 07:06 AM) H...   Jan 31 2012, 1:11 PM
- - Nahton   QUOTE (Ben_S @ Aug 24 2011, 10:19 AM) If ...   Feb 1 2012, 4:33 AM
- - Ben_S   Your bindings section in your template looks reaso...   Feb 1 2012, 10:43 AM
|- - Nahton   QUOTE (Ben_S @ Feb 1 2012, 05:43 AM) Your...   Feb 1 2012, 1:28 PM
- - Ben_S   Got them; will hopefully have a look at them in th...   Feb 1 2012, 2:28 PM
- - Ben_S   Capitalisation for bone names is important 'Bo...   Feb 1 2012, 5:59 PM
|- - Nahton   QUOTE (Ben_S @ Feb 1 2012, 12:59 PM) Capi...   Feb 2 2012, 6:00 AM
|- - Ben_S   QUOTE (Nahton @ Feb 2 2012, 06:00 AM) ARG...   Feb 2 2012, 10:46 AM
|- - Nahton   QUOTE (Ben_S @ Feb 2 2012, 05:46 AM) I mi...   Feb 2 2012, 2:42 PM
|- - Poulet Noir   QUOTE (Nahton @ Feb 2 2012, 02:42 PM) I...   Feb 2 2012, 5:45 PM
|- - Ben_S   QUOTE (Nahton @ Feb 2 2012, 02:42 PM) Hmm...   Feb 2 2012, 6:03 PM
|- - Nahton   QUOTE (Ben_S @ Feb 2 2012, 01:03 PM) I th...   Feb 6 2012, 4:59 AM
- - Poulet Noir   Stick with it, you're nearly there! Then ...   Feb 2 2012, 8:15 AM
- - Ben_S   It's a 4x4 transform matrix. The numbers you w...   Feb 6 2012, 11:48 AM
- - Ben_S   It appears that you want the particle effect to be...   Feb 6 2012, 12:08 PM
|- - Nahton   QUOTE (Ben_S @ Feb 6 2012, 07:08 AM) It a...   Feb 6 2012, 4:40 PM
- - Ben_S   Idealy it would be better to aim the bone that the...   Feb 7 2012, 11:11 AM
- - Nahton   Ben, I had to step it back a little before I prov...   Feb 8 2012, 2:03 AM
- - Ben_S   Each prop only uses one skeleton file - if there i...   Feb 8 2012, 10:54 AM
|- - Nahton   QUOTE (Ben_S @ Feb 8 2012, 05:54 AM) Each...   Feb 8 2012, 11:24 AM
- - Ben_S   I have a hard time believing that the differences ...   Feb 8 2012, 3:06 PM
|- - Nahton   QUOTE (Ben_S @ Feb 8 2012, 10:06 AM) I ha...   Feb 9 2012, 5:23 AM
- - Nahton   I just wanted to provide an update for anyone foll...   Feb 9 2012, 9:50 PM
- - gspoutnik   Hello Can you help me i would like to have fire on...   Dec 3 2012, 4:11 PM
|- - Ben_S   CODE <string>HAllumetteBed_mesh</strin...   Dec 3 2012, 5:33 PM
|- - gspoutnik   Does your match have a bone called 'emitter_bo...   Dec 3 2012, 6:16 PM
|- - primaveranz   QUOTE (gspoutnik @ Dec 4 2012, 6:16 AM) D...   Dec 3 2012, 8:03 PM
|- - gspoutnik   Yes my upper bone is now called "emitter_bone...   Dec 3 2012, 8:32 PM
|- - Nahton   QUOTE (gspoutnik @ Dec 3 2012, 3:32 PM) Y...   Dec 4 2012, 12:58 AM
- - Nahton   More info: Modders Workshop (MWS): How to set you...   Dec 4 2012, 1:23 AM
|- - gspoutnik   I need to edit the template and add the code ...   Dec 4 2012, 1:41 AM
|- - Nahton   QUOTE (gspoutnik @ Dec 3 2012, 8:41 PM) I...   Dec 4 2012, 2:20 AM
|- - gspoutnik   thanks for all it's 4:00am in france i'll ...   Dec 4 2012, 3:21 AM
|- - gspoutnik   Hello I just realize that the particles do not wor...   Dec 4 2012, 12:00 PM
|- - Ben_S   QUOTE (gspoutnik @ Dec 4 2012, 12:00 PM) ...   Dec 4 2012, 3:10 PM
- - Nahton   That is strange unless you have a video card issue...   Dec 4 2012, 1:39 PM
|- - gspoutnik   Système d'exploitation MS Windows 7 Home P...   Dec 4 2012, 5:37 PM
- - Ben_S   In your addon rar you attached, AllumetteBed is se...   Dec 4 2012, 3:31 PM
- - kv   That will run moviestorm fine. Load moviestorm th...   Dec 5 2012, 5:10 PM
- - gspoutnik   all is on for the shaders but only "weather e...   Dec 5 2012, 5:30 PM
- - primaveranz   QUOTE (gspoutnik @ Dec 6 2012, 5:30 AM) a...   Dec 5 2012, 7:48 PM
- - Ben_S   QUOTE (primaveranz @ Dec 5 2012, 7:48 PM)...   Dec 5 2012, 11:31 PM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: