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.

Ipo is not work,why?

2 posters

Go down

Ipo is not work,why? Empty Ipo is not work,why?

Post  LuisLee Mon Aug 17, 2009 1:30 am

I use Ipo in my demo,Upgrade to 1.4 from 1.35.

In the 1.35 version, Ipo can work properly,
but the 1.4 version, Ipo can not work, but can not see the object.
The following is the code to initialize Ipo:

Loading()
Code:

      sio2ResourceCreateDictionary( sio2->_SIO2resource );
   
   sio2ResourceOpen( sio2->_SIO2resource,
                scenename, 1 );
   
   while( i != sio2->_SIO2resource->gi.number_entry )
   {
      sio2ResourceExtract( sio2->_SIO2resource, NULL );
      ++i;
   }
   
   sio2ResourceClose( sio2->_SIO2resource );
   
   sio2ResetState();
   
   sio2ResourceBindAllImages( sio2->_SIO2resource );
   
   sio2ResourceBindAllMaterials( sio2->_SIO2resource );
   
   sio2ResourceBindAllMatrix( sio2->_SIO2resource );
   
   sio2ResourceBindAllIpos( sio2->_SIO2resource ); //this initialize IPO
   
   sio2ResourceGenId( sio2->_SIO2resource );   

Render()

Code:

if( !sio2->_SIO2camera )
   {
      SIO2camera *_SIO2camera = ( SIO2camera * )sio2ResourceGet( sio2->_SIO2resource,
                                                  SIO2_CAMERA,
                                                  "camera/Camera" );
      if( !_SIO2camera )
      { return; }
      
      sio2->_SIO2camera = _SIO2camera;
      
      sio2IpoPlay( _SIO2camera->_SIO2ipo );
      
      sio2Perspective( _SIO2camera->fov,
                  sio2->_SIO2window->scl->x / sio2->_SIO2window->scl->y,
                  _SIO2camera->cstart,
                  _SIO2camera->cend );
   }
sio2ResourceRender( sio2->_SIO2resource,
                    sio2->_SIO2window,
                    sio2->_SIO2camera,
                    SIO2_RENDER_SOLID_OBJECT
                    |SIO2_RENDER_ALPHA_TESTED_OBJECT
                    |SIO2_RENDER_IPO );
I check SIO2 documents, there are IPO documents.
Run, suggesting that errors : In sio2IpoPlay( _SIO2camera->_SIO2ipo )function;the _SIO2camera->_SIO2ipo=NULL. Why? In 1.35 version,it work perfect. thank you!
Very Happy

LuisLee

Posts : 85
Join date : 2009-04-26
Age : 37

Back to top Go down

Ipo is not work,why? Empty Re: Ipo is not work,why?

Post  sio2interactive Mon Aug 17, 2009 1:43 am

Check tutorial14... there I demo how to work with IPO... (its on the camera)
sio2interactive
sio2interactive

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

http://sio2interactive.com

Back to top Go down

Ipo is not work,why? Empty Re: Ipo is not work,why?

Post  LuisLee Mon Aug 17, 2009 2:11 am

sio2interactive wrote:Check tutorial14... there I demo how to work with IPO... (its on the camera)

I am sure that Initialization and rendering IPO code is the same as with tutorial14 Very Happy ,but It was not work,May be set up problems. Very Happy

LuisLee

Posts : 85
Join date : 2009-04-26
Age : 37

Back to top Go down

Ipo is not work,why? Empty Re: Ipo is not work,why?

Post  LuisLee Mon Aug 17, 2009 8:45 pm

I will try to find some method of error. (v1.4)

1. Open 14 projects,SIO2 with my own to replace the original paper document SIO2. It is not work!

>> can you please be more clear... I don't understand what that means...

2. SIO2 into the original document of the Camera to my SIO2 file. It is not work!
(v1.3.5)

>> same here...

SIo2 with my file is successfully.

>> hummmmmmmm
Why? Whether or not to set up cameras in Blender?

LuisLee

Posts : 85
Join date : 2009-04-26
Age : 37

Back to top Go down

Ipo is not work,why? Empty Re: Ipo is not work,why?

Post  LuisLee Mon Aug 17, 2009 9:20 pm

sorry!I have very poor Englis.I use my own fileSIO2 to replace the fileSIO2 in tutorial14, but it doesn't work.
I import the fileCAMERA in tutorial14 to my own fileSIO2, but it sill doesn't work.
what shall i do?
tutorial14 to rewrite the following code:

Code:

void templateLoading( void )
{
   unsigned int i = 0;   
   sio2ResourceCreateDictionary( sio2->_SIO2resource );   
   sio2ResourceOpen( sio2->_SIO2resource,
                 "tutorial14.sio2", 1 );   
   while( i != sio2->_SIO2resource->gi.number_entry )
   {
      sio2ResourceExtract( sio2->_SIO2resource, NULL );
      ++i;
   }
   sio2ResourceClose( sio2->_SIO2resource );

   sio2ResetState();
   sio2ResourceBindAllImages( sio2->_SIO2resource );

   sio2ResourceBindAllMaterials( sio2->_SIO2resource );

   sio2ResourceBindAllMatrix( sio2->_SIO2resource );

   sio2ResourceBindAllIpos( sio2->_SIO2resource );

   sio2ResourceGenId( sio2->_SIO2resource );

   sio2->_SIO2window->_SIO2windowrender = templateRender;
   
   glActiveTexture( GL_TEXTURE1 );
   {
      glTexEnvf( GL_TEXTURE_ENV, GL_RGB_SCALE, 2.0f );
   }
   glActiveTexture( GL_TEXTURE0 );
   printf("VRAM: %d bytes.\n", sio2ResourceGetVRAMSize( sio2->_SIO2resource ) );
}


void templateRender( void )
{
   glMatrixMode( GL_MODELVIEW );
   glLoadIdentity();

   glClear( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT );


   if( !sio2->_SIO2camera )
   {
      SIO2camera *_SIO2camera = ( SIO2camera * )sio2ResourceGet( sio2->_SIO2resource,
                                                  SIO2_CAMERA,
                                                  "camera/Camera" );
      if( !_SIO2camera )
      { return; }
      sio2->_SIO2camera = _SIO2camera;
      sio2IpoPlay( _SIO2camera->_SIO2ipo );      
      sio2Perspective( _SIO2camera->fov,
                   sio2->_SIO2window->scl->x / sio2->_SIO2window->scl->y,
                   _SIO2camera->cstart,
                   _SIO2camera->cend );
   }
   sio2WindowEnterLandscape3D();
   {
      
      
      sio2CameraRender( sio2->_SIO2camera );
      sio2ResourceRender( sio2->_SIO2resource,
                     sio2->_SIO2window,
                     sio2->_SIO2camera,
                     SIO2_RENDER_SOLID_OBJECT      |
                     SIO2_RENDER_TRANSPARENT_OBJECT  |
                     SIO2_RENDER_ALPHA_TESTED_OBJECT |
                     SIO2_RENDER_IPO );
      sio2ObjectReset();      
      sio2MaterialReset();
   }
   sio2WindowLeaveLandscape3D();
}
Use My owen use my own fileSIO2 to replace the file SIO2 in tutorial14,but it doesn't work! why?

LuisLee

Posts : 85
Join date : 2009-04-26
Age : 37

Back to top Go down

Ipo is not work,why? Empty Re: Ipo is not work,why?

Post  LuisLee Wed Aug 19, 2009 3:22 am

I found the error:I did not update the export script! Sad

LuisLee

Posts : 85
Join date : 2009-04-26
Age : 37

Back to top Go down

Ipo is not work,why? Empty Re: Ipo is not work,why?

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