3D polygon world render
-
- Posts: 103
- Joined: Mar 08, 2016 19:10
- Location: The Netherlands
3D polygon world render
Hello Everyone,
I have been working on my one 3D render and i like to show some pictures and source if you like.
I call it a low-polygon cartoon style 3D.
Never did think to make it this far.
Here is a picture i like http://ac1.servegame.com:88/Screens/Screenshot03.png
some older pictures are
http://ac1.servegame.com:88/Screens/Screenshot02.png
http://ac1.servegame.com:88/Screens/Screenshot01.png
http://ac1.servegame.com:88/Screens/Screenshot04.png
The world render code is a 16x16x16 chunk area by default and containing points, triangle and lights in range.
it supports VR-mode with a big frame-rate impact :)
My plan is to send the chunks over internet for a multiplayer game, but i have a lot to do.
I have modified D.J.Peters polygon for it http://www.freebasic.net/forum/viewtopi ... 09#p227109
And i'm still learning the freebasic languages on my one way.
Tell me what you think.
I have been working on my one 3D render and i like to show some pictures and source if you like.
I call it a low-polygon cartoon style 3D.
Never did think to make it this far.
Here is a picture i like http://ac1.servegame.com:88/Screens/Screenshot03.png
some older pictures are
http://ac1.servegame.com:88/Screens/Screenshot02.png
http://ac1.servegame.com:88/Screens/Screenshot01.png
http://ac1.servegame.com:88/Screens/Screenshot04.png
The world render code is a 16x16x16 chunk area by default and containing points, triangle and lights in range.
it supports VR-mode with a big frame-rate impact :)
My plan is to send the chunks over internet for a multiplayer game, but i have a lot to do.
I have modified D.J.Peters polygon for it http://www.freebasic.net/forum/viewtopi ... 09#p227109
And i'm still learning the freebasic languages on my one way.
Tell me what you think.
-
- Posts: 538
- Joined: Jul 15, 2005 4:13
Re: 3D polygon world render
Looks good....f14 kamakzee is a game i developed in freebasic going back many years...it took me over a year of prgramming to get a good working demo whipped up..realms of darkness was another...notbsure if itnwould still be on this server or not.
-
- Posts: 103
- Joined: Mar 08, 2016 19:10
- Location: The Netherlands
Re: 3D polygon world render
Update 2
I got back on it. https://youtu.be/gB4ajrh-aU0
Now loads from STL 3D files.
The 200 trees are objects and the cubes are dropped in solid world.
Moving light is still not on the objects.
I got back on it. https://youtu.be/gB4ajrh-aU0
Now loads from STL 3D files.
The 200 trees are objects and the cubes are dropped in solid world.
Moving light is still not on the objects.
Last edited by Gunslinger on Oct 08, 2018 22:34, edited 1 time in total.
Re: 3D polygon world render
thanks for sharing :-)
Re: 3D polygon world render
A little source code would be nice, I think ;)Gunslinger wrote:I have been working on my one 3D render and i like to show some pictures and source if you like...
-
- Posts: 103
- Joined: Mar 08, 2016 19:10
- Location: The Netherlands
Re: 3D polygon world render
The source code is not little any more.paul doe wrote:A little source code would be nice, I think ;)Gunslinger wrote:I have been working on my one 3D render and i like to show some pictures and source if you like...
So many thing to improve and cleanup.
here you go. http://ac1.servegame.com:88/download/Ar ... linger.zip
I think i can use pointers in triangles data type to improve performance.
Let me know if you have any tips. :-)
Re: 3D polygon world render
Nice! Didn't take a really depth look, but for now I can tell you that it freezes the process after a while. Are you using getMouse() in another thread? It is either this, or you're having a race condition somewhere in the code.Gunslinger wrote:Let me know if you have any tips. :-)
One tip for now: the movement speed varies wildly with the framerate (~14-45 FPS here). You need to either: Pretty good work, considering it's rendered all in software!
-
- Posts: 103
- Joined: Mar 08, 2016 19:10
- Location: The Netherlands
Re: 3D polygon world render
Thanks, Freezes happens when the video buffer is to small.paul doe wrote:Nice! Didn't take a really depth look, but for now I can tell you that it freezes the process after a while. Are you using getMouse() in another thread? It is either this, or you're having a race condition somewhere in the code.Gunslinger wrote:Let me know if you have any tips. :-)
One tip for now: the movement speed varies wildly with the framerate (~14-45 FPS here). You need to either: Pretty good work, considering it's rendered all in software!
It wil do a redim preserve for more room as many times as needed.
That array is very big so it freezes a bit, over times it will stop doing that.
And i know about frame rate, just like to see how high it gets.
When i move up way from the world the fps go to 300+ and i rocket of in space :)
Last edited by Gunslinger on Oct 09, 2018 20:37, edited 1 time in total.
Re: 3D polygon world render
Yes, but it shouldn't freeze the app. Also, why such a simple scene uses an inordinate amount of memory? Task Manager reports a usage of ~888 MB here (!)Gunslinger wrote:Thanks, Freezes happens when the video buffer is to small.
It wil do a redim preserve for more room as many times as needed.
That array is very big so it freezes a bit, over times it will stop doing that.
Perhaps, but that also shouldn't happen. By decoupling the updating from the rendering, you can move at a consistent speed while still allowing the renderer to go as fast as your hardware can handle. See this article for details: https://www.koonsolo.com/news/dewitters-gameloop/Gunslinger wrote:And i know about frame rate, just like to see how high it gets.
When i move up way form the world the fps go to 300+ and i rocket of in space :)
Re: 3D polygon world render
Awesome :-)
Change:
#include "include/keyboard.bi" to #include "Include/keyboard.bi"
And delete:
#if defined(__FB_WIN32__) block in LP3_data_type.bi
And it runs under linux fbc32 and fbc64 bit as well.
Movement with mouse-pad is a bit annoying.
Three months to turn it into a game: https://freebasic.net/forum/viewtopic.php?f=17&t=27069
Change:
#include "include/keyboard.bi" to #include "Include/keyboard.bi"
And delete:
#if defined(__FB_WIN32__) block in LP3_data_type.bi
And it runs under linux fbc32 and fbc64 bit as well.
Movement with mouse-pad is a bit annoying.
Three months to turn it into a game: https://freebasic.net/forum/viewtopic.php?f=17&t=27069
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: 3D polygon world render
Cool demo. Can the code be used to make something like this?
https://www.youtube.com/watch?v=8piDU5UFA68
I remember the fun of learning to land on the air craft carrier without crashing. Flying under the Golden Gate bridge and over Alcatraz.
Looking back on some of the old software I have to take my hat off to the clever programmers of the time who had to make do with little memory and slow computers. Of course the Amiga did have special graphics hardware for some things such as drawing and filling in polygons.
I remember Mark Silby of Blitz Basic fame making a simple 3d demo of flying around the three pyramids and thought it would be cool to be able to do that myself.
https://www.youtube.com/watch?v=8piDU5UFA68
I remember the fun of learning to land on the air craft carrier without crashing. Flying under the Golden Gate bridge and over Alcatraz.
Looking back on some of the old software I have to take my hat off to the clever programmers of the time who had to make do with little memory and slow computers. Of course the Amiga did have special graphics hardware for some things such as drawing and filling in polygons.
I remember Mark Silby of Blitz Basic fame making a simple 3d demo of flying around the three pyramids and thought it would be cool to be able to do that myself.
-
- Posts: 103
- Joined: Mar 08, 2016 19:10
- Location: The Netherlands
Re: 3D polygon world render
I think this can do better then that game. The number of triangles i have is insane and uses like 800mb just to load the world.BasicCoder2 wrote:Cool demo. Can the code be used to make something like this?
https://www.youtube.com/watch?v=8piDU5UFA68
I remember the fun of learning to land on the air craft carrier without crashing. Flying under the Golden Gate bridge and over Alcatraz.
Looking back on some of the old software I have to take my hat off to the clever programmers of the time who had to make do with little memory and slow computers. Of course the Amiga did have special graphics hardware for some things such as drawing and filling in polygons.
I remember Mark Silby of Blitz Basic fame making a simple 3d demo of flying around the three pyramids and thought it would be cool to be able to do that myself.
Sins the world in my code is made of areas(chunks) so i can load chunks from disk and unload unused chunks, if needed.
The core code is far from complete.
And you bring me memories of F29 Retaliator (DOS game)
https://www.youtube.com/watch?v=gXdfsFYX-XU
-
- Posts: 103
- Joined: Mar 08, 2016 19:10
- Location: The Netherlands
Re: 3D polygon world render
I had a look in memory use and i found the world reserved 4-8 times more then needed areas.paul doe wrote:Yes, but it shouldn't freeze the app. Also, why such a simple scene uses an inordinate amount of memory? Task Manager reports a usage of ~888 MB here (!)Gunslinger wrote:Thanks, Freezes happens when the video buffer is to small.
It wil do a redim preserve for more room as many times as needed.
That array is very big so it freezes a bit, over times it will stop doing that.Perhaps, but that also shouldn't happen. By decoupling the updating from the rendering, you can move at a consistent speed while still allowing the renderer to go as fast as your hardware can handle. See this article for details: https://www.koonsolo.com/news/dewitters-gameloop/Gunslinger wrote:And i know about frame rate, just like to see how high it gets.
When i move up way form the world the fps go to 300+ and i rocket of in space :)
And i am sure more things are big. Got it down to 200mb on 32-bit.
I will look in the frame rate game speed issue, thanks for the link.
The plan is to have everything timer based speeds.
@badidea
Three months to turn it into a game, i'm not sure if that is possible.
Maybe something for fun.
And mouse-pads are always annoying, but works fine here.