Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Shadow problems  (Read 8743 times)

0 Members and 1 Guest are viewing this topic.

Roman Navratil

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 73
    • View Profile
    • www.farawaystudios.com
Shadow problems
« on: August 01, 2009, 01:08:25 PM »

We have got problems with shadows. We use X format for the characters and we use Stencil shadows (the hidden geometry is in .3ds file format and contains waypoints, block regions, walk planes, lights and shadow geometry, all in one .3ds file.
We have problems with the shadows also on other scenes and with different characters.
We have these problems on more PCs (tested on 4 PCs independently)

Heres an example of the problem (notice the weird black something "around" the character, it seems like some polygon or what, it goes down the character to his legs.:




Dont you guys know where is the problem? What we are doing wrong...(?)









« Last Edit: August 01, 2009, 01:11:03 PM by Roman Navratil »
Logged

Azrael

  • Regular poster
  • ***
  • Karma: 9
  • Offline Offline
  • Gender: Male
  • Posts: 155
    • View Profile
    • Mad Orange
Re: Shadow problems
« Reply #1 on: August 01, 2009, 01:56:40 PM »

Have you tried changing the light position for the character's shadow?
Logged

Roman Navratil

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 73
    • View Profile
    • www.farawaystudios.com
Re: Shadow problems
« Reply #2 on: August 01, 2009, 03:20:29 PM »

Have you tried changing the light position for the character's shadow?

I do not know what you mean... Probably you mean simply changing the light position in the Hidden geometry in 3D modeler? (and then save the hidden geometry to 3ds nebo load it to WME), right?

Well no, we did not, but since this problem is on all scenes (and not noly this one as i said) it won't help.

Azrael

  • Regular poster
  • ***
  • Karma: 9
  • Offline Offline
  • Gender: Male
  • Posts: 155
    • View Profile
    • Mad Orange
Re: Shadow problems
« Reply #3 on: August 01, 2009, 04:05:32 PM »

No, i mean changing the "LIGHT_POSITION" in the actor definition file. In the act3d file should be something like that:

Code: WME Script
  1. ; real-time shadow settings
  2. LIGHT_POSITION { -40, 200, -40 }

Or using in each scene_init script:

Code: WME Script
  1. actor.SetLightPosition(X, Y, Z)

Logged

Roman Navratil

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 73
    • View Profile
    • www.farawaystudios.com
Re: Shadow problems
« Reply #4 on: August 01, 2009, 07:43:48 PM »

No, i mean changing the "LIGHT_POSITION" in the actor definition file. In the act3d file should be something like that:

Code: WME Script
  1. ; real-time shadow settings
  2. LIGHT_POSITION { -40, 200, -40 }

Or using in each scene_init script:

Code: WME Script
  1. actor.SetLightPosition(X, Y, Z)



I will give this to our programmer to see it it helps. Thanks for tip.

Does anybody else have an idea whats this problem caused by?

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Shadow problems
« Reply #5 on: August 01, 2009, 09:51:47 PM »

Does anybody else have an idea whats this problem caused by?
Azrael gave you the solution. Your shadow light source is INSIDE the actor. That's why you're getting this artifact.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Roman Navratil

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 73
    • View Profile
    • www.farawaystudios.com
Re: Shadow problems
« Reply #6 on: August 03, 2009, 03:11:09 PM »

It did not help. We are still getting the same results even when we enter different numbers. Heres a new picture of how it looks (it looked like this even before). Notice that the famale character on the left down corner has correct shadows.


And i was wrong before, on some scenes it works ok... The man in the green clothes looks on (his shadows) on different scene ok...


I gave the link to this topic to our programmer, he should tell you more. Does anybody know where the problem could be? (just for detail: we have 7 light sources in the hiddent geometry, isnt the problem there?)











« Last Edit: August 03, 2009, 03:14:59 PM by Roman Navratil »
Logged

Azrael

  • Regular poster
  • ***
  • Karma: 9
  • Offline Offline
  • Gender: Male
  • Posts: 155
    • View Profile
    • Mad Orange
Re: Shadow problems
« Reply #7 on: August 03, 2009, 06:47:12 PM »

Actors shadows are not affected by geometry lights. Shadows use a fictional light defined in actors definition files (or set by scripts).

What coordinates for this light are you using?
Logged

Erlin

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 2
    • View Profile
Re: Shadow problems
« Reply #8 on: August 03, 2009, 09:45:21 PM »

Hello, i am the programmer of that.

I have some findings. The shadow triangle is definitely generated by actors own light. When i set
Code: [Select]
SHADOW_COLOR { 0, 0, 0, 0 }, then triangle disappear( alpha = 0 ).
Normal shadow is generated too, so triangle is redundant only.

Triangle vertexes:
1. vertex is always in a middle of a game scene / resolution ( both 1024x768 ).
2. vertex is always somewhere in actor's head ( maybe lips? ).
3. vertex somehow depends on settings of actor's light ( LIGHT_POSITION )


Sry for my English  :-X
Logged

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: Shadow problems
« Reply #9 on: August 03, 2009, 09:54:55 PM »

shadows are ONLY done form the light position in the actor3d file nothing else effects it....

If you move it and still getting that error try moving it heaps .. you may have no just moved it enough?
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Shadow problems
« Reply #10 on: August 03, 2009, 09:56:45 PM »

Also check for holes in the model, some invisible "rogue" vertices, non-hidden dummy objects from Max, that kind of stuff.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Roman Navratil

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 73
    • View Profile
    • www.farawaystudios.com
Re: Shadow problems
« Reply #11 on: August 04, 2009, 11:18:47 AM »

Also check for holes in the model, some invisible "rogue" vertices, non-hidden dummy objects from Max, that kind of stuff.

Well im not sure about that... because the guy im green works ok in different scene as i said...

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Shadow problems
« Reply #12 on: August 04, 2009, 03:43:48 PM »

You gotta understand how stencil shadows work. They create a silhouette of the actor, from the light's point of view. The silhouette is then extruded, forming a "shadow volume". It appears in case of your actor the silhouette doesn't look as expected. Which leads me to thinking there is something in the way. Some extra vertex or a dummy object, or a hole or something similar.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Roman Navratil

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 73
    • View Profile
    • www.farawaystudios.com
Re: Shadow problems
« Reply #13 on: September 05, 2009, 11:52:01 AM »

Hmm... So the problem is not in "rogue vertices"... It has been tested by our character designer with tons of experience in this (character modelling etc.), and he says the problem is not here, the models are ok.

The only difference between the female character (that doesnt have the "bug" with shadows) and the other ones that have them is that the female is in "edit mesh" and the other ones in "edit poly", but i gues this should not be the problem...

So sadly, to problem stil exists. Dont you guys someone know where the problem could be?

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: Shadow problems
« Reply #14 on: September 05, 2009, 06:17:28 PM »

.... use edit mesh.. it makes a difference... always export from edit mesh. Check your scales (in max) like one model might be a lot bigger than the other in real word units so the same light position in the actor file will result in a screw up...

Did you infact try moving the light miles away.. just to see if it fixed it?
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe
 

Page created in 0.064 seconds with 26 queries.