Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Ahh! Stupid Viewpoint Incompatabilities!

This topic is 6116 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Okay, right then, here is my problem: I have a 3d voxel-polygon hybrid engine, however, I''m having some trouble getting the voxel engine and the polygon engine to work in harmony. The voxels are written to the z-buffer first in one rendering loop, then in a second, the polygons are calculated and rendered, then the z-buffer is displayed. It''s all working great except for the fact that I get the feeling the view_point scales are different. For instance, when the user presses the right key [->], all the objects in the world are shifted to the left to give the illusion of the user looking right. Simple 3d rendering system, right? Well, the problem is the polygons appear to shift more over to the left than the voxels, so if the viewpoint rotates a lot, then the polygon will physically be moved over from the point where it used to be. Same goes with all dimensions of movement. So I basically just want the camera to world tansformations to be in sync. A possible solution I thought would be to lock the polygons above a specific place on the heightmap, and then during the voxel rendering loop, send the correct data on the location of the heightmap area to the polygon renderer. However, this would be very tricky to implement, and some problems would be the fact that hardly ever is a single heightmap area scanned; the voxel engine uses 8-cell heightmap interpolation (for nice smooth terrain), but this would make the chances of a single heightmap area being scanned a million to 1, even if the player was looking right at it. And if the heightmap area is blocked by a mountain, but the polygon is in the air so it could still be seen, the heightmap area wouldn''t be scanned, so it wouldn''t work. Whew, this is complex. I''d really like to be able to lock the polygon''s postion to the heightmap array, but it just creates a whole slew of problems. Does anyone have any ideas at all? Thanks for reading this entire thing, Cheers, -Jesse
Je est un Autre.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!