Author Topic: Question: Freebasic & 3D objects  (Read 6700 times)

0 Members and 1 Guest are viewing this topic.

Offline bikerboy

  • Amiga 1200
  • ****
  • Posts: 349
  • Karma: 12
    • View Profile
Question: Freebasic & 3D objects
« on: December 08, 2008 »
hey guys i have a question, can i use 3D objects with Freebasic?

and if i can, what file extensions of 3D objects can be used?


Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: Question: Freebasic & 3D objects
« Reply #1 on: December 08, 2008 »
There's nothing built in to freebasic for 3d objects, unfortunately.

You'd have to write a loader for any format you wanted (there are plenty of examples in various languages and various formats in this forum :)), and then write a renderer to render them, either using software rendering, DirectX or OpenGL graphics libraries, again, we have quite a few samples for doing this.

Alternatively, there are probably some libraries that you can try for doing it that will do everything for you.  I hope some people will come along and tell us what they are :)

Jim
Challenge Trophies Won:

Offline bikerboy

  • Amiga 1200
  • ****
  • Posts: 349
  • Karma: 12
    • View Profile
Re: Question: Freebasic & 3D objects
« Reply #2 on: December 08, 2008 »
thanx for the answer jim :D

for the moment my coding skill are very limited, but in the future when i will learn more and more about coding in freebasic i will look into it again :D


Offline Hezad

  • Sponsor
  • Pentium
  • *******
  • Posts: 613
  • Karma: 44
  • I believe .. in Patrick.
    • View Profile
    • Hezad.com Web hosting
Re: Question: Freebasic & 3D objects
« Reply #3 on: December 08, 2008 »
I do think it'd be cool for you to get some more skills before entering the awesome but (a bit more) difficult world of 3D :) No offense I hope ! Of Course, if you REALLY wanna test it, you can play with the different tutorials showing you how to code a spinning 3D Cube (I don't have any link right now, but you can find it pretty easily).

Anyway, if you wanna work with 3D, as Jim said, you have several solutions.

1) Software : Passionating, awesome, cool, ego-rewarding, but totally useless if used for a defined project (Still useful for educational purposes, that's why I made my 3D engine, you can find it in this board :D. If you look at the source, you'll notice there are A LOT of data and structures. Building a 3D software engine takes time ! Fortunately, people here are really helpful :)

2) Hardware : Open GL or Direct X. Open GL is cross platform, DirectX is not. Open GL is relatively easy to learn. AFAIK, Direct X is not :P You can find really cool tutorial for Open GL on Nehe website : http://nehe.gamedev.net/ Most examples of the tutorials are in your freebasic examples/Libraries/GL/Nehe folder.


One solution or the other will brought the same problem : You have to code your own Object Loader (or find someone who already coded one in freebasic ^^ I already saw this several times, but don't remember where. Take a look at the search function of here and of the Freebasic official forums.

Happy coding :D


Quote
but in the future when i will learn more and more about coding in freebasic i will look into it again Cheesy
And I'm sure it'll be very instructing and passionating :)

Offline bikerboy

  • Amiga 1200
  • ****
  • Posts: 349
  • Karma: 12
    • View Profile
Re: Question: Freebasic & 3D objects
« Reply #4 on: December 08, 2008 »
I do think it'd be cool for you to get some more skills before entering the awesome but (a bit more) difficult world of 3D :) No offense I hope !

nope none taken mate :D i know i have a long way to go in coding before i can play with 3D. (i'd be happy though if i could make a spinning cube :P).


Offline Hezad

  • Sponsor
  • Pentium
  • *******
  • Posts: 613
  • Karma: 44
  • I believe .. in Patrick.
    • View Profile
    • Hezad.com Web hosting
Re: Question: Freebasic & 3D objects
« Reply #5 on: December 08, 2008 »
Quote
http://www.petesqbsite.com/sections/tutorials/graphics.shtml#5

:)

Most tuts are relatively old and concern QB, but there are a lot of useful informations and tricks hidden in here ;D

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Question: Freebasic & 3D objects
« Reply #6 on: December 08, 2008 »
In the scheme of things, a spinning cube is not such a difficult thing to do, you are using tinyptc which is software rendering, to get to the level where you can do spinning cubes you need;

Undersatanding of basic trigonometry.
Understanding of rotation and transformation matrices.
Understanding of how to draw lines or filled polygons.
Maybe an understanding of other things like the cross product etc.

On your journey you'll surely have other problems thrown into the mix.. Like after you've figured out how to remove hidden surfaces and you try to draw your first object with overlapping faces...

It's a famous routine and understandable to want to know how to do it but you are on a journey and may well have quite a long time to go before you get there.

Here's a task..

You like sine scrolls.. You've successfully written the code to load a picture so how about modifying that code to load a font and using it to make a sine scroll?

I reckon that will keep you occupied for a while and will teach you some of the skills you'll use when you go on to write your filled cube (the sine bit!).

As always there's examples of sine scrolls all over this forum, if you fancy having a go at it shout if you get stuck :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Hotshot

  • DBF Aficionado
  • ******
  • Posts: 2114
  • Karma: 91
    • View Profile
Re: Question: Freebasic & 3D objects
« Reply #7 on: December 09, 2008 »
Hey bikerboy,

check this out

Irrlicht Wrapper For FREEBASIC :)

http://www.dbfinteractive.com/forum/index.php
/topic,3269.msg43673.html#msg43673



if is not there then I have search for Irrlicht Wrapper for you   ;)

http://www.freebasic.net/forum/viewtopic.php?t=3584

or You could learn OPENGL which look pretty easy to learn such putting 3D Cube on the screen like what Shockwave doing with his LED Challanage!  ;) :)

« Last Edit: December 09, 2008 by Hotshot »

Offline bikerboy

  • Amiga 1200
  • ****
  • Posts: 349
  • Karma: 12
    • View Profile
Re: Question: Freebasic & 3D objects
« Reply #8 on: December 09, 2008 »
thanx man i'll check it out ;D
« Last Edit: December 21, 2008 by va!n »


Offline Hotshot

  • DBF Aficionado
  • ******
  • Posts: 2114
  • Karma: 91
    • View Profile
Re: Question: Freebasic & 3D objects
« Reply #9 on: December 16, 2008 »
Hey Bikerboy,

Have you made anythings in 3D by using this Wrapper? ;)

Offline bikerboy

  • Amiga 1200
  • ****
  • Posts: 349
  • Karma: 12
    • View Profile
Re: Question: Freebasic & 3D objects
« Reply #10 on: December 16, 2008 »
Hey Bikerboy,

Have you made anythings in 3D by using this Wrapper? ;)

no unfortunately not, didn't have the time i wished to play around with it ::)

i will though, that's for sure ;) ;D
« Last Edit: December 21, 2008 by va!n »