Fog effect

Fog effect

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

Moderator: Moderators

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

Fog effect

Post by user »

this is not the same as Ground Fog, ground fog is that mist in the ground, while this, this is the true fog effect i said i would make.

Image

you might be thinking that this is not like RL fog, well, because i recently started making this, so don't expect awesome screens for the first test version.

this effect is really good for changing game play, look as screens, at the last one you can't see the mini map, this can be changed.
Attachments
luaFog.jpg
(45.22 KiB) Downloaded 798 times
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Fog effect

Post by Argh »

That looks good. In terms of layers, does it draw over the weather FX? That'd be ideal... I could have a mildly-foggy, rain-swept city, that'd be awesome...
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: Fog effect

Post by user »

haven't tested it with rain, but it is drawn after the ground fog, which is a bad thing.

the ideal should probably be:

rain < fog < ground fog

i am converting the ground fog to a gadget now, so that you can test it and see if you like.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Fog effect

Post by Argh »

Great, really looking forward to testing this with the city in World Builder, seeing how it all works.

Hey... drat, I've forgotten to get your sounds done... lemme go do that now...
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: Fog effect

Post by user »

i will need some help to convert this(fog,ground fog,rain) to a gadget, because my gadgets rarely work.

about performance issues when using this, i activated rain+dinamic blob shadows+animated water+ground fog+fog+ribbon effects, and got a 6 or 8 FPS drop.
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Fog effect

Post by Gota »

Shiet..ur doing an awsome job thing here User...i can already invision maps using all these coll stuff.
By the way is it possible to make a shield effect in some similair way?
so it wont just be a single color with low opacity.

Something more similair to supcom but so it wont eat up resources.
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: Fog effect

Post by user »

By the way is it possible to make a shield effect in some similair way?
yes, just draw the sphere, using lua, texture it, and use a shield weapon to make the deflect system.

here is the widget, someone convert it:
unit_fog.lua
(7.87 KiB) Downloaded 38 times
before editing anything below the fog defs, contact me.

to use it: just edit the fog defs, to whatever you like, density should be leaved as is, spheres is the same as layers in ground fog, sphere spacing should not be very small.
j5mello
Posts: 1189
Joined: 26 Aug 2005, 05:40

Re: Fog effect

Post by j5mello »

user is this thread and the LUA files it contains different from the one here;
Ground Fog!, without shaders.?

cause if they are the same can we just lock one of these threads so its less confusing and the widget is always correctly updated?
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: Fog effect

Post by user »

they are way different, ground fog is the mist on the ground,

fog effect is like the fog in maps, or like Real Life fog.

i made 2 topics, because i thought it would be better.
User avatar
Noruas
XTA Developer
Posts: 1269
Joined: 24 Feb 2005, 02:58

Re: Fog effect

Post by Noruas »

i notice an issue with this, you probably already know, but off map fog blocks special effects closer in front no matter the distance. Could you make it not go indefinitely and maybe closer to the edge of the map and stopping, in the the groundfog my bad...
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: Fog effect

Post by user »

projectiles and particles will always get drawn behind the lua effects, currently there is no way to fix this using lua, the only way is to edit the
spring code.
User avatar
Noruas
XTA Developer
Posts: 1269
Joined: 24 Feb 2005, 02:58

Re: Fog effect

Post by Noruas »

http://www.youtube.com/watch?v=bb4Hev7zhUY

Heres a youtube video that uses the fog widget to use.
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: Fog effect

Post by user »

who made it?

and that is trepan fog, not mine, and that is ground fog, so probably it should be on ground fog topic.

by the way, cool video.

i knew i shouldn't have stolen his fog shader without his permission, anyway, he was not going to release it in the next years.
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: Fog effect

Post by user »

here is the new fog, this one doesn't has the cliping problem, and it looks way better.
Attachments
unit_fog.lua
(7.99 KiB) Downloaded 46 times
User avatar
Vadi
Posts: 446
Joined: 03 Jan 2008, 14:51

Re: Fog effect

Post by Vadi »

This is to be used by the mod people, yeah?
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: Fog effect

Post by user »

it can be used by mods and maps, this will look like rl fog if used correctly, i made some screen shots that show the best configs i could make, i will post here the configs later.
Post Reply

Return to “Lua Scripts”