Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualCDProp

Posted 14 January 2013 - 01:43 AM

I think you'll want to keep messing with the frustum a bit. The intestine model is still piercing the near plane. There are basically two parameters that you can play with (assuming you're using gluPerspective or something similar): your fovy and your near plane distance. If your intestines have a radius of r, then you'll want to make sure that:

 

a * n * tan(fovy) < r

 

Where n is your near plane value, and a is your aspect ratio. You may also want to give yourself a buffer of 10% or so, just in case. So, either your n or your fovy (or both) need to be smaller. It may help to play with these two parameters until you like what you see. Making the fovy smaller will create a "zoom in" effect that you may or may not like. Making the near plane distance smaller will keep the same view, more or less, but you may eventually run into depth-buffer-precision issues if you make it small enough (if so, it's easy to fix...just bring your far plane closer). 

 

As far as why it is off-center, since you are using a symmetrical frustum, it's likely that your eye and center points are off. If your "center" point were accurate, then we should see the medial axis run right through the center of the screen. Since we don't do that, there may be a problem with the method you are using to calculate points on this axis.

 

Edit: Although, I'm assuming here that the "center" point isn't being clipped by the near plane. Try making your near plane way smaller to fix your clipping issues, and then see if that solves your centering issues. Also, make sure that your viewport correctly matches the size of your window; if your viewport is too large, it can cause things to look off-center. If you know that your eye/center points are accurate and that your viewport is correct, then the last thing I would try is using a "center" point that is much closer to your "eye" point, albeit still on your median axis curve, so as to create a better approximation of the curve's tangent.

 

Edit5: Typos (it's late).


#4CDProp

Posted 14 January 2013 - 01:42 AM

I think you'll want to keep messing with the frustum a bit. The intestine model is still piercing the near plane. There are basically two parameters that you can play with (assuming you're using gluPerspective or something similar): your fovy and your near plane distance. If your intestines have a radius of r, then you'll want to make sure that:

 

a * n * tan(fovy) < r

 

Where n is your near plane value, and a is your aspect ratio. You may also want to give yourself a buffer of 10% or so, just in case. So, either your n or your fovy (or both) need to be smaller. It may help to play with these two parameters until you like what you see. Making the fovy smaller will create a "zoom in" effect that you may or may not like. Making the near plane distance smaller will keep the same view, more or less, but you may eventually run into depth-buffer-precision issues if you make it small enough (if so, it's easy to fix...just bring your far plane closer). 

 

As far as why it is off-center, since you are using a symmetrical frustum, it's likely that your eye and center points are off. If your "center" point were accurate, then we should see the medial axis run right through the center of the screen. Since we don't do that, there may be a problem with the method you are using to calculate points on this axis.

 

Edit: Although, I'm assuming here that the "center" point isn't being clipped by the near plane. Try making your near plane way smaller to fix your clipping issues, and then see if that solves your centering issues. Also, make sure that your viewport correctly matches the side of your window; if your viewport is too large, it can cause things to look off-center. If you know that your eye/center points are accurate and that your viewport is correct, then the last thing I would try is using a "center" point that is much closer to your "eye" point, albeit still on your median axis curve, so as to create a better approximation of the curve's tangent.


#3CDProp

Posted 14 January 2013 - 01:35 AM

I think you'll want to keep messing with the frustum a bit. The intestine model is still piercing the near plane. There are basically two parameters that you can play with (assuming you're using gluPerspective or something similar): your fovy and your near plane distance. If your intestines have a radius of r, then you'll want to make sure that:

 

a * n * tan(fovy) < r

 

Where n is your near plane value, and a is your aspect ratio. You may also want to give yourself a buffer of 10% or so, just in case. So, either your n or your fovy (or both) need to be smaller. It may help to play with these two parameters until you like what you see. Making the fovy smaller will create a "zoom in" effect that you may or may not like. Making the near plane distance smaller will keep the same view, more or less, but you may eventually run into depth-buffer-precision issues if you make it small enough (if so, it's easy to fix...just bring your far plane closer). 

 

As far as why it is off-center, since you are using a symmetrical frustum, it's likely that your eye and center points are off. If your "center" point were accurate, then we should see the medial axis run right through the center of the screen. Since we don't do that, there may be a problem with the method you are using to calculate points on this axis.


#2CDProp

Posted 14 January 2013 - 01:34 AM

I think you'll want to keep messing with the frustum a bit. The intestine model is still piercing the near plane. There are basically two parameters that you can play with (assuming you're using gluPerspective or something similar): your fovy and your near plane distance. If your intestines have a radius of r, then you'll want to make sure that:

 

a * n * tan(fovy) < r

 

Where n is your near plane value, and a is your aspect ratio. So, either your n or your fovy (or both) need to be smaller. It may help to play with these two parameters until you like what you see. Making the fovy smaller will create a "zoom in" effect that you may or may not like. Making the near plane distance smaller will keep the same view, more or less, but you may eventually run into depth-buffer-precision issues if you make it small enough (if so, it's easy to fix...just bring your far plane closer). 

 

As far as why it is off-center, since you are using a symmetrical frustum, it's likely that your eye and center points are off. If your "center" point were accurate, then we should see the medial axis run right through the center of the screen. Since we don't do that, there may be a problem with the method you are using to calculate points on this axis.


#1CDProp

Posted 14 January 2013 - 01:31 AM

I think you'll want to keep messing with the frustum a bit. The intestine model is still piercing the near plane. There are basically two parameters that you can play with (assuming you're using gluPerspective or something similar): your fovy and your near plane distance. If your intestines have a radius of r, then you'll want to make sure that:

 

n * tan(fovy) < r

 

Where n is your near plane value. So, either your n or your fovy (or both) need to be smaller. It may help to play with these two parameters until you like what you see. Making the fovy smaller will create a "zoom in" effect that you may or may not like. Making the near plane distance smaller will keep the same view, more or less, but you may eventually run into depth-buffer-precision issues if you make it small enough (if so, it's easy to fix...just bring your far plane closer). 

 

As far as why it is off-center, since you are using a symmetrical frustum, it's likely that your eye and center points are off. If your "center" point were accurate, then we should see the medial axis run right through the center of the screen. Since we don't do that, there may be a problem with the method you are using to calculate points on this axis.


PARTNERS