[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some questions: OpenGL and free 3D models



Keith Lucas wrote:

> My next question is how you deal with texture seams: if the polys
> share verticies, which makes sense, in order to have GL use
> drawElements, they have to share texture info at the vertex, so
> how do you handle the seams where, say, at the back of the leg
> a texture portion has wrapped round from the front ?
> 
> Consensus amongst people I've asked is to fake up a second vertex [1]

Yep. That's the *only* way.

> [1] essentially transforming the model into one which can be
> unrolled onto a flat surface without breaking any edges or
> polys or making any polys or edges co-incident.

That's an odd way of looking at it - but yes.

I like to think of vertices as being 12-dimensional points
(x,y,z,s,t,nx,ny,nz,r,g,b,a), we view them in 3D by dropping
the last 9 coordinates. The vertices that lie along the texture
seam only appear to be in the same place because we are only
looking at 3 of their 12 dimensions. In 12D hyper-space, they
are quite separate. (Actually, we should strictly be talking
about 15 dimensions because OpenGL has w and u,v that are not
listed above because most programs don't use them).

Triangles can only 'share' their vertices if those vertices
are at the same location in 12D space.

This 12D view of the world is also useful when you are thinking
about the planarity rules for quadrilaterals (they have to
be planar in 12-space - not just 3-space).

-- 
Steve Baker                (817)619-2657 (Vox/Vox-Mail)
Raytheon Systems Inc.      (817)619-2466 (Fax)
Work: sjbaker@hti.com      http://www.hti.com
Home: sjbaker1@airmail.net http://web2.airmail.net/sjbaker1