Horde3D

Next-Generation Graphics Engine
It is currently 22.12.2024, 13:24

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 05.02.2013, 03:24 
Offline

Joined: 05.02.2013, 03:17
Posts: 3
Are the assets being used in the first tutorial (http://www.horde3d.org/docs/html/_tutorial.html) available anywhere? It suggests using files from the SDK samples, so I'm assuming it's left to the reader to put together the correct resources? None of the sample resources seem to match what is being used in the tutorial, so I want to make sure I am not wasting my time.

Thank you,

huffman


Top
 Profile  
Reply with quote  
PostPosted: 06.02.2013, 10:26 
Offline

Joined: 17.11.2009, 17:00
Posts: 205
Location: Russia, Moscow
This tutorial was not updated for a long time. You should probably look at samples that come with the SDK (Chicago and Knight samples). They are up to date with the engine capabilities.
If you want to begin with this example, then you should change:
"standard.pipeline.xml" to "forward.pipeline.xml",
"walk.anim.xml" to "man.anim"
"character.scene.xml" to "man.scene.xml"
h3dutLoadResourcesFromDisk() may require different parameter from "" (like path to content dir).


Top
 Profile  
Reply with quote  
PostPosted: 12.02.2013, 16:53 
Offline

Joined: 05.02.2013, 03:17
Posts: 3
Thank you for the response Irdis. I was able to successfully use the sample assets - instead of renaming them, though, I just updated the example to use different assets. In order to get animations working I needed to call:

Code:
h3dUpdateModel( model, H3DModelUpdateFlags::Animation | H3DModelUpdateFlags::Geometry );


I also found it helpful to check the h3dutLoadResourcesFromDisk() result to confirm it wasn't something else like a mispositioned camera. Is there a reason the tutorial and the samples don't check? I was actually never able to get the samples working because of issues finding resources - I'm running Mac OSX 10.8 so the directory layout required is a little different and it isn't created when built.

Ryan


Top
 Profile  
Reply with quote  
PostPosted: 12.02.2013, 20:52 
Offline

Joined: 17.11.2009, 17:00
Posts: 205
Location: Russia, Moscow
Quote:
I'm running Mac OSX 10.8 so the directory layout required is a little different and it isn't created when built.

Sorry, I don't have a Mac, but samples should copy the executable file to the binary directory, where Horde3D and Horde3DUtils dynamic libraries are. Samples expect that resources are located one directory upper in the directory hierarchy (something like "application path../Content"). It seems that cmake files do not contain copy command, only the supplied vcproj files do. Maybe that is the cause of h3dutLoadResourcesFromDisk( _contentDir.c_str() ) failure.


Top
 Profile  
Reply with quote  
PostPosted: 13.02.2013, 07:43 
Offline

Joined: 05.02.2013, 03:17
Posts: 3
Quote:
Maybe that is the cause of h3dutLoadResourcesFromDisk( _contentDir.c_str() ) failure.


Yeah, the full path is defined in main.cpp for Chicago (same for the Knight sample I'm sure):

Code:
std::string extractAppPath( char *fullPath )
{
#ifdef __APPLE__
   std::string s( fullPath );
   for( int i = 0; i < 4; ++i )
      s = s.substr( 0, s.rfind( "/" ) );
   return s + "/../";
#else
   const std::string s( fullPath );
   if( s.find( "/" ) != std::string::npos )
      return s.substr( 0, s.rfind( "/" ) ) + "/";
   else if( s.find( "\\" ) != std::string::npos )
      return s.substr( 0, s.rfind( "\\" ) ) + "\\";
   else
      return "";
#endif
}


So I guess it should be up two directories? I tried putting the Content directory in multiple places without luck. Oh well, I got it working after setting the directory in the code myself.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group