Custom joints vehicle and weak joints

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Custom joints vehicle and weak joints

Postby kallaspriit » Thu Nov 26, 2009 1:29 pm

The solution indeed does not contain the sample projects, the latest maintainer preferred cmake instead. Please see the wiki article I wrote (http://www.ogre3d.org/wiki/index.php/Og ... on_Project) and see if you can compile that. It includes OgreNewt project that uses the environment variables to find everything. I guess I could update the solution to include sample projects too, I will see about that.
kallaspriit
 
Posts: 216
Joined: Sun Aug 14, 2005 6:31 pm

Re: Custom joints vehicle and weak joints

Postby thedmd » Thu Nov 26, 2009 2:22 pm

Julio Jerez wrote:45 mgs of headers file? and all of that for function pointer callbacks and smart pointes? wht the F%^k is that all abput?
it is there any other reason why using that with a thin wraper like OgreNewt?

Boost is a collection of C++ template based libraries. Shared pointrs are only fraction of it.

After looking into OgreNewt archive I notice that "lightweight" version of boost is included in. To be honest it is not necessary now. OgreNewt uses <boost/function.hpp> and <boost/bind.hpp>. Such features are part of TR1 of C++ Specification and are now implemented in most (if not all) major C++ compilers. Ogre impelements shared pointers by itself, so Boost can be dumped.
thedmd
 

Re: Custom joints vehicle and weak joints

Postby Julio Jerez » Thu Nov 26, 2009 2:55 pm

well I dowloaded booth and copied t teh addon folder, and nwo I was abel to buidl Ogrenewt.

I comented out all teh dependecies of OgreNewt on pthread, it do no thong it need tha at all, handle all treaded function in call back and teh atmica can be used for oteh thong too.
The reduces on library dependency

Now I do not know what else to do there is not one single sample,
can you guy add teh wrapers demo to source controll? I do not see how removing teh demos is a good idea, after spending almost the whole day nwo all I have is a compiled library but not cigar (so to speak)
Julio Jerez
Moderator
Moderator
 
Posts: 12425
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Custom joints vehicle and weak joints

Postby thedmd » Fri Nov 27, 2009 8:03 am

thedmd
 

Re: Custom joints vehicle and weak joints

Postby Julio Jerez » Fri Nov 27, 2009 11:06 am

Those projects are all old and they are not in source control.
When I read the Intsall.txt file the is what is say
To compile and install this library you need cmake > 2.6.2 (http://www.cmake.org/)

On Windows:
install cmake and then use cmake to create project files for Visual Studio



I installed Cmake and I do not see how the F*&k to build the project all I get is a bunch of errors.
I am extremely disappointed with this Ogre stuff.
Several years of Ogre has created a great deal of Damage to opens source community.
Now projects are distributed incomplete, with misleading information, and take the end user in a wild goose chase ride for projects and project and projects, when you do that you still have to chase more projects.

why it is that there are two different versions of the same thing?
one is old,
https://svn.ogre3d.org/svnroot/ogreaddons/trunk/ogrenewt

and one is new but imcomplete.
https://svn.ogre3d.org/svnroot/ogreaddons/branches/ogrenewt/newton20

The old one seem to have all the information but it is old, the new one some how decided to make it hard fo the end user by not adding the projet files.
I do not want to work in the old version, if I do that, I will be ligitimizing the Anarchy I hate about Open source, which is the proliferation of variance of the samething.
There will be not "Julio's OgreNewt Version" of ogrenewt, i just want to make some adjusment to the current version so that end user can have acess to the full set of feature of the library in an easier manner that it currently is.
But this does not have to be this difficult

I had been a week already and I have no even being able to open the first file, it is all about compiling and compiling.
I am sorry but this is my last day and am going to waste of this, if the visual studio solution with all the projects is no place in source control,
I will not continue this.
Julio Jerez
Moderator
Moderator
 
Posts: 12425
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Custom joints vehicle and weak joints

Postby kallaspriit » Fri Nov 27, 2009 11:53 am

You did not have to comment out he pthreads stuff, all it needed was a WIN32 preprocessor definition and I know its missing but I dont have access to SVN. I will update the solution to compile everything easier and try to get access to update source repository too. Ogre really isn't so bad, you have just had lots of bad luck with it :P

Hang on, I will let you know when I'm ready.
kallaspriit
 
Posts: 216
Joined: Sun Aug 14, 2005 6:31 pm

Re: Custom joints vehicle and weak joints

Postby Julio Jerez » Fri Nov 27, 2009 12:36 pm

Ok let us do this.
I will make an image of what I have maybe you can get to work with the missing project.
I set up everything according to the instruction in the OGRE wiki, but I do not get anything working
I am building it with visual studio 2008

Here is the archive with everything
http://www.newtondynamics.com/downloads/Ogre.rar

It is 187 mgb. (It is still loading to the server so wait a few minutes if it fail the first time)

Maybe you or anyone can fix it and post it somewhere where I can get it
Basically what I need is a working version of OgreNewt with all of the test demos including the new one with player controller.
Julio Jerez
Moderator
Moderator
 
Posts: 12425
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Custom joints vehicle and weak joints

Postby kallaspriit » Fri Nov 27, 2009 6:21 pm

I created OgreNewt distribution that should compile with the environment variables, including demos most of the demos.

You need to set the following environment variables:
"OGRE_HOME" to ogre home directory (i compiled Ogre myself, the directories may not be correct with precompiled version)
"BOOST_HOME" to boost directory (get the latest from http://boost.org)
"NEWTON_HOME" to NGD install directory
"OGRENEWT_HOME" to OgreNewt root directory

Download the package: http://tasopopsalon.ee/Priit/OgreNewt2.zip

If all goes well and you set the environment variables correctly, it should compile out of the box, including the demos. Hope it works for you, lets me know if you have problems :wink:
kallaspriit
 
Posts: 216
Joined: Sun Aug 14, 2005 6:31 pm

Re: Custom joints vehicle and weak joints

Postby Julio Jerez » Sat Nov 28, 2009 10:37 am

ok I got you OgreNet version and I set all the enviroment variables, an dteh prject is now compiling.
now how do I run it? all demos crash in a file not found in Ogre, this is the error isn the excection handler
"OGRE EXCEPTION(6:FileNotFoundException): 'resources.cfg' file not found! in ConfigFile::load at c:\ogre\ogremain\src\ogreconfigfile.cpp (line 84)"


Is there any step in ogre that conform to normal programming as it has being for more than 30 years. The way I see every hurdas is just the next step to the next problem.
now the f**king demos simple do not run and you have to step over hunder of file just to see what the error message is because it wrap in layer over layers of expection.

stepping in debug I see that it crashes in this funtion

Code: Select all
    DynLib* DynLibManager::load( const String& filename)
    {
      DynLibList::iterator i = mLibList.find(filename);
      if (i != mLibList.end())
      {
         return i->second;
      }
      else
      {
           DynLib* pLib = OGRE_NEW DynLib(filename);

//game crashe here
         pLib->load();       
           mLibList[filename] = pLib;
           return pLib;
      }
    }



these are teh parameters and they seem to be right,
+ pluginName "./RenderSystem_Direct3D9_d" const std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
+ filename "./RenderSystem_Direct3D9_d" const std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
Julio Jerez
Moderator
Moderator
 
Posts: 12425
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Custom joints vehicle and weak joints

Postby Julio Jerez » Sat Nov 28, 2009 11:20 am

Ha looking back I opened file pluging.cfg
# Defines plugins to load

# Define plugin folder
PluginFolder=./

# Define plugins
Plugin=RenderSystem_Direct3D9_d
Plugin=RenderSystem_GL_d

and I changed
PluginFolder=./
to
PluginFolder=

and now is runs fine.
finally after 6 years trying to run Ogre I have some parcial sucess, I hope it does not take another six years to move forward now.

Here is my question after we make the changes, I notice that your project is somewhat different than the one in SVN.
how do we know that people will accept the changes and consolidate the project, and instead this became a new descendant for the wrapper and contribute to even more Anarchy.
you say that you do not even can access SVN. The last thing I have is that this start a new competion war.
Julio Jerez
Moderator
Moderator
 
Posts: 12425
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Custom joints vehicle and weak joints

Postby Julio Jerez » Sat Nov 28, 2009 1:32 pm

Ok here is my first change

void QuatPosToMatrix( const Ogre::Quaternion& quat, const Ogre::Vector3 &pos, float* matrix )
{
// this takes a Quaternion and a Vector3 and creates a float array
// which is more meaningful to Newton.
using namespace Ogre;
Real mag;
Matrix3 rot;
Vector3 xcol, ycol, zcol;

// Julio
// some time the rotation that come form Ogre is no a unit rotation
// the quaternion must be normalize to prevent scale build into the matrix
Ogre::Quaternion quat1 (quat);
mag = quat1.normalise();
quat1.ToRotationMatrix( rot ); // creates a 3x3 rotation matrix from the Quaternion.



those are some of the litlle thing that are makes Netwon malfuntion.
some how bodei are create with not nit matrix and Netwon onle check for tha stuff in debug mode.
Anyway I will run teh demo one bu one until I make few corrention before moving to change the joint system.

Please tell me are we going to handle the source controll stuff,
Julio Jerez
Moderator
Moderator
 
Posts: 12425
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Custom joints vehicle and weak joints

Postby kallaspriit » Sun Nov 29, 2009 1:01 pm

Very good you finally got it to work, weird that the config works on my and not on your computer. As for source control, I am in contact with the latest repository owner and I hope to soon be able to commit changes to it myself and, if you would like to, a account could probably made for you too.

I added your improvement to my version of OgreNewt and will add it to repository when I get access.

If the OgreNewt samples are a bit hard to follow, please try the Minimal OgreNewt Application Project that I created, see http://code.google.com/p/minimal-ogrenewt/. It should compile out of the box using the same environment variables.
kallaspriit
 
Posts: 216
Joined: Sun Aug 14, 2005 6:31 pm

Re: Custom joints vehicle and weak joints

Postby kallaspriit » Mon Nov 30, 2009 9:14 am

Julio Jerez wrote:Ok here is my first change

void QuatPosToMatrix( const Ogre::Quaternion& quat, const Ogre::Vector3 &pos, float* matrix )
{
// this takes a Quaternion and a Vector3 and creates a float array
// which is more meaningful to Newton.
using namespace Ogre;
Real mag;
Matrix3 rot;
Vector3 xcol, ycol, zcol;

// Julio
// some time the rotation that come form Ogre is no a unit rotation
// the quaternion must be normalize to prevent scale build into the matrix
Ogre::Quaternion quat1 (quat);
mag = quat1.normalise();
quat1.ToRotationMatrix( rot ); // creates a 3x3 rotation matrix from the Quaternion.



those are some of the litlle thing that are makes Netwon malfuntion.
some how bodei are create with not nit matrix and Netwon onle check for tha stuff in debug mode.
Anyway I will run teh demo one bu one until I make few corrention before moving to change the joint system.

Please tell me are we going to handle the source controll stuff,


I am afraid it does not work so easily since the quaternion is const and normalise() would modify it. Is it ok to create a copy of the quaternion, normalise it and use that or is there a better way without the overhead?
kallaspriit
 
Posts: 216
Joined: Sun Aug 14, 2005 6:31 pm

Re: Custom joints vehicle and weak joints

Postby Julio Jerez » Mon Nov 30, 2009 10:51 am

that is what I did on these lines

Ogre::Quaternion quat1 (quat);
mag = quat1.normalise();

you would not want to change the argument in any way, the right solution if to make a local copy.
Julio Jerez
Moderator
Moderator
 
Posts: 12425
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Custom joints vehicle and weak joints

Postby vectrex » Tue Dec 01, 2009 5:38 am

Ogre can use .zips for things as well as plain files. So the ogrecore.zip should stay that way :)

The BSP demo is legacy (it should be removed and I think they are) since BSP is horribly non-gpu friendly.

Also, your config files had this in it
"Plugin=RenderSystem_Direct3D7_d
Plugin=RenderSystem_Direct3D8_d"

I have no idea what you're using but those plugins haven't been in ogre for YEARS :)
I think you have some old versions that are messing you up.
btw you don't really need to compile ogre from scratch, the SDK should do everything you need.

curiously Ogre is one of the only c++ libs I've never had any trouble compiling ;) Just upzip deps into root svn folder and hit compile. I think the only thing I've had to do is set my directX env vars if they weren't set right.
I'm using Ogre SVN trunk 1.7 at the moment which is very nice. It uses CMake which took a bit to get used to but seems to work well. I had to set a lot of env vars for dx etc.
vectrex
 
Posts: 21
Joined: Sat Oct 01, 2005 10:15 am
Location: Australia

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest