Author Topic: .x 3d animation loader  (Read 2683 times)

0 Members and 1 Guest are viewing this topic.

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1667
  • Karma: 133
    • View Profile
.x 3d animation loader
« on: August 07, 2013 »
hey guys,

i finally managed too get a .x loader ogl compatible and integrated in my engine.. what ive done is import one of my static .obj models( combo from jet set radio future). into blender then i added a full skeletal system too him, after this i had too manually weight paint each bone so when moving an armature the model mesh moves with it.

then its as simple as moving him into different positions too get animation sequences and exporting the whole lot too .x....

my loader loads both animated and static .x models it will also load animation sequences so one animation set might be run another walk etc and you can pick and choose which set you would like at a specific moment..

here is a little example too show proof of concept you will see 2 combo characters(guy with a beatbox on his shoulder) 1 is .obj static and the other is .x animated.
as soon as i clean all the code up and make it a bit less case sensitive ill post the basic loader code on its own for others too use.

cheers.

use arrow keys and mouse too move/walk... and excuse the rough animations ive never done a single bone related thing till a week ago so im still getting a feel for nice smooth animations...
« Last Edit: August 07, 2013 by ninogenio »
Challenge Trophies Won:

Offline Hotshot

  • DBF Aficionado
  • ******
  • Posts: 2114
  • Karma: 91
    • View Profile
Re: .x 3d animation loader
« Reply #1 on: August 07, 2013 »
Looking really good and like the lighting effect and moving shadows :)

It seem like you been using Bump mapping and some other effects too

Well Done

 :clap:

Offline Canopy

  • Atari ST
  • ***
  • Posts: 208
  • Karma: 20
    • View Profile
Re: .x 3d animation loader
« Reply #2 on: August 08, 2013 »
not sure if this is working correctly on my laptop, i see a guy with blades flying past on in white background/world and a black dot zipping around

?


Offline ninogenio

  • Pentium
  • *****
  • Posts: 1667
  • Karma: 133
    • View Profile
Re: .x 3d animation loader
« Reply #3 on: August 08, 2013 »
oh that doesnt sound right,

can you tell me what gfx card yoir running?.. it sounds like for some reason my matrix stuff is going weird on your machine. and as a result everything is being drawn out of view.

cheers mate

edit- does anyone experience similar issues i have tried the exe on a few different systems but cant seem too replicate the issue.
« Last Edit: August 08, 2013 by ninogenio »
Challenge Trophies Won:

Offline Canopy

  • Atari ST
  • ***
  • Posts: 208
  • Karma: 20
    • View Profile
Re: .x 3d animation loader
« Reply #4 on: August 12, 2013 »
thats on a sony vaio, ati mobliity radeon HD 5470


Offline ninogenio

  • Pentium
  • *****
  • Posts: 1667
  • Karma: 133
    • View Profile
Re: .x 3d animation loader
« Reply #5 on: August 12, 2013 »
ahh i bet its something im doing in the shaders that doesn't agree with ati.. ill borrow a shot of my dads pc tomorrow and see whats going on cheers mate k+,


well in the mean time as promised here is the code to make .x loading possible. i ripped it out of my main apophis framework and attached it too a little glut example. in this form it doesnt use any shaders so should work everywhere.. actually if you could test this and confirm it works canopy that would be a huge node too shader issues.

in this example ive recreated the complete garage scene from jsr future one of my all time favorite games i think it looks pretty swift... been coding and 3dmodeling since 11 this morning lol

as always code is for using so anyone that wants do as you wish with it cheers.....

<edit fixed exe to not need the msv100.dll--too rebuild sources the glm folder will have too be added back in>
« Last Edit: August 13, 2013 by ninogenio »
Challenge Trophies Won:

Offline Canopy

  • Atari ST
  • ***
  • Posts: 208
  • Karma: 20
    • View Profile
Re: .x 3d animation loader
« Reply #6 on: August 13, 2013 »
:)

think i'm not progressing as quickly though, another well timed (winter!) challenge might help though!


btw can't run the app as it needs the debug run-time. (i'm using vs2008) can you up a release build or one thats statically linked?

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1667
  • Karma: 133
    • View Profile
Re: .x 3d animation loader
« Reply #7 on: August 13, 2013 »
doh... i had stupidly built the freeglut.dll too need the runtime dlls lol. thats it fixed. cheers mate
Challenge Trophies Won:

Offline Canopy

  • Atari ST
  • ***
  • Posts: 208
  • Karma: 20
    • View Profile
Re: .x 3d animation loader
« Reply #8 on: August 13, 2013 »
appears to work fairly well until i move the mouse, then seems hypersensitive :)

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1667
  • Karma: 133
    • View Profile
Re: .x 3d animation loader
« Reply #9 on: August 13, 2013 »
ahh yes i should have said. it was ripped quite crudely from my main framework late last night and in the process lost cam delta timing. its best viewed if possible with vsync enabled. i really need too get a few different systems too test on.. cheers again!
Challenge Trophies Won:

Offline Canopy

  • Atari ST
  • ***
  • Posts: 208
  • Karma: 20
    • View Profile
Re: .x 3d animation loader
« Reply #10 on: August 13, 2013 »
hth :)

luckily i've got this laptop, and in my den i've got a newish radeon on my dev machine, and an older nvidia mobile (gl 2.1) in my debugging laptop.

i discovered yesterday that an "ouya" will allow easy remote debugging using visual studio.. they don't seem to be taking off greatly ATM so might snag one cheap if the opportunity arises

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1667
  • Karma: 133
    • View Profile
Re: .x 3d animation loader
« Reply #11 on: August 13, 2013 »
it helps massively mate!

on a platform as widely varied as the pc.. feedback from different users is invaluable. sounds like a sweet setup you have there  :). just doing a bit of reading about the "ouya" the fact that remote debugging can be set up easily might actually sway me into buying one. i think it would be a good device too tune my framework towards cross platform compatibility.
Challenge Trophies Won:

Offline Canopy

  • Atari ST
  • ***
  • Posts: 208
  • Karma: 20
    • View Profile
Re: .x 3d animation loader
« Reply #12 on: August 13, 2013 »
On the cheap just use virtualbox and debian which will use hardware opengl support :)  might be something androidy here http://androvm.org/blog/

only ended up like this because my other laptop died with the nvidia video problem, i bought the viao then a year later found a guy that can fix the problem with the nvidia and he resurrected it :)

btw some pics of my set up here i just upped because someone was asking about noise on pouet :) (i built the room last last year)
http://www.flickr.com/photos/canopyseer/sets/72157635041950720/

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1667
  • Karma: 133
    • View Profile
Re: .x 3d animation loader
« Reply #13 on: August 14, 2013 »
sweet setup  :)

the guitars would be where most of my time was spent  ;).. im going too look at some new ati desktops today i have this inspiron with the gtx650 and core i7 but i really need an ati rig too.
Challenge Trophies Won: