Page 1 of 1

just curious about making invisable terrain

Posted: 20 Sep 2012, 05:10
by enetheru
Is there a shader I can use or something that will make portions of the terrain invisible?

void water doesn't serve my purposes.

Re: just curious about making invisable terrain

Posted: 20 Sep 2012, 05:25
by The Yak
Unfortunately void water is about the only solution I know of. Does the terrain need to be walkable? If not void water should work fine, see TMA-0 for good use of it. Otherwise I think you might be shit outta luck.

Re: just curious about making invisable terrain

Posted: 20 Sep 2012, 05:36
by enetheru
The Yak wrote:Unfortunately void water is about the only solution I know of. Does the terrain need to be walkable? If not void water should work fine, see TMA-0 for good use of it. Otherwise I think you might be shit outta luck.

Will be shit out of luck then, basically was thinking of making feature cliffs that have depth, I can make feature cliffs anyway, just that they will have limited depth.

I so with I was back at uni studying programming, I would love to upgrade the terrain engine.

Re: just curious about making invisable terrain

Posted: 20 Sep 2012, 09:34
by Beherith
To be honest, there is an interesting bug I ran into a while ago:
http://springrts.com/phpbb/viewtopic.ph ... in#p386683

You could use this to make parts of the terrain invisible.

The point of it is that dxt1 (the map dxt format) supports alpha values, and that the terrain shader can be made to support this as well. This does require changes to both the ssmf render pipeline as well as the old render pipe, but it is more than doable.

Re: just curious about making invisable terrain

Posted: 26 Sep 2012, 05:29
by enetheru
thanks, appears that voidwater = true, + the bug/feature that makes terrain invisable when alpha is set works, I even had shadows turned on and still terrain was transparent.

Of course this is limited to maps with no water.
But at least now I know I can make custom cliffs without the terrain getting in the way, sacrificing one quad isn't too much.

I can imagine space station type maps ala SC2 be created with this method.

Image

Re: just curious about making invisable terrain

Posted: 26 Sep 2012, 09:23
by Beherith
If we ask Kloot very nicely, he may be able to help us turn this into a feature. I also thought it would be nice to sometimes replace some bits with features, and this is needed so it doesnt clip into the terrain.
The only problem is, that a number of popular maps compiled with the 'buggy' (alpha noise) mapconv will have holes. Maybe a new parameter to enable the alpha on request would help?

I dont know how much c++ you want to code, but it shouldnt be hard if you want to try it for yourself. Its a great intro to engine coding :)

Re: just curious about making invisable terrain

Posted: 26 Sep 2012, 09:35
by enetheru
Beherith wrote:I dont know how much c++ you want to code, but it shouldnt be hard if you want to try it for yourself. Its a great intro to engine coding :)
Haha, maybe some day. Currently working on maps, and feature tool scripts for blender.

Re: just curious about making invisable terrain

Posted: 10 Oct 2012, 21:46
by Beherith
Thanks to Kloot, this is now implemented in engine (use the develop branch).
It can be enabled by defining an alpha channel in your map texture, and saving it as a 32 bit TGA before compiling.
In your .smd file, add the line
VoidGround=1;
in the [MAP] segment.

Re: just curious about making invisable terrain

Posted: 11 Oct 2012, 04:24
by enetheru
Beherith wrote:Thanks to Kloot, this is now implemented in engine (use the develop branch).
It can be enabled by defining an alpha channel in your map texture, and saving it as a 32 bit TGA before compiling.
In your .smd file, add the line
VoidGround=1;
in the [MAP] segment.
Awesome, are you still using smd?

Re: just curious about making invisable terrain

Posted: 10 May 2013, 04:58
by Funkencool
a little bump to point out a new (better) solution http://springrts.com/phpbb/viewtopic.ph ... 98#p541498