PointOfRotation(Pivot point) and Textures

Advanced game related topics
Johan_Haegg
User
User
Posts: 60
Joined: Wed Apr 30, 2003 2:25 pm
Location: Västerås
Contact:

PointOfRotation(Pivot point) and Textures

Post by Johan_Haegg »

Well, after a good nights codeing and modelling with my friends we have run in to some problems, first off all it was that 3DS Ogre Exporter generated XML, but that was just a problem solved by looking at the content of the zip.
Next problem was that it looked f&¤#ing awfull but that was solved by inverting normals or whatever. (I dont know that techi stuff, im just the coder) :roll:

Now we have got our nice little tank inside the game and its working, well... almost. The new texture looks good in 3DS Max, but wierd in Ogre.
The PointOfRotation(Pivot) is not even near the center.

Tried to edit the XML to tweak the center but it did not realy work :?

Anyone got a clue how to map a model so it works in Ogre and how to change that pivot point. Searched the Ogre Forum but only got a solution that did not realy work and a solution that is not even supported by PB.

A few shots of the progress:

http://rastank.byohzrd.net/techtest1.jpg
http://rastank.byohzrd.net/techtest2.jpg
http://rastank.byohzrd.net/techtest3.jpg

To bad the pivot point is to the left of the tank =/

[EDIT]
To show you a bit about the errors, i took a screenshot marking the in-game pivot point with a red dot (you cant miss it :wink: ) and textured the tank with a chessboard texture. The object is mapped BEFORE its inverted, so that might be a problem.

http://rastank.byohzrd.net/errors.jpg

[EDIT2]
It was the map-before-invert "bug" that played a little trick, the output was WAY to much smaller than the non-inverted output.

http://rastank.byohzrd.net/mapfix.jpg
Johan_Haegg
User
User
Posts: 60
Joined: Wed Apr 30, 2003 2:25 pm
Location: Västerås
Contact:

Solution

Post by Johan_Haegg »

With LOADS of work, we managed to solve it, splited the tank i three bits and converted them to VRML97 and used that convertion tool. Suddenly it works like a dream and everything rotates just about right, its som small errors that its easily compensated by a few lines of code.
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post by Blade »

Nice work, I'd like to see a pic with the correct tank textures...
I wonder if the tank moves accordingly to the terrain (roll,pitch...)
:)
Johan_Haegg
User
User
Posts: 60
Joined: Wed Apr 30, 2003 2:25 pm
Location: Västerås
Contact:

Post by Johan_Haegg »

Will post them as soon as i have rewritten the code from scratch, used the Terrain example to build the whole technology test 1 on.
The tank WILL pitch and roll as the terrain changes when that code is done, now it just hovers there.

Currently writeing on the code that will place the body on the ground, put the turret on top of it and the barrel inside the turret, rotate the body, turret and barrel, let the turret rotate independent of the body and raise and lower the barrel.

M1 Abrams rendation (yep, its that mesh that looked so awfull in techtest 1)
http://rastank.byohzrd.net/tank4.jpg

[Edit]
Well, the techtest 2 is half-done, code rewritten from scratch with such interruptions as: Simpsons, South Park and of course FOOD! (dont think im a fat guy, skinny as hell :> )

Back to Topic:

Got the nice hovering feeling again, totaly reversed controls and no rotation, but hey, it works... and all are bound to the same pivotpoint = centered.
http://rastank.byohzrd.net/techtest2-1.jpg
Post Reply