Ground Fog!, without shaders.

Ground Fog!, without shaders.

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

user
Posts: 452
Joined: 22 Jan 2008, 16:33

Ground Fog!, without shaders.

Post by user »

just a preview:

right click to enlarge.
Image
Image

it uses absolutely no GLSL(shaders), so everyone can use it, unlike the ground fog by trepan, which requires openGL 2.0.

it looks way better in game.

the maps on the screen are:(sorted from left to right)
1. small divide,
2. over the clouds(made by me, not released),
3. sands of war,
4. emain macha,
5. mars,
6. mars,
7. mars,
8. over the clouds,
9. small divide,
10. urban,
11. urban,
12. urban,
13. urban,
14. over the clouds,
15. over the clouds,
16. over the clouds,
17. over the clouds,
18. over the clouds.

maybe this could be used to make more realistic terrain?.

this is not all, i will be working on a true fog effect, that will be awesome, better than this.

this current effect could be used to make that map, sky high, which someone had suggested a quite while ago.
Attachments
luaGroundFog2.jpg
(74.65 KiB) Downloaded 1148 times
luaGroundFog.jpg
(97.38 KiB) Downloaded 1363 times
Last edited by user on 01 Mar 2008, 15:39, edited 1 time in total.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Ground Fog!, without shaders.

Post by Argh »

That's awesome! I'd love to use this for the World Builder demo map, along with the rain. I think it'd really make it look incredibly cool, to see a rain-washed city, with ground-fog obscuring everything on the lower levels...

However... why no GLSL? Very few cards aren't compatible with it, nowadays, and it runs so much faster than non-GLSL...
User avatar
MightySheep
Posts: 243
Joined: 11 Nov 2007, 02:17

Re: Ground Fog!, without shaders.

Post by MightySheep »

That looks great. Though i bet for people like me who have to have graphics setting on lowest it will just look like snow.
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: Ground Fog!, without shaders.

Post by user »

the trepan fog didn't work for me, it uses a bunch of GLSL stuff, i posted here an attachement, if you really want it, that is probably the only way to make it in GLSL, but i couldn't test it, very weird errors, like no matching overloaded function, even if i try to use hacks to make the function, it didn't work.
That looks great. Though i bet for people like me who have to have graphics setting on lowest it will just look like snow.
very good use for it!, really, i haven't thought of it, maybe later i could make an effect like that, but that is for later, since i dont have too much time to do all this stuff.

i haven't tested this using a 24 bit depth buffer, so it might be way different than on the screen.

get trepan fog effect here!
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Ground Fog!, without shaders.

Post by Argh »

That link goes to an attachment that doesn't exist any more :|

At any rate, if it didn't work, I believe you. Is your graphics card OpenGL 2.0 capable? Just about everything past the GeForce 6X series is, IIRC...
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: Ground Fog!, without shaders.

Post by user »

alright, copy and paste:

http://pastebin.com/m3c7d824a

mine is not, but trust me, i tested it on a good one, that has GL 2.0.0.6<some weird number>, it had a bunch of errors, but other shaders like xray did work.

and, when are you planing to release the world builder demo?
Last edited by user on 01 Mar 2008, 01:42, edited 1 time in total.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Ground Fog!, without shaders.

Post by Argh »

Just tested it... works without errors, for me, with hardly any framerate change. Hmm.

It doesn't look like it tests for nVidia or ATI, like the LUPS code does, makes me wonder.

As for World Builder... well, due to the way it works, it requires that I get the latest version of P.U.R.E. done. Which is why I need to concentrate on that, I don't want to wait another month, it's been nearly 3 months since my last release.
Last edited by Argh on 01 Mar 2008, 01:33, edited 1 time in total.
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: Ground Fog!, without shaders.

Post by user »

the results of trepan shader, will probably be bad looking fog, when looking from below, i am not sure, please, test it argh, then post a screen here.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Ground Fog!, without shaders.

Post by AF »

user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: Ground Fog!, without shaders.

Post by user »

ok then, i will make a "hack" fix for a error this currently has when looking inside the fog, so we will be able to make more fog with less quads, think of how good this would be!, currently to get a good effect, i have to draw about 100 fog planes, with that fix, around 20 will be enough.
thanks af.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Ground Fog!, without shaders.

Post by Argh »

Image
Image

Looks ok to me. Do you have "Enable LuaShaders Support" checked, in Settings.exe?
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: Ground Fog!, without shaders.

Post by user »

well, how did x-ray shader work then?, always i have it on.

it looks awesome, i just thought of a way to make such effect...
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: Ground Fog!, without shaders.

Post by user »

mine fog is better in one thing, its effect looks more nice and smoother.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Ground Fog!, without shaders.

Post by Argh »

The biggest problems I saw with Trepan's approach is that any angle other than straight down results in not being able to see through the fog. Which is realistic but annoying.

And the selection rectangles are drawn on a layer that's lower than the fog, which means that they get somewhat harder to see. Probably an easy fix there.

That, and there are no controls to adjust colors, height or anything else. And it's a Widget. Fog, which has gameplay ramifications, should not be a Widget. Otherwise, pro players will just shut it off :P

I will say that it runs really fast, though- maybe 1FPS difference, even with shadows and everything else on. Only slows up when down near the ground, probably due to clipping a bit, but even then, it's hardly a big deal.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Ground Fog!, without shaders.

Post by Pxtl »

Actually, slightly offtopic, but snow could be a neat concept - wouldn't even need to be a special graphical feature, just a way to mark terrain as "the actual level of the ground is X units below the visible level of the ground at this point". Could use it for snow, mud, etc - units trudge through it instead of on it. Use typemaps to slow them up. The catch would be that you'd need a way to have different track-marks for mud, since a person walking waist-high in mud would leave a big trail and not little foot-prints.
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Re: Ground Fog!, without shaders.

Post by NOiZE »

So with this we can make those TA mist maps?

if yes, can we force our users to use the widget when they play the map?

Image
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Ground Fog!, without shaders.

Post by Argh »

By making it a Gadget, yes. Widget no, Gadget yes. This really has to be a Gadget, but all of that GL stuff is the same for both, luckily. It's just a trivial change.
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Re: Ground Fog!, without shaders.

Post by NOiZE »

any volunteers for doing that then?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Ground Fog!, without shaders.

Post by Argh »

Should be very easy. I'm assuming that User will do that as he refines his version, I wouldn't worry about it too much. He probably just hadn't thought about that aspect yet, or thought that players might like to have optional weather effects, which is kind've the inverse of what game designers are going to want- for things that may obscure vision and make gameplay different, for different players, it has to be a Gadget, and in these two cases, a Gadget that's run by the map, just like World Builder code is.

If it turns out to be necessary, I'll do the conversions of his Weather and Fog to Gadget if needbe. As I said, it should be trivial to do, I just haven't seen the code from User yet. I wouldn't be too concerned about it, though, as I said, the Widget/Gadget divide in terms of GL is pretty much nil.
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: Ground Fog!, without shaders.

Post by user »

or thought that players might like to have optional weather effects,
no, never, in real life you can't choose when it is going to rain.
So with this we can make those TA mist maps?
yes, over the clouds is a mist map, made by me.
Post Reply

Return to “Lua Scripts”