FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

animation using tutorial 15

3 posters

Go down

animation using tutorial 15 Empty animation using tutorial 15

Post  sctm81 Tue Apr 28, 2009 1:24 am

I have studied video tutorial 15 and was trying to recreate a simple animation and export it.

- created a cube in blender
- created the animation and rendered it
- created a vertex group
- selected all
- ran the newest sio2_exporter.py script to export
- renamed and reconfigured the instances in the template.mm file of tutorial 15 to match the new animation.

Result: I get a blank screen when running the iPhone simulator. What am I missing?

sctm81

Posts : 29
Join date : 2009-04-24

Back to top Go down

animation using tutorial 15 Empty Re: animation using tutorial 15

Post  sio2interactive Tue Apr 28, 2009 1:58 am

What kind of animation you create in blender? A animation driven by IPOs or a Bone Animation with an armature?
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

animation using tutorial 15 Empty Re: animation using tutorial 15

Post  sctm81 Tue Apr 28, 2009 2:42 am

I used IPOs.

sctm81

Posts : 29
Join date : 2009-04-24

Back to top Go down

animation using tutorial 15 Empty Re: animation using tutorial 15

Post  sio2interactive Tue Apr 28, 2009 2:49 am

sio2IpoPlay

sio2ResourceRender( ..., ..., SIO2_RENDER_IPO );
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

animation using tutorial 15 Empty Re: animation using tutorial 15

Post  sctm81 Thu Apr 30, 2009 9:45 pm

Do I have to create an .md2 file if I want to export an IPO animation to the iphone or is there another way to export?

sctm81

Posts : 29
Join date : 2009-04-24

Back to top Go down

animation using tutorial 15 Empty Re: animation using tutorial 15

Post  yarri Thu Apr 30, 2009 11:29 pm

Does your cube display without the IPO curves? If not, start there. Tutorial 14 is probably a better starting point for you, look at the camera IPO data. You can add IPO curves to any SIO2 object. I found it helpful to look into the .sio2 file raw data, check the ipo directory and files in there for the objects.

--yarri

yarri

Posts : 81
Join date : 2009-04-10

Back to top Go down

animation using tutorial 15 Empty Re: animation using tutorial 15

Post  sctm81 Fri May 01, 2009 1:20 am

yea, i can display a stationary cube. i pretty much do the following

sio2ResourceOpen( sio2->_SIO2resource, "cubemove.sio2", 1 );

sio2->_SIO2ipo = sio2IpoInit( "myIPO");

SIO2ipo *_SIO2ipo = sio2ResourceGetIpo( sio2->_SIO2resource, "object/Cube");

sio2->_SIO2ipo = _SIO2ipo;

sio2IpoPlay(_SIO2ipo);

sio2ResourceRender( sio2->_SIO2resource, sio2->_SIO2window, sio2->_SIO2camera, SIO2_RENDER_IPO );


it gets stuck in the function
void sio2IpoPlay( SIO2ipo *_SIO2ipo )
{ _SIO2ipo->state = SIO2_IPO_PLAY; }


what am i missing here? and is there an equivalent for sio2ObjectBuildAction for IPOs?

thanks

sctm81

Posts : 29
Join date : 2009-04-24

Back to top Go down

animation using tutorial 15 Empty Re: animation using tutorial 15

Post  yarri Fri May 01, 2009 1:36 am

Yup... just bind all your IPO's in your loading function:
sio2ResourceBindAllIpos( sio2->_SIO2resource );

--yarri

yarri

Posts : 81
Join date : 2009-04-10

Back to top Go down

animation using tutorial 15 Empty Re: animation using tutorial 15

Post  sctm81 Fri May 01, 2009 2:08 am

Thanks for helping. I added that line inside the function templateLoading(void) right after the section

sio2ResourceOpen( sio2->_SIO2resource, "cubemove.sio2", 1 );
//sio2ResourceAdd( sio2->_SIO2resource,
while( i != sio2->_SIO2resource->gi.number_entry )
{
sio2ResourceExtract( sio2->_SIO2resource, NULL );
++i;
}
sio2ResourceClose( sio2->_SIO2resource );
sio2ResourceResetState();

but the program still crashes in the sio2PlayIPO. is that the wrong place or am i missing anything else?

sctm81

Posts : 29
Join date : 2009-04-24

Back to top Go down

animation using tutorial 15 Empty Re: animation using tutorial 15

Post  yarri Fri May 01, 2009 9:40 am

Is your .sio2 file valid? What are you passing to sio2IpoPlay()? Could you use pastie.org and post some more code?

--yarri

yarri

Posts : 81
Join date : 2009-04-10

Back to top Go down

animation using tutorial 15 Empty Re: animation using tutorial 15

Post  sctm81 Sun May 03, 2009 3:16 am

I checked, my .sio2 file seems vaild. i looked at the folder and could find the object, lighting, camera as well as ipo files.

according to my understanding i load the resource, link it and play.

SIO2ipo *_SIO2ipo = sio2ResourceGetIpo( sio2->_SIO2resource, "ipo/ObIpo");
sio2->_SIO2ipo = _SIO2ipo;
sio2IpoPlay(sio2->_SIO2ipo);

i changed the parameter in the first line from "object/cube" to "ipo/ObIpo" and now the program doesn't crash anymore but i only see a black screen. is there any other step in between that i'm missing?

sctm81

Posts : 29
Join date : 2009-04-24

Back to top Go down

animation using tutorial 15 Empty Re: animation using tutorial 15

Post  sio2interactive Sun May 03, 2009 8:43 am

Render The ipo by passing the render ipo mask to the sio2resourcerender function just like in tutorial14
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

animation using tutorial 15 Empty Re: animation using tutorial 15

Post  sctm81 Sun May 03, 2009 6:16 pm

thanks so much, i finally got my first ipo animation running on the simulator Smile

(mood: extremely happy)


PS: i was wondering though if there is an equivalent to

sio2ObjectBuildAction( _SIO2object, 45 , 115, "whatever" );

for IPOs, i.e. if i want to break down an animations into different sections.
i guess md2 is another possible approach for something like this.

sctm81

Posts : 29
Join date : 2009-04-24

Back to top Go down

animation using tutorial 15 Empty Re: animation using tutorial 15

Post  sio2interactive Sun May 03, 2009 6:46 pm

dude I think you are mixing up everything...

IPOs: Affect location, rotation, scale of an SIO2transform (including physic matrix)

MD2: Per Vertex frame animation (all frames are exported)

SIO2 Animation: Per Vertex Linear interpolation animation based on armature (only necessary frames are exported)
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

animation using tutorial 15 Empty Re: animation using tutorial 15

Post  sctm81 Mon May 04, 2009 2:25 am

oic... thanks for the info. sorry... i'm a bit new to game development.

i was wondering though if it is possible to break down the action in IPO animation by specifying the frames, just like in sio2ObjectBuildAction. at the moment i have one animation from blender and can only run the whole thing. (like i can't access sections of the animation)

sctm81

Posts : 29
Join date : 2009-04-24

Back to top Go down

animation using tutorial 15 Empty Re: animation using tutorial 15

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum