Page 1 of 6

Stunt Rally - version 2.7

Posted: Sun Jun 06, 2010 6:23 pm
by Crystal Hammer
Update edit

Project Homepage (wih all links) is here
http://stuntrally.tuxfamily.org/

We use shiny material generator (topic here: http://www.ogre3d.org/forums/viewtopic.php?f=11&t=71117)

end of updates


Hi all, just wanted to share screens from a quite early stage of a game based on VDrift and with rendering by OGRE.

Screenshots:
http://picasaweb.google.com/CryHam/VDri ... TreesGrass#

I used PagedGeometry, and resources (trees, terrain textures) from Ogitor.

The playable demo (hope so) can be downloaded from project's page:
http://code.google.com/p/vdrift-ogre/

Its not much since I've done this by myself, also having a fulltime job.

Hope it's not to early for posting this and that someone will like it.

Have fun.

Re: Stunt Rally (VDrift+Ogre) - early shots

Posted: Sun Jun 06, 2010 7:32 pm
by Ockonal
Nice job ;) What physic system do you use?
Btw, it's a pity that there isn't special version for Linux.

Re: Stunt Rally (VDrift+Ogre) - early shots

Posted: Sun Jun 06, 2010 7:45 pm
by Crystal Hammer
VDrift does much of physics by itself (that's why it is a simulation) and since recently, it uses Bullet for car chassis collision (and probably will for future dynamic objects).
I know, I just don't have any programming experience under Linux at all. But VDrift has a version for Linux, so it should be possible.

Re: Stunt Rally (VDrift+Ogre) - early shots

Posted: Mon Jun 07, 2010 9:33 am
by Kenshido
How did you make the road over terrain surface?

Re: Stunt Rally (VDrift+Ogre) - early shots

Posted: Mon Jun 07, 2010 10:25 am
by Crystal Hammer
Yes, this was tricky, and it's still far from beeing perfect.
I used so dense triangles for road as for the terrain, so they are nearly the same size (1m).
And the road is placed about 0,01 m above terrain at each point.
This resolved road tearing problem near camera when terrain is at its LOD 0.
I also have depth_bias 6 for material, it helps, but it can't be to big. When too big road is drawn closer at distance, clipping trees and car.
The triangle count is high, that's why some road LOD and paging is necessary (will write it some day, I guess).

Re: Stunt Rally (VDrift+Ogre) - early shots

Posted: Mon Jun 07, 2010 10:38 am
by Kenshido
And what's the technique of drawing road? Sequence of coordinates of center of the road?

Re: Stunt Rally (VDrift+Ogre) - early shots

Posted: Mon Jun 07, 2010 10:48 am
by Crystal Hammer
It's just a regular grid created in ManualObject, nothing special.

Re: Stunt Rally (VDrift+Ogre) - early shots

Posted: Mon Jun 07, 2010 11:05 am
by Kenshido
Are there impostors on this picture?
Image

Re: Stunt Rally (VDrift+Ogre) - early shots

Posted: Mon Jun 07, 2010 11:15 am
by Crystal Hammer
No, it's an older one with StaticGeometry, that's why there are so many triangles (1,1M).

Re: Stunt Rally (VDrift+Ogre) - early shots

Posted: Mon Jun 07, 2010 11:34 am
by Kenshido
What about crossing the roads?

Re: Stunt Rally (VDrift+Ogre) - early shots

Posted: Mon Jun 07, 2010 11:51 am
by Crystal Hammer
Yeah, that isn't managed now at all. Triangles at road crossings are z-fighting.
There should be some sort of crossing detection that whouldn't make triangles at the same place.
Or would create special triagles at crossing place and the rest of the road would have to snap to the crossing frame.
But that's a much later issue for me.

Re: Stunt Rally (VDrift+Ogre) - early shots

Posted: Mon Jun 07, 2010 11:57 am
by Kenshido
And the road that doesn't receive shadows - it's just temporarily?

Re: Stunt Rally (VDrift+Ogre) - early shots

Posted: Mon Jun 07, 2010 12:09 pm
by Crystal Hammer
Yes, I've got shadows on road working, but at the moment from the first shadowmap only.
It's new for me and I didn't have time to learn shadows and materials properly, so I'm just doing it as fast I can.
Also there is no self shadowing now, and besides terrain and road nothing else receives shadows.

Re: Stunt Rally (VDrift+Ogre) - early shots

Posted: Mon Jun 07, 2010 2:08 pm
by xadhoom
Crystal Hammer,

Nice start! What kind of editor are you using to model the tracks? Maybe you should abstract their drawing to 2D to be able to identify crossings correctly (simpler intersection tests).

Ogitor provides PG and Terrain support as well. A dedicated track creation plugin does not yet exist though :wink:

Good luck with your project!
xad

Re: Stunt Rally (VDrift+Ogre) - early shots

Posted: Mon Jun 07, 2010 2:23 pm
by Crystal Hammer
I like Ogitor, it has nearly everything that's needed.
I will use it for my future tracks, this one was just generated with sinus functions.
There's no river/road plugin though. I will try to write such plugin to edit roads for it, if no one does.
I intend to edit roads in 2D, those which stick to ground.

Re: Stunt Rally (VDrift+Ogre) - early shots

Posted: Sat Jul 31, 2010 3:26 pm
by zizhao
Crystal Hammer,
I have tried to build ur project. and i got some problems when compling ogre with stlport.5.2.
it seems ogre of the latest version don't need stlport's support.but if i don't use it.some linking errors listed.

like:"error LNK2019: unresolved external symbol "public: static class OIS::InputManager * __cdecl OIS::InputManager::createInputSystem(class stlp_std::multimap..."
all about stlp_std.

would you be kind show me some replies.

Re: Stunt Rally (VDrift+Ogre) - early shots

Posted: Sat Jul 31, 2010 6:38 pm
by Crystal Hammer
Hi,
This means you have to compile OIS with stlport.5.2 too (like all dll's).

Re: Stunt Rally (VDrift+Ogre) - early shots

Posted: Sat Jul 31, 2010 6:50 pm
by jacmoe
I would just forget about stlport.
It's been a long, long time since you needed that.

Re: Stunt Rally (VDrift+Ogre) - new version 3

Posted: Sat Jul 31, 2010 7:25 pm
by Crystal Hammer
I wouldn't go for all that trouble with compiling everything with stlport if it wasn't the only way for me.
Tried to compile VDrift (it's actally a Linux project) without it in Visual Studio 2008 and it can't be done because of list's and all std templates not alligned to 16 bytes.
And since I'm so attached to VS2008 (since college, through 2 works) it would consume lots of time for me to even compile it in a different IDE environment.
I'm actually quite glad that VDrift compiled in VS using stlport and didn't cost more trouble. Ogre is also easiest to be compiled in VS.
But i guess it is possible to compile it in many other compilers.

Re: Stunt Rally (VDrift+Ogre) - new version 3

Posted: Sat Jul 31, 2010 7:32 pm
by Crystal Hammer
Anyway about the new release: I finally added roads, based on splines, and also with 4 LOD's. Each segment had 4 meshes and the one is visible for its LOD, which is computed by getting the smallest distance from near plane to 3 points in that road segment.
They render quite well, other stuff is limiting Fps.
Had some troubles with compiling QT Property Browser for Ogitor so my attempt to create a plugin for it to edit roads is delayed.

Re: Stunt Rally (VDrift+Ogre) - new version 3

Posted: Sat Jul 31, 2010 7:50 pm
by jacmoe
What's the error?
It's compiled as part of the CMake script now.
So no manual step.
It seems to work for everyone, but I'm eager to hear if it can be bulletproofed further.

Re: Stunt Rally (VDrift+Ogre) - new version 3

Posted: Sat Jul 31, 2010 8:31 pm
by Crystal Hammer
The error which caused VDrift not to compile in VS2008 (without stlport) was the
error C2719: '_Val': formal parameter with __declspec(align('16')) won't be aligned ...
Anyway this certainly isn't a easy project to compile here.
I'm still using Ogre from svn compiled in april, and VDrift from may or so. Just don't want to update too often, I would then become an art for itself and block me from wrting new stuff.

Re: Stunt Rally (VDrift+Ogre) - new version 3

Posted: Sat Jul 31, 2010 9:00 pm
by jacmoe
That's really odd.
Looks like the vDrift people are breaking the rules..
http://social.msdn.microsoft.com/forums ... 21e6dbce14
http://www.gamedev.net/community/forums ... _id=426070

Ogitor - including the Qt property browser - does indeed compile cleanly using VS2008.

I might try VDrift myself, just for the heck of it.
If I ever find myself in search of frustrations, which - as a programmer - I do from time to time... :lol:

Anyway, back to topic:
Impressive project you've got here. :)

Re: Stunt Rally (VDrift+Ogre) - new version 3

Posted: Sun Aug 01, 2010 9:49 am
by zizhao
Crystal Hammer wrote:Hi,
This means you have to compile OIS with stlport.5.2 too (like all dll's).
Thx for reply.

i did it.OIS processed well. but ogre still couldn't work with stlport. i used ogre(v1.6.5).
in OgreString.cpp
...\ogre\ogremain\src\ogrestring.cpp(121) : error C2065: 'tolower' : undeclared identifier
...\ogre\ogremain\src\ogrestring.cpp(131) : error C2065: 'toupper' : undeclared identifier
...

which version of ogre do u use?

Re: Stunt Rally (VDrift+Ogre) - new version 3

Posted: Sun Aug 01, 2010 11:22 am
by Crystal Hammer
I was using 1.7 from svn (but got it in april, don't know about newer).
Looks like 1.6 didn't have them.
I had some error in them, so I just commentend out the code in those functions, so they compile.
I didn't use them ever, and it's something weird, I didn't even want to waste time to know what, It runs without them.