Re: Optimal way of drawing large plane in 3D

From: Tim (nospam_at_nowhere.com)
Date: 05/12/04


Date: Tue, 11 May 2004 21:57:21 -0700

Thanks a lot for the pointers. Based on your tips, it looks like the
asphalt could be combined into a single texture with two triangles for the
entire scene, then each city block can be more or less a box raised above
the street level, and the striped lines on the street could use a texture
with transparency and raised slightly above (the user should never have a
view from right at the ground so hopefully the stripes will always appear as
part of the street). I'll check out that book and look into the LOD
algorithms.

Thanks for the help!
Tim

"ZMan" <news-replies@thezbuffer> wrote in message
news:ezlJjpmMEHA.3668@TK2MSFTNGP11.phx.gbl...
> I think if you don't make a pair of triangles per tile you are going to
have
> a terrible time managing your textures becuase there will be so many
> combinations of possible textures. Remember sending extra textures costs
you
> the size of the texture (plus any mip maps) whereas extra vertices cost a
> lot less. I'm not sure how many different textures you have but you could
> combine all the asphalt ones into one texture, all the grass ones into
> another and then each triangle can select the portion of the texture it
> wants by varying the texture coordinates.
>
> Now 1024x1024x2 is over 2 million triangles so you're not going to want to
> send all of those at the same time. If its going to be possible for an
> overhead view to see all 2 million triangle then you are going to want to
> start looking at level of detail algorithms. I've heard this is a decent
> book that covers terrain http://www.mightystudios.com/ so it probably has
> LOD stuff in there.
>
> So you are going to have to decide which triangles to send which probalby
> means segmenting them up into groups, say for example 64x64 tiles per
group
> (8192 triangles) and you will have 256 of these groups. You decide which
> ones are visible by culling them to the view frustum or by checking to see
> if they are occluded by some of your high rise buildings. Hopefully you
will
> only have to send a few of the groups.
>
> There's lots of different ways to attack this - the best way would be to
try
> a few and see what works best.
> ZMan
>
> "Tim" <nospam@nowhere.com> wrote in message
> news:Os5ydzYMEHA.2284@TK2MSFTNGP11.phx.gbl...
> > I'd like to make a 3D scene for a streetscape, consisting of a grid of
> city
> > blocks and roads (8x8 square blocks). The ground is completely flat.
> > Conceptually, there are 1024x1024 tiles, and each tile is 64x64 pixels
> > (though could be 32x32 pixels). Many of the pixel combinations are
> > repetitive (imagine continuous asphalt streets with painted lines). On
> top
> > of this plane, there will be high-rise buildings that will obscure most
of
> > the surroundings from a first-person perspective, though top-down and
> > isometric views will be common as well.
> >
> > Would you make each tile its own set of vertices and triangles? Would
you
> > combine all tiles in an area that share the same repetitive texture? Is
> it
> > most optimal to minimize the number of triangles to the point where you
> hit
> > memory limits for texture sizes? Is there a way of automatically
> splitting
> > a giant texture optimally to suit specific hardware? Any help is
greatly
> > appreciated. I'm new to 3D programming so please pardon my ignorance.
> >
> > Thanks,
> > Tim
> >
> >
>
>



Relevant Pages

  • Re: Optimal way of drawing large plane in 3D
    ... I think if you don't make a pair of triangles per tile you are going to have ... a terrible time managing your textures becuase there will be so many ... combine all the asphalt ones into one texture, ...
    (microsoft.public.win32.programmer.directx.managed)
  • Re: mixing vertex types
    ... You can't mix vertex types within a vertex buffer. ... all the triangles you want textured are black color and all the triangles ... Then if you set the texture stages correctly they should combine ... > My guess is that I create multiple Devices, ...
    (microsoft.public.win32.programmer.directx.managed)
  • Re: multiple polygons each with a different texture
    ... Use only one texture. ... What approach is best for rending a list of triangles, ... Should I establish multiple vertexbuffers, and draw each buffer in turn ... and I use the same texture for each cube. ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: mixing vertex types
    ... >it will draw all the triangles, but the PositionColored ones are all Black ... >possibly) for Textured and reference a black pixel for ... >texture requirment of PTC vertices? ... your texture would have to contain a single white pixel ...
    (microsoft.public.win32.programmer.directx.managed)
  • Re: How to prevent wrap around problem in spherical texture mapping
    ... the points to cartesian coordinates and built a mesh of triangles that ... Now I want to use a texture for the sphere model. ... sphere's surface triangles and the result looks acceptable. ...
    (comp.graphics.algorithms)