3D Playground

Post your FreeBASIC source, examples, tips and tricks here. Please don’t post code without including an explanation.
paul doe
Moderator
Posts: 1730
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: 3D Playground

Post by paul doe »

Haubitze wrote:...but it dos not help to get a good result.
if anyone have an idea how to scale it down to get a good result i will be happy.
You need to use a logarithmic scale to handle that. Also, be aware that single-precision values are too crappy to represent such distances. Either use double-precision values or use longints.
Haubitze wrote:PPS.: an request to paul doe, for an object i think an z sorted drawing where an nice feature ;)
No, it won't. This was only a quick example for someone that requested it. It is neither a '3D engine' nor will I be adding 'features' to it. My advice would be to:
  • Use the math routines and add support for quaternions (so you have an easy way to do slerps)
  • Write the engine using OpenGL or Vulkan (the math routines were ported directly from another framework that uses OpenGL but written in C++)
This little snippet isn't going to be updated nor enhanced, so expect nothing from it. Sorry.
Haubitze
Posts: 44
Joined: May 20, 2016 8:42

Re: 3D Playground

Post by Haubitze »

hehe okay so i have to imlement it by my self ;)

logarithmic scale sounds good so i will take a look thanks.
i dont like OGL programming but anytime i will take a look to it.

salute
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia
Contact:

Re: 3D Playground

Post by Lachie Dazdarian »

Rather cool stuff.
paul doe
Moderator
Posts: 1730
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: 3D Playground

Post by paul doe »

Lachie Dazdarian wrote:Rather cool stuff.
Thanks. I'm currently refactoring this crap to be a real 3D engine. OpenGL 4.0+ for now, Vulkan later (if I can spare the time to implement a Vulkan backend, that is).

The general idea is to have a mostly barebones but easily integrable 3D engine in FreeBasic, that you can use either as a base for your own 3D engine, or rapid prototyping and debugging of 3D stuff. But, since I'm going to use some rather advanced OOP concepts and designs, probably I'll be the only one that'll be using it. That's why I've been trying to explain some basic OOP concepts around the forum (see the thread on S.O.L.I.D. that dafhi opened), with little luck so far =D
Last edited by paul doe on Oct 08, 2018 4:50, edited 1 time in total.
dafhi
Posts: 1641
Joined: Jun 04, 2005 9:51

Re: 3D Playground

Post by dafhi »

I'll adopt S.O.L.I.D. and anything else you can throw at me once my brain decides to flip on. I love these amazing concepts you present
paul doe
Moderator
Posts: 1730
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: 3D Playground

Post by paul doe »

dafhi wrote:I'll adopt S.O.L.I.D. and anything else you can throw at me once my brain decides to flip on. I love these amazing concepts you present
Yes, but you're the only one as far as I can tell XD
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia
Contact:

Re: 3D Playground

Post by Lachie Dazdarian »

paul doe wrote:
Lachie Dazdarian wrote:Rather cool stuff.
Thanks. I'm currently refactoring this crap to be a real 3D engine. OpenGL 4.0+ for now, Vulkan later (if I can spare the time to implement a Vulkan backend, that is).D
paul doe wrote:No, it won't. This was only a quick example for someone that requested it. It is neither a '3D engine' nor will I be adding 'features' to it.
Image :P
paul doe
Moderator
Posts: 1730
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: 3D Playground

Post by paul doe »

Hahaha no, I'm not -refactoring is the key word here. Which means that the new code will not be anything like this. This is just a snippet, that was hastily coded from scratch for illustration purposes =D
Haubitze
Posts: 44
Joined: May 20, 2016 8:42

Re: 3D Playground

Post by Haubitze »

oh nice, so i dont have to switch to OGL? if your refactored Engine is similar in handling and programming i can switch to this.
so i cant wait for the refactored thing. ;)
paul doe
Moderator
Posts: 1730
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: 3D Playground

Post by paul doe »

Haubitze wrote:oh nice, so i dont have to switch to OGL?
Not only you'll have to switch to OpenGL 4.0+, you'll need to be proficient with it, and with GLSL, to use it.
Haubitze wrote:if your refactored Engine is similar in handling and programming i can switch to this.
so i cant wait for the refactored thing. ;)
Definitely not. Event-based with another, completely different processing model =D
Last edited by paul doe on Oct 09, 2018 13:11, edited 1 time in total.
Haubitze
Posts: 44
Joined: May 20, 2016 8:42

Re: 3D Playground

Post by Haubitze »

hehe so then surprise me ;D
paul doe
Moderator
Posts: 1730
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: 3D Playground

Post by paul doe »

Haubitze wrote:hehe so then surprise me ;D
I will ;)
Post Reply