• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

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

Faramir

Height field bitmap and texture?

8 posts in this topic

Hello, I''ve got a very basic question about OpenGL. Unfortunately I didn''t find the answer elsewhere yet (in the www.OpenGL.org manuals for example). I''m no OpenGL programmer, yet, but hopefully in the near future... Say you would like like to use OpenGL to draw bitmaps to the screen: as a bitmap texture on a polygon, where all the 3 or 4 points of the polygon have got the same depth value. Say you would have got a height field of each bitmap as big as the bitmap itself, which has been output by the 3d programm which rendered the bitmap texture. You would like to use this hight field as Z values for each pixel of the polygon. Could I use the z-buffer (called depth buffer?) of OpenGL to make each pixel of the polygons be sorted correctly? Greetings.
0

Share this post


Link to post
Share on other sites
Hello,

is my previous question too basic or does the silence mean that my described scenario isn''t doable via OpenGL?

Any hint to a source or a "yes" or "no" would be helpful. Thank you very much.

Greetings.
0

Share this post


Link to post
Share on other sites
no,

u can draw depthvalues to the screen though eg with glDrawpixels( .. GL_DEPTH_COMPONENT ) but this isnt what u want to do
0

Share this post


Link to post
Share on other sites
Hello,

ok, thank you. This was the right keyword to find some interesting FAQs like http://www.opengl.org/developers/faqs/technical/index.htm#indx0140
But indeed this would mean operations on pixel basis which I'm afraid would be too slow for my kind of program.

The autors of Tropico mentioned that they use a Z depth RLA bitmap for each of their object bitmap to calculate the correct depth of each object on screen (aside the floor I suppose).

The game runs with software (a bit slow) or hardware graphics card (much faster then). Since it also runs on NT and has got some OpenGL-Dlls in its directory, I suppose it uses OpenGL for the drawing?
How can they do a kind of z buffer than for their flat bitmap graphics?

Greetings.


quote:
Original post by zedzeek
no,

u can draw depthvalues to the screen though eg with glDrawpixels( .. GL_DEPTH_COMPONENT ) but this isnt what u want to do




Edited by - Faramir on September 8, 2001 4:19:53 AM
0

Share this post


Link to post
Share on other sites
what exactlly do u want to use the depth information for?
sorry i dont really understand what youre trying to do.
0

Share this post


Link to post
Share on other sites
The depth-buffer is view-dependent. A heightmap is view-independent. The only exception is if it is being used as map of z-values when the heightmap is being viewed top-down - in which case no part of the terrain will occlude anything on or above the terrain, or the terrain itself, and would thus eliminate the need for any z-sorting involving the terrain.
0

Share this post


Link to post
Share on other sites
Look under alpha testing, this would provide an effect like you want. You can assign an alpha image to the polygon. Then set the alpha test mode to draw only if alpha is less than. You draw the polygon, and it does an in hardware comparison for each alpha value, and updates the values in the frame buffer. I can''t give any specifics (would take me just as much time to find them as you, and my time is more important :-P ). Look under alpha testing.
0

Share this post


Link to post
Share on other sites
actually I think I was misguided, however alpha blending should do what you want to do
0

Share this post


Link to post
Share on other sites
Thanks to all repliers.
The alpha testing stuff mentioned by "Anonmyous poster" I''ll have a close look at, many thanks.

For what do I need the depth info? Well, like in Tropico I''d like to plot 2d-bitmap rectangles to the screen in an isometric game.

Currently I''ve got an all-software solution, which is very slow.

All objects (ie floor, houses, trees, men, etc) have got an internal 3d-position. For each object I transform its 3d-position (it''s its center for example) to 2d and at this position I plot the bitmap rectangle.
I''ve got a floor with tunnels, bridges, and also many big objects on the floor which use more than a typical isometric "tile". So I''ve got the problem to depth sort all objects before plotting.

Like in Tropico all objects are modelled via a 3d application and then exported to a plain 2d bitmap for my engine. So it was possible to export a kind of "height field" (or rather "depth field" in my case) for each isometric object which I could use for the depth sort.
If I had a z-buffer via OpenGL I could tell OpenGL: please plot a bitmap rectangle (ie texture on a polyon) at position x2d, y2d with an internal z-buffer-position of z_center and further use a "depth field" bitmap for each pixel''s z-buffer-depth of that rectangle.

I''m so sorry for my lousy English. Hopefully you understand what I try to say... :-) If not, please ask and I''ll try to tell it in another way.

Thanks and greetings.
0

Share this post


Link to post
Share on other sites