OpenArena Message Boards

OpenArena Contributions => Maps => Topic started by: Neon_Knight on December 29, 2011, 06:15:23 AM



Title: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Neon_Knight on December 29, 2011, 06:15:23 AM
http://openarena.ws/board/index.php?topic=1945.msg42047#msg42047

The latest oasago2 is in this post. It's almost done for 0.8.8... except for those flames and the fact that I suck at doing shaders. -.-

I've tried to create duplicates of those shaders with better lighting, so I've checked the flame1, flameanim-blue and flameanim-red shaders at the oasfx.shader file in order to find something to change the lighting those flames emit, but so far, I haven't found anything, or I'm too dumb to notice that, and even the Q3A Shader Manual isn't very helpful at all. These are the shaders:

Code:
textures/sfx/flame-oasago
{
qer_editorimage textures/sfx/flame1.tga
surfaceparm nolightmap
surfaceparm nomarks
cull disable
q3map_surfacelight 2000
q3map_flare flareShader-lava
deformVertexes wave 194 sin 0 1 0 .6
{
animmap 10 textures/sfx/flame2.tga textures/sfx/flame3.tga textures/sfx/flame4.tga textures/sfx/flame5.tga textures/sfx/flame6.tga textures/sfx/flame7.tga textures/sfx/flame8.tga textures/sfx/flame1.tga
blendfunc gl_src_alpha gl_one
alphaGen wave sawtooth 0 1 0 10
}
{
animmap 10 textures/sfx/flame1.tga textures/sfx/flame2.tga textures/sfx/flame3.tga textures/sfx/flame4.tga textures/sfx/flame5.tga textures/sfx/flame6.tga textures/sfx/flame7.tga textures/sfx/flame8.tga
blendfunc gl_src_alpha gl_one
alphaGen wave inversesawtooth 0 1 0 10
}
{
map textures/sfx/flameball.jpg
blendfunc add
rgbgen wave sin .4 .1 .5 2
}
}

textures/sfx/flamered-oasago
{
qer_editorimage textures/sfx/r_flame1.tga
surfaceparm nolightmap
surfaceparm nomarks
cull disable
q3map_surfacelight 2000
q3map_flare flareShader-lava
deformVertexes wave 194 sin 0 1 0 .6
{
animmap 10 textures/sfx/r_flame1.tga textures/sfx/r_flame3.tga textures/sfx/r_flame5.tga textures/sfx/r_flame7.tga
blendfunc gl_src_alpha gl_one
alphaGen wave sawtooth 0 1 0 10
}
{
animmap 10 textures/sfx/r_flame2.tga textures/sfx/r_flame4.tga textures/sfx/r_flame6.tga textures/sfx/r_flame8.tga textures/sfx/r_flame1.tga
blendfunc gl_src_alpha gl_one
alphaGen wave inversesawtooth 0 1 0 10
}
{
map textures/sfx/r_flameball.jpg
blendfunc add
rgbgen wave sin .4 .1 .5 2
}
}

textures/sfx/flameblue-oasago
{
qer_editorimage textures/sfx/b_flame1.tga
surfaceparm nolightmap
surfaceparm nomarks
cull disable
q3map_surfacelight 2000
q3map_flare flareShader-lava
deformVertexes wave 194 sin 0 1 0 .6
{
animmap 10 textures/sfx/b_flame1.tga textures/sfx/b_flame2.tga textures/sfx/b_flame3.tga textures/sfx/b_flame4.tga textures/sfx/b_flame5.tga textures/sfx/b_flame6.tga textures/sfx/b_flame7.tga textures/sfx/b_flame8.tga
blendfunc gl_src_alpha gl_one
rgbGen wave sawtooth 0 1 0 10
}
{
animmap 10 textures/sfx/b_flame2.tga textures/sfx/b_flame3.tga textures/sfx/b_flame4.tga textures/sfx/b_flame5.tga textures/sfx/b_flame6.tga textures/sfx/b_flame7.tga textures/sfx/b_flame8.tga textures/sfx/b_flame1.tga
blendfunc gl_src_alpha gl_one
rgbGen wave inversesawtooth 0 1 0 10
}
{
map textures/sfx/b_flameball.jpg
blendfunc add
rgbgen wave sin .4 .1 .5 2
}
}

Which thing should I look at for changing the shaders' lighting properties?


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Peter Silie on December 29, 2011, 06:31:27 AM
As far as i see, there is just 1 cmd which has (active) impact on lightning:
q3map_surfacelight 2000

But i am also noobish with shaders :(


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Udi on December 29, 2011, 06:33:45 AM
q3map_surfacelight 2000

Yes, that's the one (http://heppler.com/shader/shader/section4.htm#4.5).


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Neon_Knight on December 29, 2011, 06:38:12 AM
But what about the color? Can it be changed? For example, I want to change the red light the red flames emit into an orange one, and cyan for the blue ones.


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Udi on December 29, 2011, 06:50:54 AM
But what about the color? Can it be changed?

Add a q3map_lightimage definition before the qer_editorimage: tutorial (http://heppler.com/shader/shader/section4.htm#4.6).


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Peter Silie on December 29, 2011, 07:02:08 AM
But the line
Code:
surfaceparm nolightmap
has to be deleted/commented out or am i wrong?


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: andrewj on December 29, 2011, 07:09:15 AM
But the line
Code:
surfaceparm nolightmap
has to be deleted/commented out or am i wrong?
The flame itself is fullbright and hence does not need any lightmap on it.


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Neon_Knight on December 29, 2011, 07:18:52 AM
But what about the color? Can it be changed?

Add a q3map_lightimage definition before the qer_editorimage: tutorial (http://heppler.com/shader/shader/section4.htm#4.6).
Hmmmm... that basically means that I have to create three more images?


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Peter Silie on December 29, 2011, 08:26:19 AM
Or just use one of the textures, which are already in the existing pk3 files (maybe pulchrs "monochrome" textures from pul1ctf could be the choice).


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Neon_Knight on December 29, 2011, 09:11:43 AM
0.8.8 Sago:

(http://i.imgur.com/m0BvR.jpg) (http://imgur.com/m0BvR)

I've used the max possible settings in my PC, which isn't very powerful, hence the FPS.

I'll take some screenshots in the other PC later.


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Peter Silie on December 29, 2011, 11:21:12 AM
Maybe the torches are too bright now?


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Neon_Knight on December 29, 2011, 11:31:34 AM
I should note that every torch has 3 light entities at the front with the values 60, 40 and 20.

BTW, the reason of why I wanted to change those colours is that the previous ones were too saturated, and that they somehow left a white color behind them, making them very unnatural.

Perhaps should I remove these light entities and try?

Here's how it looks in GTKRadiant:


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Neon_Knight on December 29, 2011, 11:54:31 AM
Here's how it looks without any light entity:

(Also slightly modified the _minlight property in the worldspawn entity. Though I'm not really a fan of using ambient light, as it tends to wash the lighting)

BTW, for those interested, here's a very good tutorial about lighting:
http://www.moddb.com/tutorials/lighting-in-game-environments-the-hows-and-whys


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Peter Silie on December 29, 2011, 12:10:53 PM
i would prefer the new version.
the torches could be supported by some more light entities if neccesary.
In the case of oasago2 there is just a minimum of supporting lights needed, because many lightning entities are spreaded all over the map.

the other case made them to bright - hey: they are just torches and no bonfire ;)


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Neon_Knight on December 29, 2011, 12:14:24 PM
I've got a better idea, and it may work very well, now that I've read that link again.


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Neon_Knight on December 29, 2011, 03:21:42 PM
Well, I hope to not to do more work on this and to FINALLY get 0.8.8 released.

Here's the (hopefully) FINAL version of my modifications.


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Neon_Knight on December 29, 2011, 03:42:27 PM
No map layout was changed during this modification.
Only for performance and more FPS, several structures got modified.
Only gameplay change was a placeswitch of a weapon with another also present one. But that came from my first oasago2 mod, so it's not a biggie. :P

Screenshots:

(http://i.imgur.com/iRTdYs.jpg) (http://imgur.com/iRTdY) (http://i.imgur.com/MlkhVs.jpg) (http://imgur.com/MlkhV) (http://i.imgur.com/ccjPTs.jpg) (http://imgur.com/ccjPT) (http://i.imgur.com/rgtYms.jpg) (http://imgur.com/rgtYm) (http://i.imgur.com/WgSN6s.jpg) (http://imgur.com/WgSN6) (http://i.imgur.com/8N8zOs.jpg) (http://imgur.com/8N8zO) (http://i.imgur.com/vuQHKs.jpg) (http://imgur.com/vuQHK) (http://i.imgur.com/qUIdFs.jpg) (http://imgur.com/qUIdF)


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Peter Silie on December 29, 2011, 03:43:08 PM
The new torches are great and you also made some good "weapon signs"!
but the overall lighting was better in the old version imho.
maybe you should replace some of the 200 light entities around the map?
(haven´t take a look @ map file)


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: fromhell on December 29, 2011, 05:06:13 PM
I disagree, they have too short of a lightradius

torches are meant to illuminate, their light should actually be a dark color like a brown (for yellow), a crimson (for red) and a dark slate (for blue)


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Neon_Knight on December 29, 2011, 09:37:41 PM
Here's Final3.

- Changed light color and radius of the flames. The overall lighting changed because of this.
- Added Team Runes.
- Minor changes.


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Peter Silie on December 30, 2011, 03:21:06 AM
I can´t realy tell you about the new lightning.
I still prefer the old style, but i love the new bridge style.
And i noticed the changes regarding the weapons (rail is on opposite platform now. well done!).


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Neon_Knight on December 30, 2011, 05:33:36 AM
(http://i.imgur.com/RpGCUs.jpg) (http://imgur.com/RpGCU) (http://i.imgur.com/AbLoOs.jpg) (http://imgur.com/AbLoO) (http://i.imgur.com/p5hBFs.jpg) (http://imgur.com/p5hBF) (http://i.imgur.com/mYuY9s.jpg) (http://imgur.com/mYuY9) (http://i.imgur.com/6kV6Zs.jpg) (http://imgur.com/6kV6Z)
(http://i.imgur.com/SkhzQs.jpg) (http://imgur.com/SkhzQ) (http://i.imgur.com/hPgmMs.jpg) (http://imgur.com/hPgmM) (http://i.imgur.com/ixj6Ps.jpg) (http://imgur.com/ixj6P) (http://i.imgur.com/7z871s.jpg) (http://imgur.com/7z871)


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Udi on December 30, 2011, 06:12:53 AM
The torch lights in final3 are much better than in final2, but maybe the crosses on the floor have too much light.


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: sago007 on December 30, 2011, 07:29:33 AM
- Added Team Runes.
I think this map is way too small for team runes and I believe they will break the gameplay completely. Guard will give the player roughly 5 times as much health as any other player (taking regen into account) and scout has no real disadvantages.

Running between flags in the shortest route without using the jump key takes about 12 seconds. Strafe jumping makes it much faster. It will take 5 direct rockets to kill a player with guard. The reload time of a rocket is about a second. It takes at least 5 seconds to kill a player with guard in one-on-one using a rocket launcher. 3 seconds if you have the doubler.


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Neon_Knight on December 30, 2011, 07:41:35 AM
More pics. It would result in a waste of time and effort to not to include it. :/

By lei's asking, I've replaced the yellow lights at the bases with their bases' colors. Also some minor changes.

(http://i.imgur.com/SN9KIs.jpg) (http://imgur.com/SN9KI) (http://i.imgur.com/DwA6ss.jpg) (http://imgur.com/DwA6s) (http://i.imgur.com/GmXGGs.jpg) (http://imgur.com/GmXGG) (http://i.imgur.com/Avl5Xs.jpg) (http://imgur.com/Avl5X) (http://i.imgur.com/SLZEps.jpg) (http://imgur.com/SLZEp) (http://i.imgur.com/yd2Lds.jpg) (http://imgur.com/yd2Ld) (http://i.imgur.com/jlyiXs.jpg) (http://imgur.com/jlyiX)

(I'll be removing the runes, though the default for g_runes is 0)


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: VortexHU on December 30, 2011, 01:26:21 PM
looks great, more finished looking (but i enjoy the released version, sago ;) ).


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Neon_Knight on December 30, 2011, 01:32:43 PM
I'm really wondering if I should keep the ambientlight, considering all the lighting in the map.

Anyway, final4 with plenty of changes, hopefully the final one. -.- If not, lei, just release 0.8.8 without this one. -.- I don't want more delays.

- No runes.
- The Railgun balconys were redone with patches. It seems to improve Vis, as these balconys were made of structural brushes.
- Lighting redone as well.
- Other minor changes.

(http://i.imgur.com/20uJ9s.jpg) (http://imgur.com/20uJ9) (http://i.imgur.com/Gx5xns.jpg) (http://imgur.com/Gx5xn) (http://i.imgur.com/2eyjLs.jpg) (http://imgur.com/2eyjL) (http://i.imgur.com/6P7lKs.jpg) (http://imgur.com/6P7lK) (http://i.imgur.com/2sWjts.jpg) (http://imgur.com/2sWjt) (http://i.imgur.com/1OIWZs.jpg) (http://imgur.com/1OIWZ) (http://i.imgur.com/C8kEjs.jpg) (http://imgur.com/C8kEj)


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: christooss on December 30, 2011, 02:15:12 PM
Great work. Now all we have to see is these new maps on servers. Server admins wake up!


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: sago007 on December 30, 2011, 02:40:03 PM
- The Railgun balconys were redone with patches. It seems to improve Vis, as these balconys were made of structural brushes.
This sounds counter intuitive to me. I was under the impression that detail brushes and patches improved compile time speed at the cost of run speed. Not that it helps much in oasago2 because the engines culling algorithm has problems with the shape and open environment.

To make open maps like oasago2 fast the engine really needs an optimistic culling option. 


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Graion Dilach on December 30, 2011, 03:17:07 PM
For some reasons, I never liked oasago... 'til now. Great work.


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: christooss on December 30, 2011, 03:48:38 PM
+1 :D

Hope to see all maps evolve like this. Good map at start but great map with these changes.


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: BlankBruno on December 31, 2011, 03:26:43 PM
First, let me say that I really like the looks of OASago2-final4--very nice improvements in my opinion.

I have what I'm afraid is a silly question, but I'll ask anyway:  if I download this map and copy it into my baseoa directory, should it work properly in OA 085?  Further, if I do that, and then join a server and OASago2 comes up in rotation, should I be able to play it normally, even if the server is using the older OASago2?

The reason I am asking is, I have done this, but I'm having issues, and I suspect it's because of a difference between 085 and 088, but I could be wrong--this is just a wild guess.  I think it's also very likely that it's because the server has one version of the map and is providing data based on that map, but I am using the newer one, and there is slight differences that are causing the problem.

I had downloaded -final3, and was able to play in single player mode with no noticeable issues.  When I tried it in multiplayer mode, I had several issues.  I thought maybe it was a map issue at first, so I checked back and found out that -final4 was available, so I downloaded it and tried it out, with similar results.

Please let me know if one or both of my assumptions are correct.  If not, I will provide more details as needed.

Thanks for your time, patience, and assistance.   :)


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: grey matter on December 31, 2011, 03:33:25 PM
You should start a separate thread.

The short answer is; As long as the server is running sv_pure 1, which is the default, additional pk3s such as maps should not cause any troubles.


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: BlankBruno on December 31, 2011, 03:42:39 PM
You should start a separate thread.
Thanks.  I wanted to make sure whether it was just because I was doing something I shouldn't before I started a new thread.  :)


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Neon_Knight on January 01, 2012, 10:25:07 AM
THIS IS TEH LAST ONE!!! And I'm done.

- Replaced flames (previously they were patches, they were rollbacked to brushes)
- No other changes aside of this.


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Neon_Knight on January 01, 2012, 03:03:23 PM
Well... it wasn't. -.-
It turns out that I forgot something, in this case, the hint brushes. -.-

So, here it is the definitive one.


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Neon_Knight on January 04, 2012, 05:52:08 AM
Oh, thanks to this, I've learnt something new:

NEVER use patches for flared shaders. -.-


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: VortexHU on January 04, 2012, 05:16:11 PM
Oh, thanks to this, I've learnt something new:

NEVER use patches for flared shaders. -.-

what happens when you do?


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: fromhell on January 04, 2012, 07:29:52 PM
Too many flares will spawn at the same spot and you'll have yourself one big bright flare that has 4 times more occlusion checks, which lead to even more slowdown
Remember that flares are still expensive even on modern hardware, it brings down my monster of a PC still.


Title: Re: Help with a shader (CRITICAL FOR 0.8.8)
Post by: Neon_Knight on January 04, 2012, 08:12:09 PM
oa_dm5, in fact, has that problem. It won't be solved for 0.8.8, though, as it's one of the low-priority maps.

(Speaking of which, we should start the Tribute pack improvement thread after 0.8.8 rolls out)