Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Dionysius on April 26, 2006, 03:18:08 PM

Title: Strange effect with 3D actor, when he goes out of screen
Post by: Dionysius on April 26, 2006, 03:18:08 PM
If Trinity is moved by keyboard (arrows), when she is walking to camera (her face is looking at user)- then there is a strange effect.
Title: Re: Strange effect with 3D actor, when he goes out of screen
Post by: Mnemonic on April 26, 2006, 03:28:01 PM
The model is clipped. If you want your 3D actors to walk into camera, you'll need to set the clipping planes appropriately (see the advanced 3D settings in SceneEdit and in the docs).
Title: Re: Strange effect with 3D actor, when he goes out of screen
Post by: Dionysius on April 26, 2006, 06:57:35 PM
Thank you, Mnemonic.
Title: new troubles
Post by: Dionysius on April 29, 2006, 06:01:34 PM
I have trouble with clipping planes. If I try to change it, my game works very slow and actor becomes invisible, and I see many color lines in my scene (artifacts). In *.scene file I see three strings:
  NEAR_CLIPPING_PLANE=<some value>
  FAR_CLIPPING_PLANE=<some value>
  WAYPOINT_HEIGHT=10.000000
They are writed here cause I change it in SceneEdit. If I change it by hands to:
  NEAR_CLIPPING_PLANE=1.000000
  FAR_CLIPPING_PLANE=1.000000
  WAYPOINT_HEIGHT=10.000000
The game works normal and there are no artifacts, but the actor is invisible. When I delete these 3 strings, the actor is visible and the game runs correctly. Is this a bug? Which values should I set?  ???
Title: Re: Strange effect with 3D actor, when he goes out of screen
Post by: CrashTheuniversE on April 29, 2006, 07:06:01 PM
Well, the problem could be on the NEAR and FAR being the same value.. Anyway when you see -1.00 in both NEAR and FAR clipping plan is because this way the engine is going to use default values. For example, I don't know which one Mnemonic uses, but common ones could be 1.0 for near and 100.0 for far plane. Probably when you clear the 3 values, he still tries reasonably default values that's why it works.

If you have problems due to a camera too close to the object, or for other reasons (like zooming, focal lenght and so, that I don't know if they are taken in account currently in camera matrix togheter with altering the projection matrix), you could have to make the near plane less than 1.0 for example try to shrink to 0.1 for near plane and 100.0 or 1000.0 for far plane.

Tell me if it works for you. Anyway Mnemonic could clarify this better than me .. i'm a little noob of WME eheh :) but better at 3D coding ^_^
Title: Re: Strange effect with 3D actor, when he goes out of screen
Post by: Dionysius on April 30, 2006, 06:44:39 AM
Well, 0.1 for near and 1000.0 for far works very good. :) Thank you for your advice. :)