just curious about making invisable terrain

just curious about making invisable terrain

Discuss maps & map creation - from concept to execution to the ever elusive release.

Moderator: Moderators

Post Reply
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

just curious about making invisable terrain

Post 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.
User avatar
The Yak
Posts: 351
Joined: 20 May 2012, 05:36

Re: just curious about making invisable terrain

Post 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.
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: just curious about making invisable terrain

Post 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.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: just curious about making invisable terrain

Post 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.
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: just curious about making invisable terrain

Post 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
Attachments
screen00013.png
(238.34 KiB) Downloaded 3 times
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: just curious about making invisable terrain

Post 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 :)
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: just curious about making invisable terrain

Post 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.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: just curious about making invisable terrain

Post 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.
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: just curious about making invisable terrain

Post 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?
User avatar
Funkencool
Posts: 542
Joined: 02 Dec 2011, 22:31

Re: just curious about making invisable terrain

Post by Funkencool »

a little bump to point out a new (better) solution http://springrts.com/phpbb/viewtopic.ph ... 98#p541498
Post Reply

Return to “Map Creation”