Path: chuka.playstation.co.uk!news From: Craig Graham Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: 3D Uneven Terrain Date: Mon, 20 Jul 1998 12:24:44 +0100 Organization: Intelligent Research Lines: 56 Message-ID: <35B328FC.E0B64296@hinge.mistral.co.uk> References: <6otsjq$cv91@scea> NNTP-Posting-Host: 194.131.235.3 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.03 [en] (Win95; I) Nathan Miller wrote: > 1) You make a data structure in addition to the tmd that represents the > terrain that divides the level into your average cell based world: > struct mapdata > { > int flag; > //Link list containing items and such for cell > }; > mapdata level1[50][50]; That's similar to a Voxel. What you can do is generate a 'height map' bitmap on the fly: Here's one way : 1) Setup the fogging so that you get a fairly good fade out effect from high intensity pixels at the highest point on the map to low intensity/black at the lowest point of the map. 2) Have the playstation render a top-down view of your map model to an offscreen area of VRAM (size is relative to how accurate you need the map to be). 3) Copy the VRAM area into DRAM - viola, you've generated the height map. Black == low , white==high. Advantages: 1) This solves the problem of interpolating polygons yourself to generate the height map. 2) You only have to do it once for the current map. 3) If you want high accuracy and a real big map, you can regenerate the height map every N frames or whenever the player moves to far. 4) Can be used with dynamically generated TMD landscapes. 5) Very Very fast. > 2) you check the players height level directly with the tmd's vertex data Can be done, but you then have to interpolate to create the polygon planesto get the height at a given point. > so my questions are: > > 1) What is the best method? > > 2) Please give an explination on how to use the method... > See above... > Nathan Craig.