Morphing Terrain Issues: Difference between revisions
m (→Synopsis) |
Angry Beaver (talk | contribs) mNo edit summary |
||
Line 6: | Line 6: | ||
==Workarounds== | ==Workarounds== | ||
The only work arounds that exsist are to add in a [[func_movelinear]] or other moving brush, and simply have that move up under the terrain. Making the brushes shape match the terrain is supposed to be. This does not however help with indentations. One thought I had was to shift the entire dispalcement up, and then move part down later. but this requires a network of the entites as you cannot move the vertecies in 1 plane. Along with the fact the vertecies always move towards the point itself. This means you have to place them every second vertex around the edge and then fill in the center in a grid like manor. Now you will need to change the radius so that the terrain morphs will cancel each others side ways movements out and just raise the terrain. This is tricky and theres no simple rule of thumb, unless you like exponential equations :). You can chosoe to place one per vertex as it is much easier to manage, but the entity load will increase drastically. Of course after the terrain shitfs up you need to update the collision frame again by use of a brush, and there should be another brush to move down for your indentation. Its messy so you probably wont see it much. | |||
One thing though is that this problem is not all bad, how you ask? Snow. You can use the fact it doesn't update the collision hull to create a depth to your snow displacements. |
Revision as of 16:25, 29 August 2005
Synopsis
Using the Env_terrainmorph does not update the collision hull. Tracing through the code leads you to engine->ApplyTerrainMod(), and the trail basicly ends there for the SDK. Can anything be done to "fix" this? Morphable terrain isn't very useful when it doesn't modify the collisions. I heard there was an E3 Demo of Source and the ability to morph the terrain along with updating the collisions was shown, yet the functionality appears to be absent now.
Workarounds
The only work arounds that exsist are to add in a func_movelinear or other moving brush, and simply have that move up under the terrain. Making the brushes shape match the terrain is supposed to be. This does not however help with indentations. One thought I had was to shift the entire dispalcement up, and then move part down later. but this requires a network of the entites as you cannot move the vertecies in 1 plane. Along with the fact the vertecies always move towards the point itself. This means you have to place them every second vertex around the edge and then fill in the center in a grid like manor. Now you will need to change the radius so that the terrain morphs will cancel each others side ways movements out and just raise the terrain. This is tricky and theres no simple rule of thumb, unless you like exponential equations :). You can chosoe to place one per vertex as it is much easier to manage, but the entity load will increase drastically. Of course after the terrain shitfs up you need to update the collision frame again by use of a brush, and there should be another brush to move down for your indentation. Its messy so you probably wont see it much.
One thing though is that this problem is not all bad, how you ask? Snow. You can use the fact it doesn't update the collision hull to create a depth to your snow displacements.