Pages: [1] 2
  Print  
Author Topic: Help with a shader (CRITICAL FOR 0.8.8)  (Read 13027 times)
Neon_Knight
In the year 3000
***

Cakes 49
Posts: 3653


Trickster God.


« 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?
Logged


"Level Designers are 1 part architect, 1 part artist, 1 part game designer, and 1 part beta tester!" Cliff Bleszinski
Want to contribute? Read this.
Peter Silie
Member


Cakes 2008
Posts: 610



« Reply #1 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 Sad
Logged
Udi
Member


Cakes 25
Posts: 536


i do my own stunts


WWW
« Reply #2 on: December 29, 2011, 06:33:45 am »

q3map_surfacelight 2000

Yes, that's the one.
Logged

http://udionline.hu/en/projektek/openarena/
Todo list: 1. q3dm17 textures replacement (95% done)
Neon_Knight
In the year 3000
***

Cakes 49
Posts: 3653


Trickster God.


« Reply #3 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.
Logged


"Level Designers are 1 part architect, 1 part artist, 1 part game designer, and 1 part beta tester!" Cliff Bleszinski
Want to contribute? Read this.
Udi
Member


Cakes 25
Posts: 536


i do my own stunts


WWW
« Reply #4 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.
Logged

http://udionline.hu/en/projektek/openarena/
Todo list: 1. q3dm17 textures replacement (95% done)
Peter Silie
Member


Cakes 2008
Posts: 610



« Reply #5 on: December 29, 2011, 07:02:08 am »

But the line
Code:
surfaceparm nolightmap
has to be deleted/commented out or am i wrong?
Logged
andrewj
Member


Cakes 23
Posts: 571



« Reply #6 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.
Logged
Neon_Knight
In the year 3000
***

Cakes 49
Posts: 3653


Trickster God.


« Reply #7 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.
Hmmmm... that basically means that I have to create three more images?
Logged


"Level Designers are 1 part architect, 1 part artist, 1 part game designer, and 1 part beta tester!" Cliff Bleszinski
Want to contribute? Read this.
Peter Silie
Member


Cakes 2008
Posts: 610



« Reply #8 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).
Logged
Neon_Knight
In the year 3000
***

Cakes 49
Posts: 3653


Trickster God.


« Reply #9 on: December 29, 2011, 09:11:43 am »

0.8.8 Sago:



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.
« Last Edit: December 29, 2011, 10:10:47 am by Neon_Knight » Logged


"Level Designers are 1 part architect, 1 part artist, 1 part game designer, and 1 part beta tester!" Cliff Bleszinski
Want to contribute? Read this.
Peter Silie
Member


Cakes 2008
Posts: 610



« Reply #10 on: December 29, 2011, 11:21:12 am »

Maybe the torches are too bright now?
Logged
Neon_Knight
In the year 3000
***

Cakes 49
Posts: 3653


Trickster God.


« Reply #11 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:
Logged


"Level Designers are 1 part architect, 1 part artist, 1 part game designer, and 1 part beta tester!" Cliff Bleszinski
Want to contribute? Read this.
Neon_Knight
In the year 3000
***

Cakes 49
Posts: 3653


Trickster God.


« Reply #12 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
Logged


"Level Designers are 1 part architect, 1 part artist, 1 part game designer, and 1 part beta tester!" Cliff Bleszinski
Want to contribute? Read this.
Peter Silie
Member


Cakes 2008
Posts: 610



« Reply #13 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 Wink
Logged
Neon_Knight
In the year 3000
***

Cakes 49
Posts: 3653


Trickster God.


« Reply #14 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.
Logged


"Level Designers are 1 part architect, 1 part artist, 1 part game designer, and 1 part beta tester!" Cliff Bleszinski
Want to contribute? Read this.
Neon_Knight
In the year 3000
***

Cakes 49
Posts: 3653


Trickster God.


« Reply #15 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.
Logged


"Level Designers are 1 part architect, 1 part artist, 1 part game designer, and 1 part beta tester!" Cliff Bleszinski
Want to contribute? Read this.
Neon_Knight
In the year 3000
***

Cakes 49
Posts: 3653


Trickster God.


« Reply #16 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. Tongue

Screenshots:

Logged


"Level Designers are 1 part architect, 1 part artist, 1 part game designer, and 1 part beta tester!" Cliff Bleszinski
Want to contribute? Read this.
Peter Silie
Member


Cakes 2008
Posts: 610



« Reply #17 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)
Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 31
Posts: 14470



WWW
« Reply #18 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)
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
Neon_Knight
In the year 3000
***

Cakes 49
Posts: 3653


Trickster God.


« Reply #19 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.
Logged


"Level Designers are 1 part architect, 1 part artist, 1 part game designer, and 1 part beta tester!" Cliff Bleszinski
Want to contribute? Read this.
Peter Silie
Member


Cakes 2008
Posts: 610



« Reply #20 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!).
Logged
Neon_Knight
In the year 3000
***

Cakes 49
Posts: 3653


Trickster God.


« Reply #21 on: December 30, 2011, 05:33:36 am »


Logged


"Level Designers are 1 part architect, 1 part artist, 1 part game designer, and 1 part beta tester!" Cliff Bleszinski
Want to contribute? Read this.
Udi
Member


Cakes 25
Posts: 536


i do my own stunts


WWW
« Reply #22 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.
Logged

http://udionline.hu/en/projektek/openarena/
Todo list: 1. q3dm17 textures replacement (95% done)
sago007
Posts a lot
*

Cakes 61
Posts: 1639


Open Arena Developer


WWW
« Reply #23 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.
Logged

There are nothing offending in my posts.
Neon_Knight
In the year 3000
***

Cakes 49
Posts: 3653


Trickster God.


« Reply #24 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.


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


"Level Designers are 1 part architect, 1 part artist, 1 part game designer, and 1 part beta tester!" Cliff Bleszinski
Want to contribute? Read this.
Pages: [1] 2
  Print  
 
Jump to: