I need a torch for my map!!!

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

User avatar
Ace of Spades
Major
Posts: 291
Joined: Thu Jan 30, 2003 8:50 am
Location: West Coast, USA

I need a torch for my map!!!

Post by Ace of Spades »

Does anyone know or have you seen a torch anywhere in Radiant? I want to add some torch's to my map but can't seem to find any! I've been known to be blind and crossed right over things that I didn't know were there. Anyway, I need a torch that is normal size (whatever that is) to fit on stone walls for lighting. Not sure if this will give enough light but would like to try it. Any suggs. welcome! Thanks! .MAP server ROX!

Ace

:mrgreen:
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

made a nice torch with a new shader for the flames!
viewtopic.php?t=1531
is where you can see a screen of it. I can send you the textures and the shader if you want, the torch itself should be easy to build.
drop me pm with your email and you'll get it...

Only thing I'd need is this flickering of the light, which I can't do. Maybe you can?
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

please don't use this blue font, i almost can't read it!

okay, i put the sample in here.

You will find the map inside the pk3 in /maps. There are 8 flame-textures running through an animation. these textures are from mohaa, but i corrected some a little bit, as they weren't the way i liked it.

You should use different flames for torches which are side by side in mohradiant, so they won't burn in the same way. Despite of this, use copy/paste.

In the shader you'll find

Code: Select all

animmap 10 textures/flame/aFlame_01.tga... 
the number 10 is the animation-speed. change this to your taste. maybe different values for different flames?

If you use them, tell me what you think!
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

and remember:

we ALL will love you for making the light flicker
(and tell us how...)
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Oh yeah almost forgot all about your lights :oops:

Here you go 8)

http://home.student.utwente.nl/a.b.vrij ... /light.pk3
Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

YEAH., this is cool! 8)
Unfortunately, I'm as stupid as before, so:
what are these parameters for?

self light 1 0.8 0 128
wait(randomfloat 0.5)
self lightRadius (randomfloat 128)

1st line is red-value, green-value, blue-value and :?:
2nd line :?:
3rd line :?:

the current values don't look very 'torch-like', the min radius and max radius should be rather the same and the flickering should be faster.

If I'd get explanation of the above lines, I'll do calibration myself, of course
Innkeeper
Colonel
Posts: 475
Joined: Mon Nov 25, 2002 10:13 pm
Location: NC, USA (about 7.5 klicks from the capital dome)
Contact:

Post by Innkeeper »

Wacko wrote:self light 1 0.8 0 128
wait(randomfloat 0.5)
self lightRadius (randomfloat 128)

1st line is red-value, green-value, blue-value and :?:
2nd line :?:
3rd line :?:
1st ? light radius
2nd ? wait 1/2 sec
3rd ? change the light radius to a random value from 1 to 127
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Yes as Innkeeper says.

2nd: wait 0.5 seconds maximum. Below is a waitframe command to prevent the change of light radius within one frame.
Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

The line self lightRadius (randomfloat 128) in your script makes the light change from 1 to 127 radius.
The radius value in self light 1 0.6 0 512 (above) is just executed once in the start!?
self lightRadius (200-randomfloat 50) is it! This way, radius changes in the range from 200 to 150!
The wait (randomfloat 0.5) makes it rather worse, I'd leave it out, atleast for a torch.

Here's, what I like best so far:

Code: Select all

main:
	level waittill spawn
	
	// run thread for all lights
	for(local.i = 1; local.i <= $light.size; local.i++)
		$light[local.i] thread flicker
end

flicker:
	self light 1 0.6 0 512
	while(1)
	{
		// wait (randomfloat 0.5)
		self lightRadius (200-randomfloat 50)
		waitframe // don't change the light within one frame
	}
end
And finaly, the script_model fx/dummy.tik is working now!

So, I'm really satisfied! Thanks to all who helped, especially Jv!!

Here's what I've done so far! Take a look and tell me whether you liked it!
ATTENTION: When building maps with these torches, the copy/paste funtion is unfortunately doing the same as with breakable windows (where it's very comfortable): It counts up the targetname: First one has targetname/light, which is correct, But the 2nd gets targetname/t01, 3rd gets targetname/02 and so on. You must change this to targetname/light for all torches manually!

But besides this :arrow: :D :D :D :D :D
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Wacko wrote:The line self lightRadius (randomfloat 128) When building maps with these torches, the copy/paste funtion is unfortunately doing the same as with breakable windows (where it's very comfortable): It counts up the targetname: First one has targetname/light, which is correct, But the 2nd gets targetname/t01, 3rd gets targetname/02 and so on. You must change this to targetname/light for all torches manually!

Use ctrl + space :wink:
Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

you're so good! :D
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

One (?) more question:

These script_models turned into lights behave different to usual lights: They shine through walls! So their light is visible on the other side :roll:
Is there a way to block it?
Also, it would be fantastic, if someone could to a torch.tik (a milkshape oanything else-model including the torch, the metal-stuff and the two blocks with the flame-texture.
Put together with
:arrow: the shader-file,
:arrow: the flame- textures,
:arrow: the script and
:arrow: - if available - a light blocker behind it
into a pk3 would make reproduction more than easy!
Unfortunately, my abilities in milkshape are zero and I can't install Maya, as I'd need Win2K or WinXP :x
If there's anybody out there who could make this torch.tik, let me know!

Okay, this was 2 questions :oops:
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

I think the light shining through walls only appears when you disable 'real dynamic lighting' in the advanced options. It's a common issue of the Quake3 engine.
Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

It's even WORSE!

Disabling real lighting makes the light stop lighting the room INSIDE but still give these spots on the outside. :shock: THIS is weird!!

Full entity lighting makes no difference
User avatar
Ace of Spades
Major
Posts: 291
Joined: Thu Jan 30, 2003 8:50 am
Location: West Coast, USA

further torch thanks!

Post by Ace of Spades »

Thanks again everyone for your help here! I have been away from my mapping for the weekend and haven't had time to try any of this yet. Will get back to it tonight and hopefully figure it out. Hey Surgeon, you got a good thing going here! Thanks for your time and effort you put into this site. JV, Wacko, ROX, INNKEEPER, you're all cool! Thanks for your time as well. You don't get enough praise for your efforts either!
Ace

:lol:
Post Reply