Results 1 to 10 of 27

Thread: M15 - reimplementation via GBuffers

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    M15 - reimplementation via GBuffers

    Hi guys,

    I was thinking about the M15 from memory a lot last days, and I got a crazy idea (my default kind of ideas).
    What about re-implementing the M15 as ThinBASIC TWF (TYPE with FUNCTIONs), using TBGL GBuffers as backend?

    Advantage:
    - much faster rendering than current M15 backend
    - dynamic allocation, no longer needed to specify number of models and their dimensions ahead
    - thinBasic code layer, adjustable by anyone

    Where is the code?
    https://github.com/petrSchreiber/m15Model

    How can I use it?
    Please note the current implementation is in pre-release phase, targetted at testing.
    You can grab the files from releases page.

    How difficult it is to use?
    Not much After you download the includes, it can be as simple as:
    #include "m15Model.tbasicu"
    
    ...
    
    dim model as m15Model
    
    model.FromFile("C:\myModel.m15")
    ' -- or
    String memoryBuffer = file_load("C:\myModel.m15")
    model.FromMemory(memoryBuffer)
    
    ...
    
    model.render
    
    Feedback welcome!
    Looking forward to your feedback. And if it is the way to go for you, please attach your M15 models, so I can use them as test data!


    Petr
    Last edited by Petr Schreiber; 27-03-2016 at 09:52.
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  2. #2
    Hi Petr
    i suggest a model such as the obj model here https://github.com/vispy/demo-data/b...eratops.obj.gz
    i have converted it to triceratops.M15 its size 1.5MB so it is complex and big enough and can be viewed okay with thinedge
    attached the triceratops.M15.rar

    could be made into GitHub project
    yes this is a good choice
    can't comment on the technical sides.

    this is a great detailed meshes with textures
    http://graphics.williams.edu/data/meshes.xml
    look at this HairBall created by NVIDIA Research 250 MB obj file, can't convert it to M15. i can't even load it in my 3d viewer to view it as obj file. it needs a powerful computer.
    Cornil Box seems interesting with textures, but it is several files
    Attached Files Attached Files
    Last edited by primo; 12-03-2016 at 12:39.

  3. #3
    Member
    Join Date
    Nov 2012
    Location
    Missouri, USA
    Posts
    113
    Rep Power
    29
    Petr,

    You have mention M15 in several posts lately. What is it, and where can it be downloaded?

    Bill

  4. #4
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi Bilbo,

    m15 is a 3D model format, which can be loaded and displayed in thinBASIC using TBGL module.

    You can convert industry standard OBJ models to M15 using batch convertor.

    If interested, checkout examples in thinBasic\SampleScripts\TBGL\m15Models\


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  5. #5
    i have converted the sibenik cathedral model from http://graphics.williams.edu/data/meshes.xml to m15 model, i have used example TBGL_UserDataStorage.tbasic from the thinbasic examples, wait a few seconds and you will see what is like a space station with a ufo above. but i can't get it textured. here is what i see in my computer :
    sibenik.PNG
    i think it is suitable for Petr to test since it a heavy model with textures.

    change the load models code in the example TBGL_UserDataStorage.tbasic like this
    ' -- Load models
    tbgl_m15InitModelBuffers 1, 2500
    tbgl_m15LoadModel APP_SOURCEPATH+"Models\alien1.m15", "Textures\", 1, 1, %TBGL_NORMAL_SMOOTH
    tbgl_m15ClearModel 1
    TBGL_m15LoadModel APP_SourcePath+"Models\sibenik.M15", "Textures\", 1, 2, %TBGL_NORMAL_SMOOTH
    tbgl_m15ClearModel 1
    tbgl_m15LoadModel APP_SOURCEPATH+"Models\alien3.m15", "Textures\", 1, 3, %TBGL_NORMAL_SMOOTH


    here is the model with textures save it to C:\thinBasic\SampleScripts\TBGL\EntityBased\Models
    http://wikisend.com/download/968692/sibenik.M15.rar
    Last edited by primo; 12-03-2016 at 16:31.

  6. #6
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Thank you Primo,

    this will help me to see what is the performance about
    Textures did not load, because PNG is not supported (now, I have it on list).


    Petr
    Last edited by Petr Schreiber; 12-03-2016 at 16:40.
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

Similar Threads

  1. How to combine GBuffers & Entities?
    By ReneMiner in forum TBGL General
    Replies: 9
    Last Post: 16-01-2018, 08:56
  2. glDrawArrays example + GBuffers example
    By primo in forum TBGL General
    Replies: 1
    Last Post: 21-11-2015, 23:47
  3. The silence inside the fractal - GBuffers (how many may be used ?)
    By RobbeK in forum TBGL Scripts and Projects
    Replies: 35
    Last Post: 24-01-2014, 12:18
  4. Preview: GBuffers for TBGL
    By Petr Schreiber in forum TBGL module by Petr Schreiber
    Replies: 11
    Last Post: 04-03-2010, 11:33

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •