Jump to content

Disappearing shadow model-on-model


miko93
 Share

Recommended Posts

Hi All. Looks like I've got a "vanishing shadow problem" - well, sort of smile.png

 

Please have a look at my "Test Board with 2 Tokens". When the tokens are "higher above" the board, I see nice shadowing from the point light (pic1). Now, when moving the Token more down towards the board, the shadow starts to vanish (pic2+3), although there is still quite some distance between the meshes.

Not sure what causes this - any ideas? Thanks.

 

post-11912-0-45852600-1398172184.png

 

post-11912-0-40414000-1398172206.png

 

post-11912-0-61642000-1398172235.png

Link to comment
Share on other sites

Try setting your light quality higher. This fixed most problems for me in regards to shadows. Try, self.world:SetLightQuality(2) if your working with LUA. The max setting you can give for the light quality is 2, (0 = None, 1 = Low, 2 = High, I could be wrong on that though haha.)

 

You'll want to put that command in your App.lua script.

Link to comment
Share on other sites

SFW, thanks.

 

As I'm on C++, I added the line to App::Start. Actually, I see the shadow quality improvement. The "shadow clipping" effect is still there, tho. Just nicer now rolleyes.gif

 

Must be something different, I guess. Maybe the Token model is somewhat screwed - the effect also shows when hovering it over the base brush. Hmmmmm...

 

// Create a world
world = World::Create();
world->SetLightQuality(2); // <--added

Link to comment
Share on other sites

The quality setting you added only effects the shadow when you run your game. It has no effect in the editor window.

Under the tool panel (main menu) Options/Video/Lighting Quality, set it to high.

I was told that this effects the shadow quality in the viewport.

 

Also if your first range setting under the light tab for the point light is set to a higher number it will also effect the shadow drawing distance in the viewport. It has no effect on the shadow when running the game that I seen so far.

 

This is what I found to true by my testing, so I would test it yourself as well. Of course your result could be different but it's worth a test.

  • Upvote 1
Link to comment
Share on other sites

Thank you both for your kind help.

 

Ah, didn't know about that editor shadow setting, thanks. Same thing still, though (shadow clipping in editor and in running app now checked). The clipping seems to kick in as soon as the objects' surfaces are at distance 1 unit or below (roughly).

 

Just for the fun of it, I added a directional light (the first one was point) - and uh oh, those shadows are there! Please see here: http://www.mikoweb.eu/tmp/LE_MissingShadow.png

 

Looks like it might be something point light related. Will make some more checks...

 

Again, thanks.

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