Main Menu

ASC 3D Object Loader

Started by kevin, June 26, 2013, 09:25:32 PM

Previous topic - Next topic

kevin

ASC II 3D Object Loader / Viewer V0.02

    This example loads an ASC formatted 3d object made of vertex and face list into memory and renders the result to fixed position camera.

  Keys:

       Space = Change Draw Mode
     Arrows = Change High light face
            H = Toggle Face highlights ON/OFF
      Enter = Toggle Back faces
          ESC = Quit


  Requirements:

     Due to a capture to scene bug with Gouraudquad, this examples requires  PlayBASIC V1.64O Beta 16 (or higher) to function correctly.


   Related Examples:

            * Textured Tunnel
            * Rotated Column 
            * Timer Based Movement Star Field
            * Z Depth Perspective For Sprites
            * Manual Projection/Scene Perspective
            * 2.5D Rugby Source


  Download:

      Attached.

ScottieB

Thanks kevin for the help.
It does'nt do texturemapping but it gives me some ideas.

kevin

QuoteIt does'nt do texturemapping but it gives me some ideas.

  Never said it did..  But For texture mapping, replace the Tri/Quad, GouraudTri, GouraudQuad calls with TextureTr, TextureQuad calls and hey presto it's texture mapped.    But it's affine (linear) texture mapping, so it won't be perspectively correct. 

  You can approximate perspective with linear mapping by using subdivision techniques.  Which can help remove some of the shearing by products that occur due to the linear interpolation.    There's actually an example of this in the standard PlayBASIC example pack, as well as various 3d (6dof) examples.