Author Topic: 3d motiom texture demo  (Read 8046 times)

0 Members and 1 Guest are viewing this topic.

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
3d motiom texture demo
« on: August 02, 2006 »
 heres another little demo ive been bashing away at.

i had reall fun coding this one as theres a few bit and bobs in there ive not done before.

http://www.fastshare.org/download/3d_motion_texture.rar

have fun and as always if theres any of my code in there reusable feel free to rip it out ;)
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: 3d motiom texture demo
« Reply #1 on: August 03, 2006 »
Dude, very impressive indeed.

Cheers and nice one mate,
Clyde.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: 3d motiom texture demo
« Reply #2 on: August 03, 2006 »
cheers mate!
Challenge Trophies Won:

Offline Dad1916

  • Atari ST
  • ***
  • Posts: 112
  • Karma: 3
    • View Profile
Re: 3d motiom texture demo
« Reply #3 on: August 03, 2006 »
Off to a good start, well done. O0 O0

thrawn89

  • Guest
Re: 3d motiom texture demo
« Reply #4 on: August 03, 2006 »
The exe crashes on mine...

Further when I try to recompile it, I get like errors and warnings.

Quote from: Mr. Command Line
ninos_fonts.bi(15) : warning level 0: Function result was not explicitly set
ninos_fonts.bi(32) : warning level 0: Function result was not explicitly set
ninos_fonts.bi(44) : warning level 0: Implicit variable allocation, last_drw
ninos_fonts.bi(67) : warning level 0: Function result was not explicitly set
perspective_correct_filltri.bi(44) : warning level 0: Function result was not explicitly set
perspective_correct_filltri.bi(50) : warning level 0: Function result was not explicitly set
perspective_correct_filltri.bi(56) : warning level 0: Function result was not explicitly set
perspective_correct_filltri.bi(63) : warning level 0: Function result was not explicitly set
perspective_correct_filltri.bi(70) : warning level 0: Function result was not explicitly set
perspective_correct_filltri.bi(77) : warning level 0: Function result was not explicitly set
perspective_correct_filltri.bi(201) : warning level 0: Function result was not explicitly set
perspective_correct_filltri.bi(257) : warning level 0: Function result was not explicitly set
3d_demo.bas(196) : warning level 0: Function result was not explicitly set
3d_demo.bas(206) : warning level 0: Function result was not explicitly set
3d_demo.bas(219) : warning level 0: Function result was not explicitly set
3d_demo.bas(238) : warning level 0: Function result was not explicitly set
3d_demo.bas(261) : warning level 0: Function result was not explicitly set
3d_demo.bas(285) : warning level 0: Function result was not explicitly set
3d_demo.bas(309) : warning level 0: Function result was not explicitly set
3d_demo.bas(345) : warning level 0: Function result was not explicitly set
3d_demo.bas(361) : warning level 0: Function result was not explicitly set
3d_demo.bas(411) : warning level 0: Function result was not explicitly set
3d_demo.bas(437) : error 3: Expected End-of-Line, found: 'file'

   file = freefile
        ^
3d_demo.bas(439) : error 9: Expected expression, found: 'file'

   open p_filename for binary as #file
                   ^
3d_demo.bas(444) : error 3: Expected End-of-Line, found: 'file'

   close #file
          ^
3d_demo.bas(448) : error 9: Expected expression, found: 'file'

   get #file, , chunk_id
        ^
3d_demo.bas(449) : error 9: Expected expression, found: 'file'

   get #file, , chunk_len
        ^
3d_demo.bas(456) : error 9: Expected expression, found: 'file'

      get #file, ,char
              ^
3d_demo.bas(462) : error 9: Expected expression, found: 'file'
         get #file, ,qty
              ^
3d_demo.bas(465) : error 9: Expected expression, found: 'file'
      get #file, ,vertex_x
           ^
3d_demo.bas(466) : error 9: Expected expression, found: 'file'

      get #file, ,vertex_y
           ^
3d_demo.bas(467) : error 9: Expected expression, found: 'file'

      get #file, ,vertex_z
           ^
3d_demo.bas(267) : error 120: Too many errors, exiting


EDIT:
PS, I recopied this from the command line by hand, so a few of the line numbers may be a little off, I try to double check, but Im dixlexic with numbers...

Sorry...
Thrawn

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: 3d motiom texture demo
« Reply #5 on: August 03, 2006 »
Hehe, cool one Nino! Complete with a proper 1980's track by 2 unlimited. I was a bar man when that song came out, I hated it then but hearing it now brings back some happy memories so thank you for that!
Shockwave ^ Codigos
Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: 3d motiom texture demo
« Reply #6 on: August 04, 2006 »
hehe cheers guys,

as too your problems thrawn im stumpd ??? sorry that you had to go to the trouble of recopying all the lines  by hand mate.
what version off freebasic do you have?
« Last Edit: August 04, 2006 by ninogenio »
Challenge Trophies Won:

Offline relsoft

  • DBF Aficionado
  • ******
  • Posts: 3303
  • Karma: 47
    • View Profile
Re: 3d motiom texture demo
« Reply #7 on: August 04, 2006 »
Nice.  I don't see any perspective on the cube's vertices though. Is that intentional?
Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: 3d motiom texture demo
« Reply #8 on: August 04, 2006 »
yeah i guess i should have maby added lighting or something to show a bit more perspective but its really just a bit of fun atm im actually not into pixel wize demos that much id like to be using gl for most of this stuff but im trying to learn a bit more about these effects just now.
Challenge Trophies Won:

thrawn89

  • Guest
Re: 3d motiom texture demo
« Reply #9 on: August 04, 2006 »
0.16b, yeah I am confused as well  ???

Thrawn

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: 3d motiom texture demo
« Reply #10 on: August 04, 2006 »
Nino, what Rel meant I think is that there is no perspective transformation on the cube :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline relsoft

  • DBF Aficionado
  • ******
  • Posts: 3303
  • Karma: 47
    • View Profile
Re: 3d motiom texture demo
« Reply #11 on: August 05, 2006 »
Yep@Shock. that's what I meant. :*)
Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: 3d motiom texture demo
« Reply #12 on: August 06, 2006 »
im sorry im confused do you mean theres no perspective mapping on the triangle interpolations as that got cut out for speed?
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: 3d motiom texture demo
« Reply #13 on: August 06, 2006 »
Nope.

To explain what we mean, if you take a cd case or something like that and put it close to your eyes and look down it you'll notice that the far end of the cd case looks smaller. Things that are far away appear smaller to the human eye and the far points of 3D objects are usually transformed to give a similar effect. The cube doesn't appear to have this perspective distortion on it and looks a little strange. It doesn't look bad but it would look better if you added the perspective distortion to it.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: 3d motiom texture demo
« Reply #14 on: August 07, 2006 »
ahh right sorry guys im a bit fickle,

there is perspective calcs done on the vertices if you look in the turn object function but i hacked them a bit to work better with a normal texture.the problem comes in that the edges of the textures are black and ive got the back of the cube on fire so it does make the cube look extra flat ahh well i guess its something too remember in future cheers for the feedback though!
Challenge Trophies Won:

Offline DrewPee

  • I Toast Therefore I am
  • Pentium
  • *****
  • Posts: 563
  • Karma: 25
  • Eat Cheese - It's good for you!
    • View Profile
    • Retro Computer Museum
Re: 3d motiom texture demo
« Reply #15 on: August 11, 2006 »
Not sure if it's just me but . . . i can't even download this file - when i click on the link it does go to a website but when i click on the download button it just goes to a blank(ish) screen!

 ???

DrewPee
DrewPee
aka Falcon of The Lost Boyz (Amiga)
Ex-Amiga Coder and Graphic Designer
Administrator of > www.retrocomputermuseum.co.uk

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: 3d motiom texture demo
« Reply #16 on: August 11, 2006 »
It's just because of the free hosting site Nino has put it on. The download is fast if you can work out where the download link is. It was obscured for me once by an advert, a ctrl+f5 refresh forced the link to appear. Dunno if that helps.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: 3d motiom texture demo
« Reply #17 on: October 19, 2006 »
I love it loads just had another looksie.

A tip I can give you ( unless you allready know ) Nino dude is that if you have a function that isnt returning anything; use a sub instead mate and omit the return its not needed.

If you are using a function and wish to return a value, make sure that in both the declaration and routine of the function have what the value you are sending back. As you'll discover as I have, that in latest versions of FB you'll get errors.

For example:

Code: [Select]
Declare Function Value16( ByVal Number As Integer ) As Integer


Function Value16( ByVal Number As Integer ) As Integer

  Â  Dim M16
  Â  Â  Â  
  Â  M16=Number*16

  Â  Return M16

End Function
  Â

Btw I have seen a few people use m16=Function instead of the return m16.

Hope this is of some use dude,
Cheers - Clyde.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline DrewPee

  • I Toast Therefore I am
  • Pentium
  • *****
  • Posts: 563
  • Karma: 25
  • Eat Cheese - It's good for you!
    • View Profile
    • Retro Computer Museum
Re: 3d motiom texture demo
« Reply #18 on: October 20, 2006 »
Nice one Nino - love the flame effect - and your scroller code is cool - mmm gives me an idea for another scroller!!!

Drew
DrewPee
aka Falcon of The Lost Boyz (Amiga)
Ex-Amiga Coder and Graphic Designer
Administrator of > www.retrocomputermuseum.co.uk

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: 3d motiom texture demo
« Reply #19 on: October 20, 2006 »
 :cheers: mateis

@clyde yeah ive been doing lots of little test on fb lately and im learning much more about the quirks of it. i wrote this demo without knowing to much about fb but since then ive picked up loads.

@drew cool cant wait to see what you do!
Challenge Trophies Won: