Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26

Thread: Code: Skybox/-dome

  1. #11
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: Code: Skybox/-dome

    Mike, would lens flare be something you would like to see as an option for skybox?

    I think commands could be made by Petr for tbgl, will wait to see what he says.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  2. #12

    Re: Code: Skybox/-dome

    Kent, Petr can't do everything.

    If the fucntionset can be implemented into TBGL, then he will do it later on.

    Yes, lensflare support would be great but for our game not important.

  3. #13

    Re: Code: Skybox/-dome

    Kent, I found the GL commands to change perspective, which may come in handy for the sky-box... Sure came in handy for my sandbox! (Gonna nick-name it the litter-box soon... it is full of...)

    Not sure if we need both of these or just one... I sort-of hacked it together.

    Add these under the (Uses "TBGL")
    [code=thinbasic]#INCLUDE "%APP_INCLUDEPATH%\thinbasic_gl.inc"
    #INCLUDE "%APP_INCLUDEPATH%\thinbasic_glu.inc"[/code]

    Now, after the loop-draw commands...
    [code=thinbasic] TBGL_ClearFrame ' -- Old Code, erase drawing/screen

    glMatrixMode(%GL_PROJECTION) ' -- Get matrix view-port stack/buffer
    glLoadIdentity ' -- Load matrix view-port stack/buffer
    ' Warning, this is sensitive to camera position and focal point! (Sniper-view zoom is about 20 view-angle)
    ' Perspective(view-angle, screen-ratio, near-view, distance-view)
    gluPerspective(60,1.3333,0.2,1000) ' -- Set matrix view-port perspective-deform changes

    TBGL_SceneRender(%sScene) ' -- Old code, redraw view-port stack/buffer
    TBGL_DrawFrame ' -- Old code, display view-port drawing/screen[/code]

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

    Re: Code: Skybox/-dome

    Hi Jason,

    yes, you can do it this way, TBGL can be combined with OpenGL.
    Default TBGL FOV is 45°.
    The only problem will occur when you will try to render fonts created from textures, they currently require 45 FOV.

    TBGL Field Of View management is on the TODO list, Mike already suggested it.


    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. #15

    Re: Code: Skybox/-dome

    In the "Core", there is only one location for fonts, in the "%sINFO" render area. (Suggested)... Rendered data would be on a 3D page (Flat surface) or in a view-port. I can't imagine a need for 3D sprite letters within the race-game or the sky-box... so we should be safe there. (I imagine the GUI would be an overlay to the game-scene.)

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

    Re: Code: Skybox/-dome

    Ok then,

    I just wanted to let you know there is such a "danger".
    Mikes GUI routines use the second type of font, which is FOV resistant


    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

  7. #17
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: Code: Skybox/-dome

    Quote Originally Posted by ISAWHIM
    Kent, I found the GL commands to change perspective, which may come in handy for the sky-box... Sure came in handy for my sandbox! (Gonna nick-name it the litter-box soon... it is full of...
    Never thought about perspective for skybox. Thanks Jason will play with it sometime soon.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  8. #18
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    skybox test 1

    Here is a test of a skybox.

    The 512 x 512 texture size looks too pixelated if you ask me. I will try 1024x1024 this weekend.
    I also am relearning terragen and set the camera too high, but I thought I might as well post this.

    I threw in a quick dummy wall. The bottom of the wall because of my bad camera setting is way off. But the top of the city wall seemed to be about where I imagined from reading the design document. Let me know if you think it is too high or not. Thanks.

    The next skybox I do I will add a little bit higher mountains too and at 1024 x 1024.

    Escape to exit, move mouse to look around.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

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

    Re: Code: Skybox/-dome

    Hi Kent,

    thanks for your demo.
    Your rotations were too fast on my PC! I guess this is because you have that monster 3D card which makes the mouse delta very tiny.

    For mouse input I recommend using TBEM event, to get mouse delta at constant 1/40 time interval for example. This is only way to avoid problems on high end cards.

    The problem is mouse delta is always integer, mouse coordinate cannot be returned as decimal number. That brings some imprecision in the end.


    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

  10. #20

    Re: Code: Skybox/-dome

    Quote Originally Posted by Petr Schreiber
    Ok then,

    I just wanted to let you know there is such a "danger".
    Mikes GUI routines use the second type of font, which is FOV resistant


    Petr
    No problem Petr. I guess I will stop working on this function set too if other people have different plans. More time to concentrate on my new stuff. ;D

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. skybox
    By kryton9 in forum TBGL Scripts and Projects
    Replies: 12
    Last Post: 18-06-2007, 22:56

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
  •