Archived

This topic is now archived and is closed to further replies.

jverkoey

LWO (LightWave Object) Loader/Renderer Complete!

Recommended Posts

I have spent the past month developing a LWO renderer, which takes in a *.lwo file, loads all the vertices, polygons, patches, surfaces, and other basic entities. Currently, it supports being able to load in a model, render each layer independently, and apply colors to the correct polygons via the PTAG data. There are some pictures of some models loaded with the class here: http://www22.brinkster.com/ezroms/sshots/ here are the details, right from the class header file:

/****																	*****																			*
*	LWOLoader.h																*
*																			*
*	Designer/Programmer:													*
*		Jeff Verkoeyen														*
*																			*
*	Current Version:														*
*		1.02 ~September 03, 2003~											*
*																			*
*	Required files for successful compilation:								*
*		LWOLoader.h | LWOLoader.cpp | LWODef.cpp | Logger.h | Logger.cpp	*
*																			*
*	Purpose:																*
*		To load a LWO (LightWave Object) File, and to have all of the data	*
*			accessible for drawing.											*
*																			*
*	Classes:																*
*		LWOLoader- Holds all the data for the LWO file and also handles		*
*			loading.														*
*																			*
*	Macros:																	*
*		FLIP- Flips data using the two functions in the LWOLoader class.	*
*			Used for switching the endian format around if it is backwards.	*
*		RESIZE- A very handy macro for resizing a class or structure.  C++	*
*			does not like it if you use realloc on its classes/structs, so	*
*			use this macro instead. NOTE: Do NOT use it on a class/struct	*
*			that is constantly getting bigger, or you'll have to wait a		*
*			long time.														*
*																			*
*	Version:																*
*		1.0-																*
*			~Released~														*
*				August 29, 2003												*
*			~Updates~														*
*				First release.  Able to load and display models. No texture	*
*					loading is currently supported.							*
*			~WishList~														*
*				Texture Loading, more supported tags, no memory leaks.		*
*		1.01-																*
*			~Released~														*
*				September 02, 2003											*
*			~Updates~														*
*				Fixed a minor bug with the POLS chunk, where it would		*
*					overwrite the name of the sub-chunk and cause it to		*
*					think that a FACE sub-chunk was actually a PTCH			*
*					sub-chunk.												*
*		1.02-																*
*			~Released~														*
*				September 03, 2003											*
*			~Updates~														*
*				Added color SURF details.  Also fixed bug with the PTCH		*
*					SUBCHUNK that was causing it not to load correctly,		*
*					evidently PTCH chunks are the exact same as SURFs....	*
*					weird.  Also made the loader predetermine normals of	*
*					polygons, for faster rendering.							*
*																			*
*																			*
*	©2003 The Developer's Alliance (TDA)									*
*		This class/code is property of Jeff Verkoeyen. If you would like to	*
*		modify or use this code in any way, please contact Jeff Verkoeyen	*
*		beforehand.															*
*						Email:  bloodright@msn.com							*
*																			*
\****																	****/
  
if you have any questions or comments, feel free to ask and I will be sure to respond! Link //For the latest on all of the IVGDA projects! [edited by - jverkoey on September 3, 2003 10:36:05 PM]

Share this post


Link to post
Share on other sites