Invisible Heightmap Support
Posted: 29 Nov 2009, 09:42
I have figured out what I think is a good idea for allowing bridges and other fancy stuff.
I think this might even be reasonably simple.
Allow for heightmap changes that came with a certain tag that prevented them from being translated into geometry changes. Or, alternatively, just give us a callout for masking an area, and then any changes to this area would be ignored by the SMF interpreter.
This would achieve all of the goals for bridges and other things where we want heightmap changes but don't want visual changes in the rendered geometry (we could use Lua to raise the heightmap, but apply that mask value, voila), but:
1. We'd need to be able to see the true heightmap to debug, I guess wireframe could do that.
2. The map interpreter would have to accept a mask value for those squares, and act like they were at the original height when drawing the geometry. It would ignore all heightmap changes in the masked zone, basically.
3. Ideally... Units could have a state, set via Lua, that allowed them to also ignore the heightmap's true state, and use the original state. This probably can't be done for mobile Units, but it's not what I had in mind. This would allow for some very interesting stuff to happen all of a sudden.
Hey, if we had this, and GLSL shader support for SMF, we could pretty much do what we've seen in SupCom 2's map rendering, and doing really fancy mixed-media maps with "blocked off" areas that also affected aircraft flight would be entirely possible. Want your map to have impassible, indestructible zones? This would allow you to do that, and if the Unit tag in #3 were allowed, then you could put forests or rocks or rubble or whatever you wanted in those zones, providing a visual reason why players were blocked.
Hell, we could even use this and some typemap stuff (if Kloot ever responds to my PM about certain testing problems that still need to be addressed) to put invisible, aircraft-friendly slopes around cliff zones that ground Units couldn't use, and other things, etc. All we need is a mask-state and the change to ROAM, basically, to treat the areas as if no damage had occurred. I suppose that in some circumstances, this could lead to odd behavior (aircraft slamming into "air", etc.), but that's something that could be managed with experimentation.
Oh, and we could also use this to have factories whose floors weren't on the ground level.
Basically, this isn't a panacea and doesn't give us 3D maps, but it would be awfully close.
I think this might even be reasonably simple.
Allow for heightmap changes that came with a certain tag that prevented them from being translated into geometry changes. Or, alternatively, just give us a callout for masking an area, and then any changes to this area would be ignored by the SMF interpreter.
This would achieve all of the goals for bridges and other things where we want heightmap changes but don't want visual changes in the rendered geometry (we could use Lua to raise the heightmap, but apply that mask value, voila), but:
1. We'd need to be able to see the true heightmap to debug, I guess wireframe could do that.
2. The map interpreter would have to accept a mask value for those squares, and act like they were at the original height when drawing the geometry. It would ignore all heightmap changes in the masked zone, basically.
3. Ideally... Units could have a state, set via Lua, that allowed them to also ignore the heightmap's true state, and use the original state. This probably can't be done for mobile Units, but it's not what I had in mind. This would allow for some very interesting stuff to happen all of a sudden.
Hey, if we had this, and GLSL shader support for SMF, we could pretty much do what we've seen in SupCom 2's map rendering, and doing really fancy mixed-media maps with "blocked off" areas that also affected aircraft flight would be entirely possible. Want your map to have impassible, indestructible zones? This would allow you to do that, and if the Unit tag in #3 were allowed, then you could put forests or rocks or rubble or whatever you wanted in those zones, providing a visual reason why players were blocked.
Hell, we could even use this and some typemap stuff (if Kloot ever responds to my PM about certain testing problems that still need to be addressed) to put invisible, aircraft-friendly slopes around cliff zones that ground Units couldn't use, and other things, etc. All we need is a mask-state and the change to ROAM, basically, to treat the areas as if no damage had occurred. I suppose that in some circumstances, this could lead to odd behavior (aircraft slamming into "air", etc.), but that's something that could be managed with experimentation.
Oh, and we could also use this to have factories whose floors weren't on the ground level.
Basically, this isn't a panacea and doesn't give us 3D maps, but it would be awfully close.