Re: [Plib-devel] 3DS loader bug? [Fwd: Porting loaders to SGL]
Brought to you by:
sjbaker
|
From: Scott M. <mcm...@ca...> - 2000-07-11 16:03:43
|
I am not sure what you are saying. Are you saying the scale is
swapped but the offset is not? In other words, is the code as
written in version 1.2.0 correct:
parse_uscale goes to element [1]
but parse_uoffst goes to element [0]
etc....? I personally don't have the capability of generating
3ds models to test this aspect.
Paolo Leoncini wrote:
>
> > 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.
--
Scott McMillan mailto:mcm...@ca...
Cambridge Research Associates http://www.cambridge.com
1430 Spring Hill Road, Ste. 200 Voice: (703) 790-0505 x7235
McLean, VA 22102 Fax: (703) 790-0370
|