Jump to content

What's that ring?


Roland
 Share

Recommended Posts

http://www.youtube.com/watch?v=6_DXQbMTqjM"]http://www.youtube.com/watch?v=6_DXQbMTqjM



While working on some character controller code I noticed a white ring on the floor near the player. Any idea what that could be? It may be hard to see on this video but it you look carefully on the floor beneath the player you can see it. It seems to be a ring which surronds the camera maybe ...

Roland Strålberg
Website: https://rstralberg.com

Link to comment
Share on other sites

It's a bad SetShadowDistance setting. By default the ring occurs at 8 meters: http://www.leadwerks.com/werkspace/page/Documentation/le2/_/command-reference/lights/setshadowdistance-r273

  • Upvote 1

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Aha... thank's Metatron smile.png

I changed the values and I can see that it has a positive effect.

 

By the way. I tried the SetShadowmapSize on a light loaded from the scene file (.sbx) and i crashes. Is there any problem with that command in latest version or is not possible to change that for a SBX light

 

Example that crashes.

TLight light = FindChild( myScene, "myLight" );
if( light )
   SetShadowmapSize(light, 512);

 

Example that works.

TLight light = CreateDirectionalLight();
if ( light )
 SetShadowmapSize(light, 512);

Roland Strålberg
Website: https://rstralberg.com

Link to comment
Share on other sites

You need to parse the scene, like GameLib does, to modify existing sbx lights and other assets. Also special handling is needed for sources, because they are not part of the scene or world.

  • Upvote 1

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Aha... thank's Metatron smile.png

I changed the values and I can see that it has a positive effect.

 

By the way. I tried the SetShadowmapSize on a light loaded from the scene file (.sbx) and i crashes. Is there any problem with that command in latest version or is not possible to change that for a SBX light

 

Example that crashes.

TLight light = FindChild( myScene, "myLight" );
if( light )
SetShadowmapSize(light, 512);

 

Example that works.

TLight light = CreateDirectionalLight();
if ( light )
 SetShadowmapSize(light, 512);

Please file a bug report if you think that really is one. I can't think of any reason there would be a problem, but it's possible.

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

TLight light = FindChild( myScene, "myLight" );

 

Is that actually light source or some entity like light_directional.gmf?

 

You can't use SetShadowmapSize() with light_directional.gmf.

Use SetEntityKey() instead:

SetEntityKey(light, "shadowresolution", "1")

Link to comment
Share on other sites

Is that actually light source or some entity like light_directional.gmf?

 

You can't use SetShadowmapSize() with light_directional.gmf.

Use SetEntityKey() instead:

SetEntityKey(light, "shadowresolution", "1")

The issue with the light was solved here http://www.leadwerks.com/werkspace/topic/4644-solved-setshadowmapsize-crashes-on-a-light-loaded-from-a-scene-file/page__pid__40705#entry40705 and of course it was my own fault ;) Thanks anyway.

Roland Strålberg
Website: https://rstralberg.com

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