May 23, 2012, 12:35:26 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Please report any bugs or issues that you might be encountering with the Beta in the Support System so that we can better keep track of any oustanding issues that may come up.

GameCore Support System
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Near Clip Plane  (Read 1121 times)
Squat
Hero Member
*****
Posts: 592


View Profile
« on: February 17, 2009, 02:46:25 PM »

Is there any possible way to decrease the minimum value on the near clip plane from 0.01 to either 0 or 0.001? The reason is that as I shrink things more and more in my world, I'm breaching the threshold and I can no longer see my 1p view weapon because it clips.

I realize that I may be looking at increasing the size of my world's assets and keeping the player at a reasonable scale, but the honest truth is that for all my testing, the only negative aspect of shrinking your players IS the near clip plane. Shadows are fine, as are the physics.
Logged
VMachmedia
Newbie
*
Posts: 26


View Profile
« Reply #1 on: February 17, 2009, 09:22:29 PM »

We are working with the GC team to promote the availability of game assets from a wide range of sources. These will all be scaled at the recommended 1 GC Unit = 1 metre.  I would recommend that you go with this.
Logged
Spaz
Full Member
***
Posts: 109


View Profile
« Reply #2 on: February 19, 2009, 08:03:17 PM »

Though if you've got a really huge world isn't it  best to shrink things?
Logged
Ron
Sr. Member
****
Posts: 326


View Profile
« Reply #3 on: February 19, 2009, 11:54:12 PM »

I have not tried it, so I'm just throwing this out there... Can you open your world with a text editor and manually override the value?
Logged
DPF
Newbie
*
Posts: 44


View Profile
« Reply #4 on: February 25, 2009, 09:06:29 PM »

here's how you edit the controller script in BeyondVirtual for near and far clip. My settings for a current project.
The near clip is real close, right to the surface.


Quote
camera.SetFOV(45);
      camera.SetUp(UpDir);
      camera.SetFocus(FocusTarget);
      camera.SetPosition(FocusSource);
      camera.SetTransition(0);
      camera.SetFarClip(10000);
      camera.SetNearClip(0.001);

//this is the Camera setup for the free fly camera I use to fly around scenes.

void SetupCamera( Object@ object, Viewport@ viewport, ControllerCamera@ camera)
{

   if (CAMERA.AssignToObject)
   {
      Object@ Target = GetGameManager().GetWorld().GetObject("Target");
      Vector FocusTarget = Target.GetPosition();
      Vector FocusSource = object.GetPosition();
      Vector UpDir = object.GetCurMatrix().YAxis;
      
      if (CAMERA.Type == CAMERA_TYPE_FPS)   
      {
         Vector ZDir =object.GetCurMatrix().ZAxis;
         FocusTarget = FocusTarget + ZDir;
      }
      
      camera.SetFOV(45);
      camera.SetUp(UpDir);
      camera.SetFocus(FocusTarget);
      camera.SetPosition(FocusSource);
      camera.SetTransition(0);
      camera.SetFarClip(10000);
      camera.SetNearClip(0.001);
      
   }
   else
   {
      camera.SetFOV(60);
      camera.SetUp(0,1,0);
      camera.SetFocus(0,0,1);
      camera.SetPosition(0,50,-5);
      camera.SetTransition(0);
      camera.SetFarClip(3500);
   }
   
}
Logged
Squat
Hero Member
*****
Posts: 592


View Profile
« Reply #5 on: February 26, 2009, 12:37:05 AM »

I am going to test this and pray that it works. If it does, it means I don't have any overhead work. If it doesn't, I'm looking at weeks of backtracking. Thanks DPF.
Logged
Squat
Hero Member
*****
Posts: 592


View Profile
« Reply #6 on: February 27, 2009, 04:18:48 PM »

While it appears to be taking the settings, it's not helping the near clip plane. I see no difference between 0.01 and 0.001.

My next attempt is to overlay a 2nd viewport aimed at a 1p version of the weapon...where the arms are cut off from the main mesh and visible in the camera. I'll make those meshes 10x larger and put them below the world and hopefully it will overlay like it's your own gun. Same trick as the speed gauge, but fully animated based on the player's inputs. I think this will work and I also think it's a genius workaround. Smiley

The good news is I already have experience with over 50 weapons separately animated in 3p and 1p views from my prior project, so the workflow is already engrained in my head to do it.
Logged
DPF
Newbie
*
Posts: 44


View Profile
« Reply #7 on: March 01, 2009, 08:10:43 PM »

Eh Squat,

Is your scale adjustment reduced because you loose coordinate precision at the default 1 unit = 1m?

A common problem I think, when making large worlds and the camera gets far away from the origin, textures, vertex and objects start to get jittery.
caused by Floating Point rounding artifacts?
Logged
gekido
Guest
« Reply #8 on: March 02, 2009, 09:16:37 PM »

One thing to note about modifying the nearclip plane is that the distance between the near clip and the far clip will affect the accuracy of the zbuffer - so if you have a nearclip of really close and a far clip of super far, you will likely run into zbuffer issues at the far clip end of things.

With that said, we have exposed the nearclip on the Environment Tab, so you will be able to modify it as well as the far clip on a per-world basis.  These settings can be overrode via the controllersettings camera as mentioned above.
Logged
Squat
Hero Member
*****
Posts: 592


View Profile
« Reply #9 on: March 03, 2009, 01:22:54 AM »

I think what I'm going to do is meet a balance that keeps a relatively normal sized character dummy and use the separate camera viewport to get the player weapon looking proper. I only have my farclip set to 200 and don't really need it much farther...this is assuming we can fix the bug with the fog pulling in the clip plane.
Logged
Pages: [1]
  Print  
 
Jump to:  

 
Powered by MySQL Powered by PHP bluBlur Skin © 2006, hbSkins
Powered by SMF 1.1.14 | SMF © 2006-2011, Simple Machines LLC
Valid XHTML 1.0! Valid CSS!