Omni-Directional Env_ProjectedTexture

Grab your favourite IDE and tinker with the innards of game engines

Omni-Directional Env_ProjectedTexture

Postby Hollow on Mon Aug 30, 2010 1:14 am

So I've been working my way through a lot of the fixes for projected textures, along with implementing what Gary has worked out concerning the grain. But I am looking to create an omnidirectional dynamic light source (i.e cast in all directions) for use for things such as a light from a flame/candle in the centre of the room.

There is a video which employs the effect, seen here:

Though I doubt he is willing to share the code edit (nor the team of C17 unfortunately)

I've been skimming through the .CPP files and reckon it's to do with the FOV angles of the projected texture, as merely setting it in hammer to 360 does not work (in fact it casts no light at all)

Any ideas/suggestions?
User avatar
Hollow
Ubisoft/Monothetic
 
Joined: Thu Aug 14, 2008 12:38 pm
Location: London, UK

Re: Omni-Directional Env_ProjectedTexture

Postby Chopium on Mon Aug 30, 2010 2:44 am

6 90 degree entities in the same spot?
User avatar
Chopium
Senior Member
Senior Member
 
Joined: Sun Apr 12, 2009 1:52 am
Location: Illinois

Re: Omni-Directional Env_ProjectedTexture

Postby city14 on Mon Aug 30, 2010 2:48 am

I was about to say that...
coder0xff wrote:I wonder if Gabe ever lies in bed at night, thinking about all the fat jokes, and just cries himself to sleep, wiping his tears away with one-thousand dollar bills.
User avatar
city14
Pheropod
Pheropod
 
Joined: Tue Jun 16, 2009 8:35 pm
Location: Troutdale, Oregon

Re: Omni-Directional Env_ProjectedTexture

Postby Hollow on Mon Aug 30, 2010 8:07 am

Well there is that method, but, wouldn't that be extremely expensive to render?
User avatar
Hollow
Ubisoft/Monothetic
 
Joined: Thu Aug 14, 2008 12:38 pm
Location: London, UK

Re: Omni-Directional Env_ProjectedTexture

Postby Gary on Mon Aug 30, 2010 9:59 am

I can run at 120+ FPS using that method(6 90-degree lights pointing in all directions), though it looks like crap most the time. Overlaping shadowmaps in Source = Bad

I am likely doing something wrong... well, I know using 6 90-degree projected lights to form an omni-directional one is the main problem. We really must do this the right way.

Here is what I got when I tried that method:

Image
Image

Then I made an plain texture for the light to fill in the gaps:
Image
Image
Image

As you can see, I got quite a few graphical glitches. I have applied the parenting fix, jitter fix, and allowed for 7 shadow maps(6 for the light and one for the player's flashlight).
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Omni-Directional Env_ProjectedTexture

Postby Armageddon on Mon Aug 30, 2010 5:05 pm

I wish people would stop posting all these awesome dynamic light videos, I just want to know how it's done. :P
User avatar
Armageddon
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Sun Dec 14, 2008 5:53 am

Re: Omni-Directional Env_ProjectedTexture

Postby Plague on Mon Aug 30, 2010 5:37 pm

Armageddon wrote:I wish people would stop posting all these awesome dynamic light videos, I just want to know how it's done. :P


env_projectedtexture with code changes...
Problem is getting it to be less laggy is (as far as I know) not possible with the SDK code base.
Contact. The EU welcomes the pain free. That's emotional impact.
I actually think limitation is good for creativity. If we had an engine that could do everything, we would be in trouble. It gives us focus. ~~ Randy Lundeen
User avatar
Plague
Veteran
Veteran
 
Joined: Tue Jun 22, 2010 7:12 pm

Re: Omni-Directional Env_ProjectedTexture

Postby MáØ on Mon Aug 30, 2010 7:13 pm

Plague wrote:Problem is getting it to be less laggy is (as far as I know) not possible with the SDK code base.


I thought C17 had full working dynamic lights o.O
User avatar
MáØ
Pheropod
Pheropod
 
Joined: Fri May 22, 2009 5:14 pm
Location: BC, Canada

Re: Omni-Directional Env_ProjectedTexture

Postby Plague on Mon Aug 30, 2010 7:16 pm

Entirely? I did not know if they do, But I assume it is not old computer friendly.
But maybe I'm wrong.
Contact. The EU welcomes the pain free. That's emotional impact.
I actually think limitation is good for creativity. If we had an engine that could do everything, we would be in trouble. It gives us focus. ~~ Randy Lundeen
User avatar
Plague
Veteran
Veteran
 
Joined: Tue Jun 22, 2010 7:12 pm

Re: Omni-Directional Env_ProjectedTexture

Postby Gary on Mon Aug 30, 2010 7:18 pm

I never had problem with lag with it after I got my new graphics card(5770).

The real problem is making it look good, it's not easily scaled. It was only intended to be used as a flashlight, never to light a large area. I know how to change the shadow map resolution, but it appears it can't be higher then your view port.
Because of this, the only other way to use it on a large scale is to implement something like PSSM, which requires a good amount of graphics programming knowledge(that few modders have).
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Omni-Directional Env_ProjectedTexture

Postby Plague on Mon Aug 30, 2010 7:25 pm

Key word, "New".
Do we have anybody with a crap computer who could test out these things XD.

But I might be wrong, I was in the mindset that they were not optimized.
(A fact which made sense since its only used for flashlights.)
Contact. The EU welcomes the pain free. That's emotional impact.
I actually think limitation is good for creativity. If we had an engine that could do everything, we would be in trouble. It gives us focus. ~~ Randy Lundeen
User avatar
Plague
Veteran
Veteran
 
Joined: Tue Jun 22, 2010 7:12 pm

Re: Omni-Directional Env_ProjectedTexture

Postby MáØ on Mon Aug 30, 2010 7:28 pm

Plague, dynamic lighting is a relatively "new" bit of gaming engines. Why should people wanting to make a game look that good worry about the low end?
User avatar
MáØ
Pheropod
Pheropod
 
Joined: Fri May 22, 2009 5:14 pm
Location: BC, Canada

Re: Omni-Directional Env_ProjectedTexture

Postby Gary on Mon Aug 30, 2010 7:29 pm

They are not greatly optimized as far as I am concerned. Though, I have no problem running it.

I remember, when I used to play Source with my onboard GPU, it's like an Nivida 6000 or something. One flashlight would take more then half my FPS away.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Omni-Directional Env_ProjectedTexture

Postby Plague on Mon Aug 30, 2010 7:30 pm

MáØ wrote:Plague, dynamic lighting is a relatively "new" bit of gaming engines. Why should people wanting to make a game look that good worry about the low end?

Valve, Not that I'm saying I care, just that Valve cares...
Contact. The EU welcomes the pain free. That's emotional impact.
I actually think limitation is good for creativity. If we had an engine that could do everything, we would be in trouble. It gives us focus. ~~ Randy Lundeen
User avatar
Plague
Veteran
Veteran
 
Joined: Tue Jun 22, 2010 7:12 pm

Re: Omni-Directional Env_ProjectedTexture

Postby Gary on Mon Aug 30, 2010 7:30 pm

MáØ, they had shadowmapping in Halo2 for the xbox and Doom3 had stencil shadows for all light sources.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL
Next

Return to Programming

Who is online

Users browsing this forum: No registered users