Jump to content

A bit help with Spotlights


reepblue
 Share

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.

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

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.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

@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.

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 month later...

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.
  • Upvote 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

 Share

×
×
  • Create New...