Path: chuka.playstation.co.uk!news From: James Shaughnessy Newsgroups: scea.yaroze.programming.3d_graphics,scee.yaroze.programming.3d_graphics Subject: Re: 3d tiling and ripping Date: Sun, 31 Jan 1999 14:12:23 +0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 131 Message-ID: <36B464C6.8BE590EE@manc.u-net.com> References: <7908of$6fv3@chuka.playstation.co.uk> NNTP-Posting-Host: manc.u-net.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------390E5C2AFA20F11B27CC013A" X-Mailer: Mozilla 4.5 [en] (Win95; I) X-Accept-Language: en Xref: chuka.playstation.co.uk scea.yaroze.programming.3d_graphics:338 scee.yaroze.programming.3d_graphics:1172 --------------390E5C2AFA20F11B27CC013A Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Apart from oversizing the tiles slightly like Pete suggests (the easiest way, but may perhaps result in unsightly "edge overlap flipping" if the camera moves a lot), all I can suggest is that you render the whole world grid to a single TMD. Then you can make the vertices that should coincide, actually coincide losing those annoying gaps. This will have an additional benefit of being much faster too.* I notice though that your world tiles are not simple 4-polys so this would prove too expensive and difficult probably. But what you could do is just do the floor this way (where the gaps actually happen), and do the rest of the tile model (buildings or whatever) the same way as before. Yay, nay? Later, Jim * [eg in my ScaleX demo I firstly had all the track segments sorted as single manipulated TMDs. Not only was it too slow (could only manage around 100 track segments) it also had many of those gaps in between the shadow polygons -- very noticable and ugly. Sorting all the poly's to a single TMD lost those gaps (because vertices are being shared) and I can now sort 3 times as many track segments in a single frame. Which is nice.] Nathan Miller wrote: > Just had a question. I am representing my world with an array like > world[20][20]. I have 3d models that represent a tile for the world, with > floor included. The drawing function takes the array and a TILE_WIDTH and > TILE_HEIGHT variable and draws the terrain (that is the simplified version). > The only problem is, the floor tiles tear, causing black lines to appear > between the tiles. The floor is flat right now. Here is a simplified > version of the function. > > TILE_WIDTH = 200 > TILE_HEIGHT = 200 > > for(i=0;i<20;i++) > for(j=0;j<20;j++) > > tempx = i*TILE_WIDTH; > tempz = i*TILE_HEIGHT; > DrawTile(world[i][j], tempx, tempy); > } > > That isn't exactly right, but you get the idea. It looks good, except for > the edges of the tiles rip and cause random black lines all over the screen. > Any help? > > Thanks, > > Nathan Miller -- ----------------------------------------- James Shaughnessy james@manc.u-net.com http://www.netyaroze-europe.com/~shaughnj or http://i.am/bart.simpson/ ;-) ----------------------------------------- --------------390E5C2AFA20F11B27CC013A Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Apart from oversizing the tiles slightly like Pete suggests (the easiest way, but may perhaps result in unsightly "edge overlap flipping" if the camera moves a lot), all I can suggest is that you render the whole world grid to a single TMD.  Then you can make the vertices that should coincide, actually coincide losing those annoying gaps.  This will have an additional benefit of being much faster too.*

I notice though that your world tiles are not simple 4-polys so this would prove too expensive and difficult probably.  But what you could do is just do the floor this way (where the gaps actually happen), and do the rest of the tile model (buildings or whatever) the same way as before.  Yay, nay?

Later,
Jim

* [eg in my ScaleX demo I firstly had all the track segments sorted as single manipulated TMDs.  Not only was it too slow (could only manage around 100 track segments) it also had many of those gaps in between the shadow polygons -- very noticable and ugly.  Sorting all the poly's to a single TMD lost those gaps (because vertices are being shared) and I can now sort 3 times as many track segments in a single frame. Which is nice.]
 

Nathan Miller wrote:

Just had a question.  I am representing my world with an array like
world[20][20].  I have 3d models that represent a tile for the world, with
floor included.  The drawing function takes the array and a TILE_WIDTH and
TILE_HEIGHT variable and draws the terrain (that is the simplified version).
The only problem is, the floor tiles tear, causing black lines to appear
between the tiles.  The floor is flat right now.  Here is a simplified
version of the function.

TILE_WIDTH = 200
TILE_HEIGHT = 200

for(i=0;i<20;i++)
 for(j=0;j<20;j++)

   tempx = i*TILE_WIDTH;
   tempz = i*TILE_HEIGHT;
   DrawTile(world[i][j], tempx, tempy);
 }

That isn't exactly right, but you get the idea.  It looks good, except for
the edges of the tiles rip and cause random black lines all over the screen.
Any help?

Thanks,

Nathan Miller

--
-----------------------------------------
James Shaughnessy    james@manc.u-net.com
http://www.netyaroze-europe.com/~shaughnj
or  http://i.am/bart.simpson/     ;-)
-----------------------------------------
  --------------390E5C2AFA20F11B27CC013A--