Menu

Loading 3ds to freeForm

Help
Daniel
2019-05-21
2019-06-17
  • Daniel

    Daniel - 2019-05-21

    Hello!
    Is there any trick to load a freeForm faster?
    I simply do freeForm.loadFromFile, and in my case with a 3mb file + textures, it takes very long time.
    I tried to figure out multi threading, but could not manage.
    It needs to be loaded while I have a menu with user inputs.

    Any tips would be appreciated!
    Cheers!

     
    • Davor Slutej

      Davor Slutej - 2019-05-22
       

      Last edit: Davor Slutej 2019-05-22
      • Daniel

        Daniel - 2019-05-22

        Hi!
        Thank you for the response!
        I never tried to use Stream. I will take a look!
        Will it be useful for loading a 3ds file on program start?

        Cheers!

        Skaffa Outlook för Androidhttps://aka.ms/ghei36


        From: Davor Slutej davor242@users.sourceforge.net
        Sent: Wednesday, May 22, 2019 6:50:08 AM
        To: [glscene:discussion]
        Subject: [glscene:discussion] Re: Loading 3ds to freeForm

        Hello!

        See https://sourceforge.net/p/glscene/discussion/93605/thread/df179b7f63/

        Should speed thing up significantly.

        On 21 May 2019 23:44:36 CEST, Daniel bracer@users.sourceforge.netbracer@users.sourceforge.net wrote:

        Hello!
        Is there any trick to load a freeForm faster?
        I simply do freeForm.loadFromFile, and in my case with a 3mb file +
        textures, it takes very long time.
        I tried to figure out multi threading, but could not manage.
        It needs to be loaded while I have a menu with user inputs.

        Any tips would be appreciated!
        Cheers!


        Loading 3ds to
        freeFormhttps://sourceforge.net/p/glscene/discussion/93606/thread/b4c6834c23/?limit=25#15b2


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/glscene/discussion/93606/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/

        --
        Sent from my Android device with K-9 Mail. Please excuse my brevity.


        Loading 3ds to freeFormhttps://sourceforge.net/p/glscene/discussion/93606/thread/b4c6834c23/?limit=25#15b2/2b44


        Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/glscene/discussion/93606/

        To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

         
        • Davor Slutej

          Davor Slutej - 2019-05-22

          You still do LoadFromFile, but replace the GLApplicationIO.pas with the one in the ZIP file and add BufferedFileStream.pas to the project or GLScene package. BufferedFileStream will be used in the back.

          As mentioned, you should see a signficant performance improvement, reason being that the number of file i/o system call will drop by orders of magnitude.

           
          • Daniel

            Daniel - 2019-05-22

            Ok! That sounds cool!
            I am using Lazarus, so I am getting two errors:

            BufferedFileStream.pas(57,31) Error: No matching implementation for interface method "QueryInterface(constref TGuid;out <formal type="">):LongInt; StdCall;" found</formal>

            BufferedFileStream.pas(82,28) Error: No matching implementation for interface method "QueryInterface(constref TGuid;out <formal type="">):LongInt; StdCall;" found</formal>

            Do I need to add some LCL unit or so?

            Cheers!

             
  • Davor Slutej

    Davor Slutej - 2019-05-22

    Just rip out the interface stuff.

     
  • Daniel

    Daniel - 2019-05-23

    Thanks! I got it working.
    But sadly it does not improve my loading times...

     
  • Daniel

    Daniel - 2019-06-16

    Hey everyone!
    Does anyone have experience if different file formats are faster or slower to load to a freeform?
    Is for example md2 faater than 3ds?

     
  • Jerome.D (BeanzMaster)

    Hi Daniel, i think the best alternative is Wavefront OBJ format, it's less complicated than 3DS so it will be faster to load.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.