Re: [Plib-devel] PLIB 'Neat stuff' library
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-07-31 04:58:13
|
Christian Mayer wrote: > > Steve Baker wrote: > > > > One nasty issue that raises is how you'd load (say) VRML files > > without linking in the Aux library if your game didn't WANT to > > see spheres and cubes and things as anything other than > > a bunch of tristrips...Hmmmmm. > > All 'complex primitives' like spheres and cubes need a way to convert > themselfs to tristrips. First they need it to be able to be displayed > and secondly anyone who doesn't like these primitves in his scenegraph > would convert them and dump them. We talked about this at length on the PPE list a while back. I think that what we should do is to derive a class from ssgRangeSelector to implement these objects. As the file is loaded, it could have various polygonal versions created as leaf nodes by default - at various levels of detail. We might perhaps want some global 'error metric' control for the creation of those things... but perhaps not in the first version. Thus, programs that don't know about VRML would be able to traverse the scene graph without needing to know about spheres and cones and such like. Programs that do care can take appropriate action. When the model is written out, a VRML or POV file writer need only to look at the type of that node to realise that it shouldn't write out the underlying geometry - but instead to emit a simple sphere, cone, etc. Writers for formats like AC3D that don't have higher level primitives would simply write out the underlying geometry in the normal way - which is the best you can do under the circumstances. The bottom line is that a typical game can still read VRML files without having to worry about high level primitives - there is no realtime penalty to using them - and yet programs like modellers can still identify those nodes and do more sophisticated things. > So anyone who needs to be able to read VRLM needs to use the Aux library > - and if it is only for converting the primitives ASAP. I suppose so. > I don't think that that limitation is a too big. Esp. as you could > convert the models to something else before loading them if you don't > like the bloat of an Aux library. Yes. -- Steve Baker HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sourceforge.net http://tuxaqfh.sourceforge.net http://tuxkart.sourceforge.net http://prettypoly.sourceforge.net |