The effect is only visual, and trying to get the height at point will give you the pre-deformed value
The deformation is non stacking, and damages deformations arround it
Theory (skip this if your not interested in how I did it)
So, the ground surface in SC2 is actualy made of triangles. For each XY coordinate, there are two triangles set each time in the same way. Example: in the rectangle area from point [0,0] to point [1,1] there are two triangles. One is made from points [0,0] , [0,1] , [1,1] and the other one from [0,0] , [1,0] , [1,1]
I noticed that when you create a deformation actor with a footprint 1x1, it deforms only one point in the coordinate system. This gives me full power to adjust height of each point that creates the surface.
To doo this, I had to create a lot of deformation actors in the data editor. For each decimal place one actor.(Example Deformation depth 2.1 , 2.2 , 2.3) Simply a lot of pain. And to remember the deformation I made a Big array, called "Def array" its type is "real" The lenght of the array needs to correspond to the dimensions of your map.(or be bigger=waste of memory)
I created a simple globe deformation algorythm. What it does is:if the terrain point in the affected globe is higher than the bottom surface of the globe, then adjust its height.
Z coordinate calculation is quite simple. Just find out witch triangle corresponds to the XY point where you want to get the Z coordinate. Get the terrain height of all 3 points wich create that triangle. Add the stored deformation in "Def array" and you get 3 points in that triangle surface. These 3 points define a plane. The Z coordinate is the solution for your XY in that plane.
How to use my system:
Use the deform globe function to deform terrain. The Z coordinate in it is absolute.(not the height distance from terrain)
Use the Deformed Z function to get the absolute Z coordinate of the terrain. The Angle limit parameter does warn you with a text message that the surface angle is bigger than the limit(may be usefull to determine if a surface is pathable by units). If you dont want that message and instead want it to do something else, just open up the Deformed Z function, scroll to the bottom of it and find a comment "Angle limit crossed actions". All under that comment and in that condition is your to change. Add there anything you want it to do if the surface angle is bigger.
The maximum deformation is set to "5" If you want bigger deformations, you need to create more deformation actors, add them in the "Deformation actors" variable, and then in the deform globe function, at the bottom change the number in the last condition from 50 to YOUR MAXIMUM DEFORMATION multiplied by 10. Also in the last create actor action change the array number from 50 to the same as lasst time.
Thanks for your time, ask any questions, and if you decide to use this, please dont forget about me :)
So are you saying you could totally randomize or customise an entire epic map with this method?
Yup. The terrain def actors are set to disapper after a few seconds, but the deformation is set to remain, so there is no risk of overwhelming someones PC and cause lag. I used it in my map when there are explosions .. works fine. If your interested seeing it in action and your from EU, try out my map "Star worms" but you need someone with you or else it will turn of soon. (Sneaky sneaky advertising my map :P)
Secondly how would you go about saying something is unpathable if it is over a certain angle?
In my map for example im using triggers to move units. So I just change a variable to let the system know you cannot go there. But you could write an algorythm that would go through the entire explosion area and check each surface if its angle is fine. If not, place a pathing blocker with size 1x1. And you probably need to create a big array wich would contain information about the pathing blockers, so you can remove them or wont create multiple on the same spot. This would tough cause that in a rectangle area, one triangle of surface may be pathable and one not, and it would restrict movement on both, or you could try placing it in the center of the triangle rather than instead of a rectangle consiting of thoes two triangles.
Hello, here I will show you how to do this :)
The editor base deformation issue:
Theory (skip this if your not interested in how I did it)
How to use my system:
Thanks for your time, ask any questions, and if you decide to use this, please dont forget about me :)
So are you saying you could totally randomize or customise an entire epic map with this method?
Secondly how would you go about saying something is unpathable if it is over a certain angle?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
Yup. The terrain def actors are set to disapper after a few seconds, but the deformation is set to remain, so there is no risk of overwhelming someones PC and cause lag. I used it in my map when there are explosions .. works fine. If your interested seeing it in action and your from EU, try out my map "Star worms" but you need someone with you or else it will turn of soon. (Sneaky sneaky advertising my map :P)
In my map for example im using triggers to move units. So I just change a variable to let the system know you cannot go there. But you could write an algorythm that would go through the entire explosion area and check each surface if its angle is fine. If not, place a pathing blocker with size 1x1. And you probably need to create a big array wich would contain information about the pathing blockers, so you can remove them or wont create multiple on the same spot. This would tough cause that in a rectangle area, one triangle of surface may be pathable and one not, and it would restrict movement on both, or you could try placing it in the center of the triangle rather than instead of a rectangle consiting of thoes two triangles.
hope im not confusing :P
Or make a custom triangular pathing blocker.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Didint tought of that. I have no experience with pathing. Then it should work perfectly :)