Announcement

Collapse
No announcement yet.

Tutorial: Exporting & Importing Emitters

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Tutorial: Exporting & Importing Emitters

    Exporting & Importing Emitters Created with the Particle System Editor

    After years of not being able or knowing how to properly clone an emitter or get one into another map (except by manually exporting each sub-emitter via Particle System Editor), recent work on the Gunreal mod for UT2004/2007 happened upon a successful and very easy way to do it.

    Normally, if you "clone" an emitter, or copy/paste one, it comes out empty, and you say, "Hey, where are all my sub-emitters?". With this method you can copy/paste an emitter with infinite sub-emitters and get a fresh new duplicate that's completely independant.

    Important note: this method can take about 10 seconds from start to finish, and requires no coding, so don't scroll down and give up when you see code.
    ----------------------------------------------------------------------------

    Exporting & Importing Emitters (tutorial)

    - Find the Emitter that you want to to duplicate or export into another map.

    - Copy it, then Paste it into Notepad.

    - At the end of the second line, add a 'c', or some random letter, like this:
    Begin Actor Class=Emitter Name=Emitter2c
    (if you choose to skip this step, any existing emitter with that name will be renamed to Emitter3, or the next free number)

    - Now hit CTRL+H or manually open notepad's Replace tool.
    Uder "Find What", put
    myLevel.Emitter2.
    (refer to second line for the emitter name, minus the c you added -- and don't forget the period at the end)
    Leave the "Replace With" section blank.

    - Click the "Replace All" button.

    - Copy all the text in notepad (you can just hit CTRL+A, then CTRL+C).

    - Paste it into your map (Right-click where you want the emitter, then go to "Edit>Paste>Here", or "Edit>Paste>To Original Location" if you want it in the same map location as the original, though it may or may not end up exactly where it was)

    That's it! In action, it takes literally seconds.


    --- You can use this method to clone multiple emitters at one time, too. ---
    Example: What if you have a whole map filled with outdated emitters, and you dont want to re-import and reposition the new ones one by one?

    Just select and copy all the new emitters at once, paste into notepad, then use the Replace Tool to do the replacing opertation once per emitter.

    It might help to write down all the emitter names beforehand, or hit CTRL+F and find all instances of the word Emitter, and write down their numbers.

    Once you've used the Replace tool for each emitter listed in notepad, just Paste into your map (after deleting the emitters that you are updating) using the "Paste At Original Location" method.

    Note: Since "Paste At Original Location" doesn't always put them at the exact original location, manually adjust their position while they're all still selected. Just fly the camera to an emitter that needs to be at a precise location, and put it where it needs to be. All the other emitters will be adjusted simultaneously, since they're still selected.


    Here's an example of before and after:


    Before
    Code:
    Begin Map
    Begin Actor Class=Emitter Name=Emitter57
        Begin Object Class=MeshEmitter Name=MeshEmitter1
            StaticMesh=StaticMesh'WeaponStaticMesh.RocketProj'
            UseCollision=True
            FadeOut=True
            RespawnDeadParticles=False
            SpinParticles=True
            DampRotation=True
            UseSizeScale=True
            UseRegularSizeScale=False
            UniformSize=True
            AutomaticInitialSpawning=False
            Acceleration=(Z=-900.000000)
            DampingFactorRange=(X=(Min=0.500000,Max=0.500000),Y=(Min=0.500000,Max=0.500000),Z=(Min=0.500000,Max=0.500000))
            ColorScale(0)=(Color=(B=255,G=255,R=255,A=255))
            ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255))
            MaxParticles=1
            Name="MeshEmitter1"
            UseRotationFrom=PTRS_Normal
            SpinsPerSecondRange=(X=(Min=1.000000,Max=1.000000),Y=(Min=1.000000,Max=1.000000),Z=(Min=1.000000,Max=1.000000))
            StartSpinRange=(X=(Min=1.000000,Max=1.000000),Y=(Min=1.000000,Max=1.000000),Z=(Min=1.000000,Max=1.000000))
            RotationDampingFactorRange=(X=(Min=0.500000,Max=0.500000),Y=(Min=0.500000,Max=0.500000),Z=(Min=0.500000,Max=0.500000))
            SizeScale(0)=(RelativeSize=1.200000)
            SizeScale(1)=(RelativeTime=0.070000,RelativeSize=0.800000)
            SizeScale(2)=(RelativeTime=1.000000,RelativeSize=0.800000)
            StartSizeRange=(X=(Min=0.800000,Max=0.800000),Y=(Min=0.800000,Max=0.800000),Z=(Min=0.800000,Max=0.800000))
            InitialParticlesPerSecond=111.000000
            DrawStyle=PTDS_Regular
            LifetimeRange=(Min=12.000000,Max=12.000000)
            StartVelocityRange=(X=(Min=240.000000,Max=320.000000),Y=(Min=180.000000,Max=350.000000))
        End Object
        Emitters(0)=MeshEmitter'myLevel.Emitter57.MeshEmitter1'
    
        Level=LevelInfo'myLevel.LevelInfo0'
        Region=(Zone=ZoneInfo'myLevel.ZoneInfo1',iLeaf=21,ZoneNumber=1)
        Tag="Emitter"
        PhysicsVolume=DefaultPhysicsVolume'myLevel.DefaultPhysicsVolume0'
        Location=(X=112.000000,Y=-2103.000000,Z=89.000000)
        DrawScale=0.400000
        bUnlit=False
        bSelected=True
    End Actor
    Begin Surface
    End Surface
    End Map
    After
    Code:
    Begin Map
    Begin Actor Class=Emitter Name=Emitter57b
        Begin Object Class=MeshEmitter Name=MeshEmitter1
            StaticMesh=StaticMesh'WeaponStaticMesh.RocketProj'
            UseCollision=True
            FadeOut=True
            RespawnDeadParticles=False
            SpinParticles=True
            DampRotation=True
            UseSizeScale=True
            UseRegularSizeScale=False
            UniformSize=True
            AutomaticInitialSpawning=False
            Acceleration=(Z=-900.000000)
            DampingFactorRange=(X=(Min=0.500000,Max=0.500000),Y=(Min=0.500000,Max=0.500000),Z=(Min=0.500000,Max=0.500000))
            ColorScale(0)=(Color=(B=255,G=255,R=255,A=255))
            ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255))
            MaxParticles=1
            Name="MeshEmitter1"
            UseRotationFrom=PTRS_Normal
            SpinsPerSecondRange=(X=(Min=1.000000,Max=1.000000),Y=(Min=1.000000,Max=1.000000),Z=(Min=1.000000,Max=1.000000))
            StartSpinRange=(X=(Min=1.000000,Max=1.000000),Y=(Min=1.000000,Max=1.000000),Z=(Min=1.000000,Max=1.000000))
            RotationDampingFactorRange=(X=(Min=0.500000,Max=0.500000),Y=(Min=0.500000,Max=0.500000),Z=(Min=0.500000,Max=0.500000))
            SizeScale(0)=(RelativeSize=1.200000)
            SizeScale(1)=(RelativeTime=0.070000,RelativeSize=0.800000)
            SizeScale(2)=(RelativeTime=1.000000,RelativeSize=0.800000)
            StartSizeRange=(X=(Min=0.800000,Max=0.800000),Y=(Min=0.800000,Max=0.800000),Z=(Min=0.800000,Max=0.800000))
            InitialParticlesPerSecond=111.000000
            DrawStyle=PTDS_Regular
            LifetimeRange=(Min=12.000000,Max=12.000000)
            StartVelocityRange=(X=(Min=240.000000,Max=320.000000),Y=(Min=180.000000,Max=350.000000))
        End Object
        Emitters(0)=MeshEmitter'MeshEmitter1'
    
        Level=LevelInfo'myLevel.LevelInfo0'
        Region=(Zone=ZoneInfo'myLevel.ZoneInfo1',iLeaf=21,ZoneNumber=1)
        Tag="Emitter"
        PhysicsVolume=DefaultPhysicsVolume'myLevel.DefaultPhysicsVolume0'
        Location=(X=112.000000,Y=-2103.000000,Z=89.000000)
        DrawScale=0.400000
        bUnlit=False
        bSelected=True
    End Actor
    Begin Surface
    End Surface
    End Map
    Go ahead and copy/paste this code (Before and After) into Ued and see what happens.

    -- (Method of cloning discovered by Switch', tutorial by Dario D.)

    #2
    This is strange that this just came up over at 3DBuzz too. Apparently, according to Hourences the particle editor is the culprit. Emitters made by hand should have no problems being simply copied and pasted, but emitters made in the particle editor can have these problems. Here is te explanation from Hourences:

    http://www.3dbuzz.com/vbforum/showthread.php?t=124720

    Comment


      #3
      Particle editor... lol
      Copying and pasting emitters into notepad is also a very quick way to get hard coded emitters into script.

      Comment


        #4
        What? Hey, shut up, particle editor pwns! :cry: :up:

        Comment

        Working...
        X