R: [Plib-devel] 3DS loader bug? [Fwd: Porting loaders to SGL]
Brought to you by:
sjbaker
From: Paolo L. <p.l...@ci...> - 2000-07-11 08:57:53
|
> Scott McMillan wrote: > > > 2) I may have found a bug. Not knowing the 3ds format at all, I > > cannot be sure. It involves the parsing texture scale and offset > > parameters starting at line 343 (of PLIB version 1.2.0). Shouldn't > > parse_uscale() stick the value into element 0 of the texture_scale? > > > > static int parse_uscale( char **p, unsigned int length ) > > { > > texture_scale[ num_materials - 1 ][1] = get((float*)*p); > > // ^^^ > > // 0? > > return PARSE_OK; > > } > > > > static int parse_vscale( char **p, unsigned int length ) > > { > > texture_scale[ num_materials - 1 ][0] = get((float*)*p); > > // ^^^ > > // 1? > > return PARSE_OK; > > } > > > > static int parse_uoffst( char **p, unsigned int length ) > > { > > texture_offst[ num_materials - 1 ][0] = get((float*)*p); > > return PARSE_OK; > > } > > > > static int parse_voffst( char **p, unsigned int length ) > > { > > texture_offst[ num_materials - 1 ][1] = get((float*)*p); > > return PARSE_OK; > > } I modified Per Liedman's 3DS loader in this way since 3DS files exported by 3DStudio Max (3.0) present such u-v scale swap (coming from the repetition/tiling param). Have you tried with any datafile? I did it with textured 3DS'es produced by Max, Sim Rational Reducer (very good!), and Rhino3D - it seems to work. But I can't exclude exceptions to this experimental rule. Greetings - ---------------------------------------------------------------------------- - Paolo Leoncini phone: +39 (0823) 623134 Scientific Visualization Group fax: +39 (0823) 623126 CIRA - Italian Center for Aerospace Researches p.l...@ci... Via Maiorise - 81043 Capua (CE) Italy www.cira.it/research/vis |