Page 3 of 6 FirstFirst 12345 ... LastLast
Results 21 to 30 of 55

Thread: TBGL experiments 2007

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

    Re: TBGL experiments 2007

    The Lava is nothing more than that picture, I was just wondering if that is the way you would like to see the meshes instead of planes, This way it will be one continuous flow, but without the mapping done correctly won't be a good test.

    There is a written tutorial on uvmapping that I will go through today and see if I can export it then correctly into thinEdge. If so, then a major hurdle is handled.

    I will try the mapping on the skydome too. It is mapped correctly in blender, like you said must be something I missed in the export.

    Added just now: I went through and the uv mapping button was selected in the export before. I selected all the buttons in different combinations related to materials, uv's and triangles and couldn't get it to come out right.

    I will now work on the tough uv mapping example and see how that goes and exports when finished.
    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. #22
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: TBGL experiments 2007

    Found this nice page with a very simple explanation of how to do ray to plane collision detection.
    You need the normal vector for a plane however. Are we able to get that via tbgl at the moment?

    http://www.gamespp.com/algorithms/co...utorial02.html
    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

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

    Re: TBGL experiments 2007

    Hi kryton9,

    yes, this approach is very precise and I was ( trying to ) using it for some time.
    But imagine we have terrain of thousands of triangles - little planes. Then we need to test if we are "in" any of this triangles and then setup correct position.
    Precise, but it can be really slow. Also notice the test of being inside the triangle is not here too.

    But I can try it, maybe it won't be that slow, I think for example "Giants:Citizen Kabuto" use this approach for collision with land.

    Regarding monsters and moving objects, I would go the way of bounding elipsoids and spheres. It is quite fast with acceptable level of approximation.

    I must tell you I have one mad idea regarding terrain collision .
    As you know, there are algoritms to find from few x,y points original 2D function.
    ( like you give: 1,1 and 3,9 and it returns y=x^2 ).

    If we could discover such a algo for a 3D field of points ( feeded from terrain vertex coordinates ), then it would be quite fast solution. We could just pass x, z and it would return minimal y, based on the function approximation.
    Of course, this way has its limits, like the terrain could not have "loops" or thing like the waterfall beam in first model is ( 2 y for 1 x,z ). But the waterfall could be added additionaly and collided individualy. Maybe idea for MATH module .

    Regarding exporting problems of UVs in Blender ... strange thing
    Maybe there is newer version of their OBJ exporter available ?


    Thanks a lot,
    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

  4. #24
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: TBGL experiments 2007

    On MATH module, send me the algo you need and I will add quite soon.

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

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

    Re: TBGL experiments 2007

    EDITED
    Hi Eros,

    please scratch it

    This idea is mad, and it would not be very fast/usable/realizable for all cases in the end.
    I will try to find another way.

    Sorry for confusion,
    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

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

    Re: TBGL experiments 2007

    I used this intersect method in a game I did in darkbasic pro and it was fast enough. It will be worth testing as since we know the x and z of the camera, we can just shoot a ray down to find the terrain y. No need to go through all the vertices, from the way I was thinking.

    For objects your idea of boxes and ellipsoids is a good approach. With that and ray intersection we should be able to do a lot.
    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

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

    Re: TBGL experiments 2007

    Managed to get a bigger level into thinEdge and thinBasic. I am using your mountain level Petr from before, so you will see the same water you made in scale to the newer bigger land

    The original mesh in blender was over half million faces, using this modifier called decimate, I was able to get it down to under 50000 vertices, about 17000 faces.

    I am still getting about 110 frames per second with it, so very very happy with the speed results. The bmp alone was over 12 megabytes in size so I didn't attach the whole file just a screenshot. It didn't turn out like I imagined it would anyways.
    Attached Images Attached Images
    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. #28
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: TBGL experiments 2007

    Hi kryton,

    what a landscape, how big area does it cover ?

    The 25 000 vertices original terrain has runs at 40 PS on my box, this one with 50 000 would run at ... ???.
    But as you say it was build from BMP file - when I get the BMP->Terrain function ( you mentioned in another thread ) working, I think it could render fast even on my PC.

    Why ?

    m15 models are treated as general geometry, so rendered as triangles.
    The terrains could be more optimized, because they are rectangular continuous areas.
    I could use triangle stripes instead of classic triangles, which would result in better speed.


    Thanks,
    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

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

    Re: TBGL experiments 2007

    Petr, last weeks tests with massive size terrains and the performance was a very pleasant surprise for me. I know that the speed and performance is there in thinBasic and TBGL from these tests.

    Loading it up with scene objects and all their textures, I don't know about, but I am sure there is a trick out there to it. Probably some sort of grid. The player moves and as he gets near the end of this section of the grid the next section based on his direction is loaded. I know DarkBasic Pro does things like this really well, although I hadn't used them, just from looking at their demos and when you think about it, it makes sense.

    I don't know how IL-2 guys do their massively huge terrains that are nicely populated with cities, roads, train tracks, rivers, buildings of all sorts and vehicles and wonderful skies. I have no idea how they do it. I would think some sort of fractal terrain, but it is based on real world geography, that is what perplexes me.
    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

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

    Re: TBGL experiments 2007

    I must say I enjoyed the terrain experiments very much too

    Regarding very large scenes, some advanced mangement would be needed. As you say, some sort of grid or sectors is a must, if you want to make the environment detailed but yet playable on older PCs. With static things, which can be display list optimized there is not so big problem. But moving things should have some visibility distance tests.

    I don't know how IL-2 guys do their massively huge terrains that are nicely populated with cities, roads, train tracks, rivers, buildings of all sorts and vehicles and wonderful skies. I have no idea how they do it. I would think some sort of fractal terrain, but it is based on real world geography, that is what perplexes me.
    Yes, they are really masters. There is lot of optimization in this game. I like the trick they used for forests. Just few layers, but from high it looks so real...
    I can see some level of detail corrections, when you fly too high. I think they have some huge array with heightmap, and they adjust the detail according to the distance.
    Skies are beautiful, volumetric clouds also terrific...

    I think they have separate terrain rendering engine, then the cities are just linked to the positions( their silhouette) , as well as detached trees, which are copies of some models, rotated slightly differently. Buildings are also individual, rendering according to distance.


    Bye,
    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

Page 3 of 6 FirstFirst 12345 ... LastLast

Similar Threads

  1. udt and experiments :)
    By Lionheart008 in forum Core module
    Replies: 3
    Last Post: 20-07-2009, 14:14

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
  •