animation using tutorial 15
3 posters
animation using tutorial 15
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?
- 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
Re: animation using tutorial 15
What kind of animation you create in blender? A animation driven by IPOs or a Bone Animation with an armature?
Re: animation using tutorial 15
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
Re: animation using tutorial 15
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
yarri- Posts : 81
Join date : 2009-04-10
Re: animation using tutorial 15
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
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
Re: animation using tutorial 15
Yup... just bind all your IPO's in your loading function:
sio2ResourceBindAllIpos( sio2->_SIO2resource );
--yarri
sio2ResourceBindAllIpos( sio2->_SIO2resource );
--yarri
yarri- Posts : 81
Join date : 2009-04-10
Re: animation using tutorial 15
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?
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
Re: animation using tutorial 15
Is your .sio2 file valid? What are you passing to sio2IpoPlay()? Could you use pastie.org and post some more code?
--yarri
--yarri
yarri- Posts : 81
Join date : 2009-04-10
Re: animation using tutorial 15
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?
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
Re: animation using tutorial 15
Render The ipo by passing the render ipo mask to the sio2resourcerender function just like in tutorial14
Re: animation using tutorial 15
thanks so much, i finally got my first ipo animation running on the simulator
(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.
(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
Re: animation using tutorial 15
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)
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)
Re: animation using tutorial 15
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)
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
Similar topics
» Skeletal animation (Tutorial #15)
» Hybrid Skeletal animation ala tutorial 15 - bug?
» Keyframe Animation
» Collision system
» Hybrid Skeletal animation ala tutorial 15 - bug?
» Keyframe Animation
» Collision system
Permissions in this forum:
You cannot reply to topics in this forum