Path: chuka.playstation.co.uk!news From: "Robert Anderberg" Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: Questions, questions, questions Date: Tue, 26 Jan 1999 16:52:58 -0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 49 Message-ID: <78l3c1$gpd6@chuka.playstation.co.uk> References: <36A30C93.3D49@bristol.ac.uk> NNTP-Posting-Host: 212.67.129.84 X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 Tom wrote in message <36A30C93.3D49@bristol.ac.uk>... >Hi there, > >I've recently started to write a 3d landscape engine using graduated >coloured triangles. I'm building the entire map in memory at the moment >using one tmd for every four points on the map which are created at run >time. This kind of limits the size of the map as each tmd and its >handler takes up loads of memory. What I want to do is dynamically >create each 2*2 patch as they come into view and remove them as they >leave the view cone. The thing is, I really don't have a clue how to >keep track of which parts of memory are free and which hold valid tmd >data. > >Now, a (hopefully) much easier problem to answer. In the early version >of the engine that I've got so far, some of the patches that are being >drawn seem to be too far away and the PlayStation doesn't bother drawing >them. When they come back into view though, the program crashes. Is >there some way to avoid this or can I increase the clipping distance to >prevent the problem occuring? > >Cheers, > > Tom > Hi, Don't really understand the first bit, but if you are using a single TMD with all is data (object.c?) for each patch then you are going to run out of memory really quickly. I suggest splitting the map into sections and rendering the sections on screen as tmds, try looking at the tutorial MakeTMD to try and render multiple patches as one tmd. Also, if your map is huge, use memalloc to create and free-up memory as needed. For the second problem, it's better if you set up your own clipping routines to limit how far into the distance the engine draws, try looking at the 'perform world clipping' routine in the 3d1 tutorial. Just remember, if you want your yaroze to clap, you have to do tricks :) on the crashing point, make sure you don't have any global variables with the same name as local ones. Probably no help at all :) Rob