Flashlights?
Moderator: InsideQC Admins
14 posts
• Page 1 of 1
Flashlights?
Okay; I've been looking around for how exactly flashlights are programmed. I'm not perfectly experienced in the subject matter, so I'm looking for some methods. So far, one that I've really liked would be Dementium: The Ward's flashlight. It's lightweight, looks good for a horror shooter, and would look great for what I'm trying to accomplish. On the other hand, you have something like Halo or Half-Life 2's flashlight. If somebody, at the least, could explain to me how Quake stores it's shadowing.. One thing I definitely do not want is a flashlight where it just spawns a light entity where the player is looking. Those look very undesirable for what I'm trying to accomplish. I believe I've seen a video of a Quake engine with a flashlight in the style of Doom 3, which would be acceptable. If somebody could share the knowledge with me? Thanks in advance.
-

Downsider - Posts: 621
- Joined: Tue Sep 16, 2008 1:35 am
Downsider wrote:GiffE wrote:http://forums.inside3d.com/viewtopic.php?t=820&highlight=flashlight
Notice how this is in "Engine Programming". I'm not looking to write QC or CSQC here.
The Doom3 style flashlight yout are refering to was done in darkplaces by useing a realtime light with a cubemap. This requires some QC coding.
Apathy Now!
-

MauveBib - Posts: 634
- Joined: Thu Nov 04, 2004 1:22 am
MauveBib wrote:Downsider wrote:GiffE wrote:http://forums.inside3d.com/viewtopic.php?t=820&highlight=flashlight
Notice how this is in "Engine Programming". I'm not looking to write QC or CSQC here.
The Doom3 style flashlight yout are refering to was done in darkplaces by useing a realtime light with a cubemap. This requires some QC coding.
Oh, I thought you were actually trying to help me.
-

Downsider - Posts: 621
- Joined: Tue Sep 16, 2008 1:35 am
well first you'll need an engine with realtime lighting, and support for cubemaps. DP has both of these. You then create an entity whcih follows the player(most easily through QC, but possible to do through the engine if you're masocistic) to act as the light, to which the cubemap is applied. Five sides of the cube are fully black and the sixth has a white circle blending to black at the edges. This will give you a doom 3 style flashlight.
As to the details of coding the entity in the engine, I have no idea. It's a relatively easy QC job but if you insist on not doing it there I can be of no further assistance.
If you're talking about woring off the stock quake engine it's a huge task. You'd need to add realtime lighting for starters, which is a massive task.
Quake's standard lighting system is very basic, lightstyles are baked for each map at compile time, and blended over the textures. Getting a realistic flashlight from that lighting system is a very big job.
As to the details of coding the entity in the engine, I have no idea. It's a relatively easy QC job but if you insist on not doing it there I can be of no further assistance.
If you're talking about woring off the stock quake engine it's a huge task. You'd need to add realtime lighting for starters, which is a massive task.
Quake's standard lighting system is very basic, lightstyles are baked for each map at compile time, and blended over the textures. Getting a realistic flashlight from that lighting system is a very big job.
Apathy Now!
-

MauveBib - Posts: 634
- Joined: Thu Nov 04, 2004 1:22 am
MauveBib wrote:well first you'll need an engine with realtime lighting, and support for cubemaps. DP has both of these. You then create an entity whcih follows the player(most easily through QC, but possible to do through the engine if you're masocistic) to act as the light, to which the cubemap is applied. Five sides of the cube are fully black and the sixth has a white circle blending to black at the edges. This will give you a doom 3 style flashlight.
As to the details of coding the entity in the engine, I have no idea. It's a relatively easy QC job but if you insist on not doing it there I can be of no further assistance.
If you're talking about woring off the stock quake engine it's a huge task. You'd need to add realtime lighting for starters, which is a massive task.
Quake's standard lighting system is very basic, lightstyles are baked for each map at compile time, and blended over the textures. Getting a realistic flashlight from that lighting system is a very big job.
I don't know anything about this topic but wanted to say thanks for this information so as my OpenGL understanding increases I'll have this on my "to learn" list.
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Downsider wrote:GiffE wrote:http://forums.inside3d.com/viewtopic.php?t=820&highlight=flashlight
Notice how this is in "Engine Programming". I'm not looking to write QC or CSQC here.
I understand that this is engine programming, however the video's you saw did it in QC using that method.
- GiffE
- Posts: 170
- Joined: Sun Oct 08, 2006 3:39 pm
- Location: USA, CT
14 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
