Author Topic: Including a (Camp-)Fire in a map - Tutorial?  (Read 4689 times)

theRifle

  • Posts: 36
  • Turrets: +4/-3
Including a (Camp-)Fire in a map - Tutorial?
« on: May 13, 2007, 03:01:02 pm »
Hello,

i am working on a new Map and I'd like to integrate some fire for lighting a vault.

Things I want to have:
#1: Animated fire (by now working with a shader using
Code: [Select]
AnimMap and
Code: [Select]
deformVertexes autosprite2 ).
#2: Fire should do damage to players (by now working with trigger_hurt)
#3: Players should not be blocked by Flame-brush - DOES NOT WORK.

How can i modify my brush/shader so it is only showing the fire, but does not block a player (so you can go through fire)??

Here my shader:

Code: [Select]
textures/Fantasy-beta-1/flameanim
{
qer_editorimage textures/Fantasy-beta-1/flame7.tga
q3map_lightimage textures/Fantasy-beta-1/flame7.tga
surfaceparm nolightmap
surfaceparm trans
surfaceparm nomarks
surfaceparm noimpact
surfaceparm nonsolid
q3map_surfacelight 250
deformVertexes autosprite2
{
animmap 10 textures/Fantasy-beta-1/flame1.tga textures/Fantasy-beta-1/flame2.tga textures/Fantasy-beta-1/flame3.tga textures/Fantasy-beta-1/flame4.tga textures/Fantasy-beta-1/flame5.tga textures/Fantasy-beta-1/flame6.tga textures/Fantasy-beta-1/flame7.tga textures/Fantasy-beta-1/flame8.tga
blendfunc add
rgbGen wave inversesawtooth 0 1 0 10
alphaFunc GE128
depthWrite
}
{
animmap 10 textures/Fantasy-beta-1/flame2.tga textures/Fantasy-beta-1/flame3.tga textures/Fantasy-beta-1/flame4.tga textures/Fantasy-beta-1/flame5.tga textures/Fantasy-beta-1/flame6.tga textures/Fantasy-beta-1/flame7.tga textures/Fantasy-beta-1/flame8.tga textures/Fantasy-beta-1/flame1.tga
blendfunc add
rgbGen wave sawtooth 0 1 0 10
alphaFunc GE128
depthWrite
}
{
map textures/Fantasy-beta-1/flameball.tga
blendfunc add
rgbGen wave sin 0.6 0.2 0 0.6
alphaFunc GE128
depthWrite
}

}

Warrior

  • Posts: 230
  • Turrets: +2/-0
    • Warrior's Stuff
Including a (Camp-)Fire in a map - Tutorial?
« Reply #1 on: May 13, 2007, 06:00:36 pm »
I think if you use the shader on a patch it will block players only in one side; using a brush is an uncommon way I guess but seems to be possible to not block the player as the shader specifies "nonsolid"; some surfaceparms are only applied to brushes I believe.

theRifle

  • Posts: 36
  • Turrets: +4/-3
Including a (Camp-)Fire in a map - Tutorial?
« Reply #2 on: May 13, 2007, 08:29:58 pm »
Actually "Nonsolid" does not help me in this case - see my postet shader code   ;-)

(Probably a problem because using it together with "deformVertexes autosprite2".?)

I'll try Patch now ...

Warrior

  • Posts: 230
  • Turrets: +2/-0
    • Warrior's Stuff
Including a (Camp-)Fire in a map - Tutorial?
« Reply #3 on: May 13, 2007, 10:03:49 pm »
I tried to say with my bad english that the problem is not the shader, but where you apply it. Patch != Brush. The first always block the player if he comes from a certain side of it; in the other hand, brushes can be turned into non-solid objects -- that don't block the player -- when they use a shader with the "nonsolid" parameter. Was I more clearly this time?

Lava Croft

  • Guest
Including a (Camp-)Fire in a map - Tutorial?
« Reply #4 on: May 14, 2007, 12:23:38 am »
I think TheRifle already said he applied the shader to a brush, not a patch.

Also, what Warrior says about patches and their 'nonsolid' status is untrue. All plants on Sokolov's Space are made out of patch meshes, and are fully nonsolid from every angle of approach.
The problem must lie elsewhere...  

to be continued, I hope!

[EDIT] I am not sure, but for a brush to be fully nonsolid, shouldn't it have a 'nonsolid' surfaceparm applied to all of its faces? And if so, did you do that?

KOsAD

  • Posts: 27
  • Turrets: +0/-0
Including a (Camp-)Fire in a map - Tutorial?
« Reply #5 on: May 18, 2007, 12:15:45 pm »
Don't forget I have included the source of my map in the pk3.
You should find everything you are looking for about the camp fire ;)