Jump to content
reepblue

A bit help with Spotlights

Recommended Posts

Hey guys,

 

I'm currently thinking about porting my Source project over to Leadwerks, so I started to port assets over and make test scenes and scripts to see if the gameplay concept would work. I started off making a test scene and I noticed that when I put a spotlight in, I got this gross effect on my floors and ceilings.

 

60881f9b9e.jpg

 

I tried setting the light quaIity to high, although it's less apperent, the spotlight line effect is still there. I can also hide the effect by toning the brightness, but I think that it can be a design barrier down the road.

 

If you set the spotlight's "Cast Shadows" to none, the effect vanishes, along with my shadows.

de693cd9ce.jpg

 

Is there a better trick to avoid this issue, or is this a render bug. If not, then why is this happening? I'm running on a GTX 750ti if that helps, and can supply more information/files if needed.

 

I was not sure if this is a bug in the engine, or it's just something you have to watch out for like Face Clipping.

 

Thanks.

Share this post


Link to post

This is just a consequences of shadow maps. It happens in every game with real-time lighting:

08fig03.jpg

 

You can reduce the artifact by increasing the light quality, moving the light away from the wall, and adjusting the shadow map range parameters.

Share this post


Link to post
I thought the article you pulled the image from explains how to deal with such issues, no?

We must ask Josh to implement variance shadow maps from gpuGems3 then biggrin.png

Share this post


Link to post

It would be nice to not have to deal with issues like this.

 

post-368-0-18284600-1426088624_thumb.jpg

 

Edit: I didn't try lighting quality as shadmar suggests below so maybe that would help.

Share this post


Link to post

@reepblue

 

Sett LightningQuality to 2 in the App.lua will help, if not you can try adding this to your pointlight as a script.

 

self.entity:SetShadowOffset(0,.95,0)  --.98 is default offset.

 

But you will get skewed shadow the lesser number you put in, but shadow ackne will be reduced.

Share this post


Link to post

It would be nice to not have to deal with issues like this.

 

post-368-0-18284600-1426088624_thumb.jpg

 

Edit: I didn't try lighting quality as shadmar suggests below so maybe that would help.

 

Are you sure those are shadows? They look like messed up normals (because of the hard edges and triangles), but I could be wrong.

Share this post


Link to post

Good thought but pretty sure. The walls sections were copied & pasted (top, bottom and sides) so they'd either be all wrong or all right.

Share this post


Link to post

It would be nice to not have to deal with issues like this.

 

post-368-0-18284600-1426088624_thumb.jpg

 

Edit: I didn't try lighting quality as shadmar suggests below so maybe that would help.

Your model has bad normals. Just open it in the model editor, select the Tools > Calculate Normals menu item, use the default settings, and press OK. Save the model and it will appear correctly.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...