Pages: [1] 2 3
Author Topic: animated collada working in OF  (Read 5722 times)
theo
Administrator
Amsterdam

Posts: 1090

Gravatar


WWW
animated collada working in OF
« on: January 11, 2010, 06:20:38 PM »



Direct link here:
http://www.openframeworks.cc/files/of_c ... -small.mov

[attachment=0:d8m5twsb]collada.png[/attachment:d8m5twsb]

For OF 0061 Mac: ( EDIT - fixed project )
http://www.openframeworks.cc/files/coll ... bFixed.zip

'Ported' from the official Collada Dom package here:
http://sourceforge.net/projects/collada-dom/files/

Looks like it could be hooked up for windows and linux as the download ( Collada-dom-2.2.zip ) has window and linux projects for building the dependencies.

Some notes:

/* Some notes */
// -Almost everything is ripped from the viewer example project - so nice that they bundle an xcode project!
// -To see their full demo app - look at colladaDome/mainPC.cpp
// -I needed to download the Cg framework from Nvidia ( its now bundled - so you shouldn't need to grab it )
// -libminizip was built for ppc so I just included the src in the project.
// -I was getting bad crashes from CrtPrint which was being called internally - there was a note that CrtPrint would crash if passed arguments flags %s %i etc
// so I commented out the inside of CrtPrint and it ran fine.
// -To load a file drag it and all its resources to the sidebar of your project and then drag
// those files (once in the sidebar) down to the last Copy Files build phase inside of Targets->YourAppName->Copy File

/* To do */
// -Get files loading out of the data folder - tricky because .dae files reference other files.
// -Universal libs for everything ( uggg )
// -Make awesome projects!!


* collada.png (91.42 KB, 500x330 - viewed 4004 times.)
Logged

as

Posts: 23

Gravatar


WWW
Re: animated collada working in OF
« Reply #1 on: January 11, 2010, 10:41:22 PM »

pretty fucking cool!

any idea why the activity of the cpu is so intensive when running the models? i get 49% on astroboy, 29% on the airplane, domino breaking is at 98% and face pyramics going to 88% on a 2ghz macbook...

a walkthrough on how to het abounding box for the bots would be so so cool.
here's for a seconded to do list!!

cheers!!!
a
Logged

-
--           -                           -
-                                        
// http://s373.net // planalto de agenciamento maquínico // andré sier
theo
Administrator
Amsterdam

Posts: 1090

Gravatar


WWW
Re: animated collada working in OF
« Reply #2 on: January 11, 2010, 10:49:33 PM »

Ahh thats because vertical sync is not set to be on.
try adding - ofSetVerticalSync(true); to testApp::setup()

should bring it down some!

there is a lot still to figure out - but for simple model loading its pretty great!
Logged

haptic
Minneapolis, MN

Posts: 9

Gravatar


Re: animated collada working in OF
« Reply #3 on: January 12, 2010, 11:59:56 PM »

I can't get this to compile. When I first downloaded your files, the colladaDom/libminizip.a file had an absolute reference to the file on your computers location. I downloaded the collada files off of Sourceforge and relatively pointed the projects reference to collada-dom/dom/external-libs/minizip/mac/libminizip.a


Once I tried to compile, I got 2 errors. It appears to me the important part is "library not found for -lminizip"

Any ideas how I can resolve this issue?

thanks for this demo and all of your hard work on OF!
-Kyle


* colladaViewerInOF - Build Results.jpg (60.25 KB, 489x324 - viewed 3794 times.)
Logged
theo
Administrator
Amsterdam

Posts: 1090

Gravatar


WWW
Re: animated collada working in OF
« Reply #4 on: January 13, 2010, 01:05:44 AM »

Oh sorry about that. You shouldn't need the library as the example includes the source for it. Just remove the .a from the project and it should run.

Theo
Logged

haptic
Minneapolis, MN

Posts: 9

Gravatar


Re: animated collada working in OF
« Reply #5 on: January 13, 2010, 06:41:22 AM »

Thanks! Once I removed that library and added Cg.framework to my Mac's Library/Frameworks folder the application launched. This is a very exciting demo!
Logged
theo
Administrator
Amsterdam

Posts: 1090

Gravatar


WWW
Re: animated collada working in OF
« Reply #6 on: January 13, 2010, 06:35:54 PM »

Whoops - thanks for the tips.
I'll re-up the example.
Logged

SH101
Sweden

Posts: 16

Gravatar


WWW
Re: animated collada working in OF
« Reply #7 on: January 13, 2010, 08:59:13 PM »

@Theo: Very nice and cool!

@haptic - thanks for the moving to frameworks-folder-tip that helped me get it working!
Logged
theo
Administrator
Amsterdam

Posts: 1090

Gravatar


WWW
Re: animated collada working in OF
« Reply #8 on: January 15, 2010, 01:51:00 PM »

Hey updated the project - libminizip is removed and CG.framework is copied inside of the app and has the correct path so it doesn't need to be installed in your OS root.

http://www.openframeworks.cc/files/coll ... bFixed.zip
Logged

simongeilfus
Brussels, Belgium

Posts: 89

Gravatar


Re: animated collada working in OF
« Reply #9 on: January 20, 2010, 01:37:35 PM »

Wow!
This is great! Thanks a lot Theo!!!

Now that you've got some experience with the collada library, do you have any idea how difficult it would be to do the exact same thing in the opposite direction; I mean exporting a animation from OF to Collada...

Rendering a sequence of 10 thousand Obj files is not really funny, so this could be a great solution! Creating the animations inside OF and then editing them in a real 3D software, tweeking lights, materials and cameras!

Wow! Can't wait to hear what you say about that! :)
Logged

neilmendoza
London

Posts: 34

Gravatar


WWW
Re: animated collada working in OF
« Reply #10 on: January 25, 2010, 01:16:22 AM »

Cool!!  Thanks very much  :)

Logged

JGL
London

Posts: 185

Gravatar


WWW
Re: animated collada working in OF
« Reply #11 on: January 26, 2010, 02:30:34 AM »

Just a quick note for Snow Leopard users out there.

To get this working in 10.6 you'll need to download:

http://www.openframeworks.cc/versions/preRelease_v0.061/of_preRelease_v0061_osx_FAT.zip

And get the compiler in the project settings to be GCC 4.0, as well as the active SDK to 10.5.

Great work Theo!
Logged

___________________________________
http://joelgethinlewis.com
-------------------------------------------------
***********************************
&&&&&&&&&&&&&&&&&&&&&&&&&
mikeys

Posts: 6

Gravatar


Re: animated collada working in OF
« Reply #12 on: January 27, 2010, 08:44:56 PM »

this is literally one of the most exciting things i've seen in a long time!

amazing - i'm working on a visuals project at the moment and i'm working with an animator who was just today asking me if i can import/use 3-d models. perfect! :)

as a more general question about animated models, can the playback of animation be controlled? started/stopped/sped up/slowed down/jump to keyframe, etc?
Logged
neilmendoza
London

Posts: 34

Gravatar


WWW
Re: animated collada working in OF
« Reply #13 on: January 29, 2010, 05:28:07 PM »

Quote from: "mikeys"
as a more general question about animated models, can the playback of animation be controlled? started/stopped/sped up/slowed down/jump to keyframe, etc?

i'll probably be writing some code to wrap some of that functionality some time soon.  will post it up when i get around to it...
Logged

mikeys

Posts: 6

Gravatar


Re: animated collada working in OF
« Reply #14 on: January 31, 2010, 11:58:16 PM »

Quote from: "Apex"
i'll probably be writing some code to wrap some of that functionality some time soon.  will post it up when i get around to it...

brilliant! i'd be very interested in seeing that if you get around to doing it.

don't want to hijack the thread whatsoever, but (apologies in advance)....

theo, you mentioned you'd managed to export collada from cinema 4d - did you need to use a plugin or anything to achieve this? my animator friend (who lives a long way away from me) is having trouble exporting collada files...just wondering if it involves anything non-standard.

interruption over!
Logged
Pages: [1] 2 3
 
Jump to:  

Powered by SMF 1.1.15 | SMF © 2011, Simple Machines

viagra priser