Using 3D model on the same plane without intersection

Started by
3 comments, last by PyroMeistar 20 years, 10 months ago
Hi, I''m currently creating a 2D-3D engine using OpenGL. One of it''s feature is multi-layered iso maps. I would like to use 3D characters in my scene. The only thing though is that I need to render them on the same plane in a way that they do not intersect. Example: There are two characters sharing the same x position. One of the character is in front of the other. The hic is that I can''t use the depth (z) coordinate and their polys must not cross. I have thought about Z-Sorting them myself and then render the farthest character, clear Z-Buffer, render the nearest. But clearing Z-Buffer for each characters in complex scenes can obviously slow the engine. Is there another way to draw them on the same Z coordinate (which will be say 0.0f for all characters in the scene). So that they do overlap and don''t intersect? My other question is not OpenGL related... I have searched all over the web to find a way to disable the ''Windows'' key and the following hot-combos: alt-tab alt-f4 and alt- so on. The only way I have found to do this is to lure Windows into thinking that there is a screen saver running in the background. This work beautifully but it also disable ctrl-alt-del (not so useful when debugging) and doesn''t work in Win 2000, XP. I would like to see some code that do this: when the window loses control of the keyboard, it get minimized. I''ve tried to do this by handling msg but it simply doesn''t want to work. Thanks alot!
Advertisement
Maybe you can offset their z by a fraction based on their y position. Something so small you don''t notice visually but large enough to work within the Z buffer''s resolution.

So they are not drawn exactly on the same plane, but only different enough to let the z buffer do the work.


-solo (my site)
-solo (my site)
Yes, that should work. But I will have to use an Ortho viewport...

Thanks!

[edited by - PyroMeistar on June 17, 2003 12:30:44 AM]
quote:Original post by PyroMeistar
My other question is not OpenGL related...

I have searched all over the web to find a way to disable the ''Windows'' key and the following hot-combos: alt-tab alt-f4 and alt- so on. The only way I have found to do this is to lure Windows into thinking that there is a screen saver running in the background. This work beautifully but it also disable ctrl-alt-del (not so useful when debugging) and doesn''t work in Win 2000, XP.

I would like to see some code that do this: when the window loses control of the keyboard, it get minimized. I''ve tried to do this by handling msg but it simply doesn''t want to work.



Now, what about the Windows input gain/lost msg, does anyone have a work-around for this?
Look into polygon offset, it might help...

This topic is closed to new replies.

Advertisement