SC2Mapster Forums

Development > Data

Adding a texture trail to units.

  • 8 posts
    #1 Feb 26, 2013 at 19:06 UTC - 0 likes

    Hi there. I have been looking for away to make a marine (for example) to make a trail when it moves.

    I do not want the trail to blend in very quickly. The map we are making could last up to 1 hour long but i want the effect to be more of a long term visual thing. When the marine is walking on agria green grass, i want it to very very lightly change the texture to agria dirt. I hope to give the map a "live" feeling. I already have created terrain deformations for large explosions and that, I am familiar with creating and editing actors and events. I am not the best with triggers but if someone explained it well, I can attempt.

    Also, I plan to give it to all the units. Vehicles with wheels will have a slightly stronger effect, but still very light that you wont notice its happening if the game only lasts 10 minutes.

    Thanks Marc

    #2 Feb 26, 2013 at 22:11 UTC - 0 likes

    Like molten in D3? Just have a periodic creation of a terrain hugging model like the zerg aoe cursor splat retextured. Give it simiar event to the high templar images as it walks.

    #3 Feb 27, 2013 at 21:37 UTC - 0 likes

    Hi there, yes kind of like the molten in D3. Wouldn't the way you are suggesting suddenly change the texture of the ground?

    #4 Feb 27, 2013 at 21:52 UTC - 0 likes

    You can set the opacity to 0.01 or something to render the model almost transparent. This still has the problem that within an hour, at a rate of 2 steps per second, a single unit will have created 7200 of these splats. Now multiply that with 100*number of players and check if your GPU can handle that.

    Maybe you could make these splats "eat" eachother (search for splat, destroy it, increase own opacity), is there an equivalent to the Search Area effect for actors?

    #5 Feb 28, 2013 at 09:17 UTC - 0 likes

    Hmm maybe the splat idea is not so good. I was thinking along the lines of terrain deformation , except it changes the texture of the terrain. Not loads of layers of splats.

    #6 Feb 28, 2013 at 20:46 UTC - 0 likes

    Unless I missed something, SC2 lacks the ability to change the ground texture, which WC3:TFT had. Splat actors are your only option. The good news is that you can use the unit footprint system (which is there but unused in vanilla) to place the splats. I think I posted about this somewhere, but the gist is that you set the footprint event in the model data, so it knows when in the unit's animation to consider the foot down:

            <Events>
                <Anim value="Walk,00"/>
                <Name value="FootprintRight"/>
                <Type value="FootprintRight"/>
                <Time value="0.500000"/>
            </Events>
            <Events>
                <Anim value="Walk,00"/>
                <Name value="FootprintLeft"/>
                <Type value="FootprintLeft"/>
                <Time value="0.995000"/>
            </Events>
            <Events>
                <Anim value="Walk,Left"/>
                <Name value="FootprintRight"/>
                <Type value="FootprintRight"/>
                <Time value="0.505000"/>
            </Events>
            <Events>
                <Anim value="Walk,Left"/>
                <Name value="FootprintLeft"/>
                <Type value="FootprintLeft"/>
                <Time value="0.995000"/>
            </Events>
            <Events>
                <Anim value="Walk,Right"/>
                <Name value="FootprintRight"/>
                <Type value="FootprintRight"/>
                <Time value="0.490000"/>
            </Events>
            <Events>
                <Anim value="Walk,Right"/>
                <Name value="FootprintLeft"/>
                <Type value="FootprintLeft"/>
                <Time value="0.995000"/>
            </Events>

    And then in the actor data you set the footprint model (which would be your splat):

            <EventDataFootprint index="0" Name="FootprintRight" Actor="PitLordRightFootprint" Model="PitLordFootprint"/>
            <EventDataFootprint Name="FootprintLeft" Actor="PitLordLeftFootprint" Model="PitLordFootprint"/>

    The bad news is that you would have to create a splat actor that suits you, or use DrSuperEvil's suggestion.

    #7 Feb 28, 2013 at 21:40 UTC - 0 likes

    @Photoloss: Go

    It is called Query Region and used by the colossus tree killer. My data asset on the turret simulation uses it.

    @TrenchaunT: Go

    Actually the odin uses footprints.

    #8 Feb 28, 2013 at 22:11 UTC - 0 likes

    @DrSuperEvil:

    Yeah, at least with the campaign dependencies as I have them set, though, the Odin footprints are present but not actually implemented. So one may not be able to look to the Odin for an example of working footprints. The model is in there, but the model data does not specify a footprint event and the actor data does not refer to a valid model or a footprint event.

  • 8 posts

You must login to post a comment. Don't have an account? Register to get one!