/* vertex maps */
typedef struct st_lwVMap {
struct st_lwVMap *next, *prev;
char *name;
unsigned int type;
int dim;
int nverts;
int perpoly;
int *vindex; /* array of point indexes */
int *pindex; /* array of polygon indexes */
float **val; // These are the actual UV coordinates, but how do I know which ones go with which polygon points?
} lwVMap;
// Only polygon points with Continuous UV maps have these right?
typedef struct st_lwVMapPt {
lwVMap *vmap;
int index; /* vindex or pindex element */
} lwVMapPt;
LWO (Lightwave) discontinuous UV map loading
So I keep coming back to this, I need to be able to load discontinuous UV maps from a .lwo file.
I'm using lwobject provided in the LWSDK. But since this is not a plug in, I don't have access to lwMeshInfo. (Or do I? These are all assumptions to some extent, so please correct me if I'm wrong)
I was reading:
GameDev.net[forum]: LWO loading and UVs
And I get the general idea, and I'm down to the last issue which is this:
In my in memory format I'm converting to, I have Polygons, which contain PolygonVertex which contains a reference to a Point as well as local UV data.
So I shouldn't need to do the Vertex duplicating I see most of the code examples because each Polygon already has a PolygonVertex with it's own UV storage.
So I'm at sort of the last part here, which is finding the correct UV coordinate for discontinuous VMaps.
In the code from that other thread they seem to be using pntVPIDGet() which is part of lwMeshInfo to get the proper coordinates, but as I said before, I don't think I can use since this isn't a LW plug-in)
So how do I locate the proper UV Coordinates inside this struct:
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement