Hello...
My name is Adam Gleeson, welcome to my site. I have recently concluded my postgraduate studies in Animation for Computer Games at Sheffield Hallam University.
I'm a technical artist leaning towards special effects, camera motion and cut scene direction. Some of my skills are visible in the straightforwardly named skills page, or use the direct links at the top of the page.
Direct links to notable pieces of work include my car rig, and Unreal Tournament 3 automated city, although much more content is on the site, as you can tell from the videos above.
Contact me if you have any questions or comments.
- Adam
My name is Adam Gleeson, welcome to my site. I have recently concluded my postgraduate studies in Animation for Computer Games at Sheffield Hallam University.
I'm a technical artist leaning towards special effects, camera motion and cut scene direction. Some of my skills are visible in the straightforwardly named skills page, or use the direct links at the top of the page.
Direct links to notable pieces of work include my car rig, and Unreal Tournament 3 automated city, although much more content is on the site, as you can tell from the videos above.
Contact me if you have any questions or comments.
- Adam
Recent updates:
This post contains a video.
Click here to view to full post
Here's what I got up to this weekend and took a few photos and videos. Despite the FIA and FOTA's best efforts, a race happened and everyone was happy for a while.
The video above is of the start and isn't great as I was trying to actually watch it rather than video, but it'll do.
Friday
Pits Straight - Free Practice 1
Mark Webber entering the pits:

Rear of McLaren:

McLaren interior after asking the guy guarding the car to take a photo, who surprisingly obliged:

Safety car:

Abbey Chicane - Free Practice 2
Lewis Hamilton:

Felipe Massa:

Timo Glock:

Saturday
Luffield - Free Practice 3
Robert Kubica:

Giancarlo Fisichella:

Nico Rosberg:

Sebastien Vettel:

Rubens Barrichello:

Copse - Qualifying
A Red Bull following a BMW and running slightly wide onto the dirt:

The remains Adrian Sutil's broken car after brake failure:

Porsches:

Becketts - GP2
Lucas di Grassi forcefully overtaking:

di Grassi again with a cool exhaust:

Sunday
Stowe - Race + Buildup
Driver parade:

The Stig being a chauffeur:

Jackie Stewart forgetting to turn up in a recent car:

Red Arrows:



Nick Heidfeld, Fernando Alonso, Lewis Hamilton and Robert Kubica:

Jenson Button struggling on to 6th place:

Sebastien Vettel after winning:

Lewis Hamilton about to entertain the fans supporting him with a couple of doughnuts, which I thought was a nice touch and most likely earned him a fine from an FIA determined to prevent a show:
Post a comment

Click here to view to full post
It's been a while since I've updated anything, so here's a draft render from a project I've started working on.



Far too many polygons but still work in progress...
Post a comment

Click here to view to full post
The UT3 City "mod" is available to download here. View the original report here. If you download it, please let me know, and tell me what you think in the comments.
It is a cross between a map and a mod, and could serve to become the base of a game with some tweaking. It is a basic city environment with options for global events such as weather and time of day, and is full configurable. A gameplay element could easily be added on top to form part of a mod and retain all the options.
A GUI is included from which to alter the settings, and was made with Windows Forms/C++ so requires all the required elements for that to run. Alternatively, the .txt file that it creates can be edited manually, and the commands can be found below.
Installation
For installation, copy the CTF-City.ut3 and CTF-City.ini files into the folder
Documents/My Games/Unreal Tournament 3/UT Games/Unpublished/Cooked PC/Custom Maps
and copy City.upk into
Documents/My Games/Unreal Tournament 3/UT Games/Unpublished/Cooked PC/
I haven't tested the file location for a Steam installation of the game, but the structure should be fairly similar.
For the external application to have any effect, the event.txt file that the .exe creates needs to go into where the game is installed:
Program Files/Unreal Tournament 3/Binaries
The CityConfig.exe should ideally be in this same place as the .txt file that is created goes into the same location as the .exe for now, so perhaps a shortcut made to the .exe would be worthwhile.
Loading the mod
Load UT3, select instant action then capture the flag. "City" should appear at the bottom of the list. Select it, click next, and set the bots slider to 0 (this will be overridden by game elements so having more than 0 will produce different results) and then start the game.
Console commands
To execute a console command, open up the console and type "causeevent" followed by one of the commands below. The variables are self explanatory so I won't go into any detail except where necessary. Some of these commands can also be manually put into the event.txt file if you don't have the correct framework installed to run the GUI.
Fog On
Fog Off
Fog Default
RainOn
RainOff
RainToggle
RainDefault
SnowOn
SnowOff
SnowToggle
SnowDefault
Dawn
Midday
Dusk
StopTime (This is the default option for a night start)
timeSlow
timeFast
timeVeryFast
timeNormal
trafficRed
trafficGreen
trafficNormal
spawn
spawnSingle
SpawnLow
SpawnMedium
SpawnHigh
SpawnVeryHigh
fps
spectator
player
SpawnGameMode
Post a comment
This post contains a video.
Click here to view to full post
[Download link at bottom of this post]
This is a Far Cry 2 map I made a while ago, and is intended for the "Uprising" gameplay style, where each team has to capture three points in the map.
There is a capture point within the base of each team, which means it will be difficult to capture one of these alone, so relying on teamwork and coordination. The final capture point is in the middle of the map at the top of a tower, with three vantage points to provide long-ranged cover, or from which to attack the opposing team.

The image on the right is of the UFLL's base, and contains a tower, which the APR team doesn't have. However, there is a lot of cover, so the advantage of having a high point from which to attack is reduced by the fact that the opposition can sneak through all the cover. There is also a lot of tall grass in the map, giving the tower an opportunity to pick out people crouching and sneaking through the grass.
There are barricades to help prevent enemy vehicles from driving into the base and spawnraping everyone, although the players also spawn in elevated positions where vehicles are unable to reach, so irritations like this should be impossible.
At each spawn point there is a choice of a boat or a 4x4 to drive, both with mounted guns, so a team of two or more is ideal to make an attack, especially if the two vehicles coordinate and allow those on foot to advance first to time their runs to meet at the same time.
This image shows the other team's base, which as mentioned earlier doesn't have a tower, but the run towards the base is in the open so should be more easily defended, as you can see in the image directly below.
I set the weather to be slightly stormy to allow the foliage to move, although not excessively. After testing the motion at this setting, it provides ample cover in the long grass for players to crouch through and remain relatively undetected, meaning players should hopefully stay and defend their capture point where they are safer and able to try to pick out long range attack attempts.
An image of one of the high places that give a line of sight to the central capture point. There are many different methods to achieve the targets in the map, with multiple routes and vantage points leaving the players to explore, but the map isn't too open that anyone will become lost. A road also highlights the route to help prevent the feeling of not knowing where to go, which is often a problem with custom maps, especially with players new to a game or gametype. Where a player would gain an advantage from sneaking through the grass, another player could gain an advantage by using a high place to spot them, but at the disadvantage of being easily spotted. The positioning of vehicles and pickups and scenery is intended to make the game balanced not only between opposing teams, but also between individuals in a team - taking a vehicle has advantages and disadvantages, whereas typically the game favours players with a vehicle and can be frustrating for players without one.
I have tried to alleviate as many of the problems that I have found with maps in the past, although as with all game content. more testing with many players will be required to find out how successful the map really is.
Download (4MB).
This file then needs to go into the "/user maps" folder either in your "Documents/My Games" folder, or within the main game directory.
If you download it, please let me know, and tell me what you think in the comments.
Post a comment
Click here to view to full post
This section will include downloadable maps and mods for various games, including UT3, Left 4 Dead, Crysis and Far Cry 2, as well as some other test standalone game elements.
Some of the Left 4 Dead content is already viewable on my in-game server, which you can join directly by typing "connect 217.163.30.87:27015" in the game console. The server alternates between custom content and an almost vanilla* server, so some of the time it won't contain anything new.
* By almost vanilla, I mean a vanilla server with a few niceties. Like auto spectate so you don't have to kick people that are AFK. But nothing intrusive like the tank mod which spawns an invincible tank and you just have to run....
23/05/09: Updated IP to 217.163.30.87:27015
Post a comment
This post contains a video.
Click here to view to full post
This tutorial is to create the simple car rig you see in the video above using 3dsmax and Reactor physics simulation. I'll assume you don't know much about 3dsmax or Reactor, so should be able to follow it and get similar results to me. I'm going to provide all the values that I used so you can repeat exactly what I have, but feel free to experiment.
First, create a cylinder with radius 10 and height 1. Increase number of sides to 36 to make the motion a little smoother. Set the pivot point to be centred by going to the Hierarchy tab at the top of the right hand panel, then click "Affect Pivot Only", and "Centre to Object". This makes sure that the position of the wheels will be symmetrical on both sides when we come to add extra wheels. You can also make the height greater than 1 to make it a bit more sturdy, but 1 worked just fine for me in the video you see above.
Centre it to the origin by changing the space setting to 'World' (see below), and then right click on the slider of each axis of the object's position to set it to 0.

Rotate the cylinder 90 degrees along the y-axis, then move it 15 units in the x-direction and 20 units in the y-direction. It's easier to rotate if you turn on Angle Snap Toggle like I have in the image above (5th icon on the right of the 'world' selection). Then to move it exactly 10 units just type in 10 at the bottom, rather than moving it manually with the mouse. This value has to be exact to make sure the opposite wheels are also moved 10 units so the car is balanced.
Create a copy of the cylinder (shift and drag) in the y-direction and move it a sensible distance, as much as you like really. I moved mine 40 units, so it was balanced out with my y-position of the front wheel - so I set the y-value to -20.
Next make copies of both of these wheels by shift and dragging in the x-direction. Then set the world x-value to -15, to balance out the original wheels. You should now have something like this:

Now create a box. Mine has length 40, width 20 and height 10. The number of segments can remain at 1 for now. If you've done the above steps the same as me, you can right click on each positional axis of the box to reset it to the origin, and it will sit perfectly the middle of the wheels.
Create a simple plane and move it underneath the car so far to act as the ground.
Reactor time. If you haven't done so already, it's probably easiest to right click on the top toolbar and bring up the reactor toolbar. Select all objects in the scene, then select the first icon in this toolbar, which should be 3 boxes. This will add your objects into the simulation.
Select the wheels and open the Property Editor (4th icon from the end in the toolbar). Set the mass to 10. Select the box and set its mass to 25, and change the simulation geometry to bounding box. Select the ground plane and set it to unyielding and concave mesh.
If you preview the simulation now (2nd icon from end in toolbar), you should have all the objects in the scene, and everything falling to the ground when you press play. A cool thing you can do in the preview is right click an object and fling it around, but that's not very helpful just now.
You should have something like this uncoordinated car now:

To attach the wheels, add a Toy Car (12th icon from start of toolbar) into the scene by selecting it then clicking in the scene. On the panel that opens on the right, click the "none" next to Chassis and pick the box. Click the Add button underneath wheels and add the four cylinders.
To give the car some forward motion, tick the 'spin wheels' box.
Open up the preview again and you should now have a moving car. You can play around with the suspension to make it look a little more interesting - the lower the value, the softer it is. Edit the ground plane for some bumps and it will work them out and drive over them where physics will allow. I used a simple noise modifier on the plane on the video above, but you can edit however you like.

This is exactly what I used in this video. For my more advanced rigs I didn't use reactor, so they'll require a different tutorial at some point if there's any requests for it.
Post a comment

Click here to view to full post
Well, here it is. My first tutorial. I've decided to write this tutorial on creating a basic RSS/XML feed in PHP because it's something I couldn't really find a good tutorial on to suit my needs, so hopefully this will help somebody out. The same technique can also be applied to create XML feeds for sitemaps, which is always good for search engines.
I'll assume you have content being fed from an SQL database, know how to connect to the database from your website to display the information, and this is the content you expect to be put into your feed. It's quite a basic tutorial, so aimed at PHP novices, as I guess many tutorials are as that's kind of the point.
To begin with, create a blank .xml file on your website, and give it full control access in your web host settings. Mine's in the root of my website - <a href="http://www.adamgleeson.co.uk/rss.xml">http://www.adamgleeson.co.uk/rss.xml</a>.
Next, in your admin area, make the rss.php page. This needs to include your database connection information as usual.
Then from this point onwards, the RSS/XML content will be added to as one single variable in PHP. This means the file will effectively be one long line, but web browsers and feed readers will sort this out and make it into a sensible layout as long as all the tags are correct.
The XML file needs to start with a definition and a channel open tag:
$xml = "<rss version=2.0>";
$xml .= "<channel>";
Note the ".=" to keep adding to what is previously in the variable without discarding it.
Continue by adding title and description tags for your feed. A title tag I would say is the minimum, but if you don't even want that you can skip this section I guess.
$xml .= "<title>Adam Gleeson</title>";
$xml .= "<description>Animation and Computer Games</description>";
$xml .= "<link>http://adamgleeson.co.uk/</link>";
$xml .= "<copyright>© Adam Gleeson 2008</copyright>";
Now for the feedy goodness. Grab your SQL from the database like you would for a normal page:
$sql = "SELECT * FROM table_name LIMIT 25";
$rs = mysql_query($sql);
while($rss = mysql_fetch_array($rs)){
And open up tags to start a new feed item:
$xml .= "<item>";
$xml .="<title>";
Add the title of the item, or whatever your table field heading is, then close the item tag.
$xml .= $rss["title"];
$xml .= "</title">;
Next comes the description. In my description I just have the date and category, rather than reformatting the text:
$xml .= "<description>";
$xml .= $rss["date"];
$xml .= "(";$xml .= $rss["category"];
$xml .= ")";
$xml .= "</description>";
Last tag to be entered in my feed is the all-important link. Just to make it easier, I've linked it to the ID of the relevant item, which the page then uses PHP GET to decide what to display by grabbing the ID from the URL.
$xml .= "<link>http://www.adamgleeson.co.uk/blog/?article=";
$xml .= $rss["id"];
$xml .= "</link>";
Remember to close the item tag, then rinse and repeat as necessary. If all your data is contained within one table, this should be enough to display everything. The close bracket here is to end the while loop, while the close item tag only ends this current part of the feed, before continuing down the rest of the table as required.
$xml .= "</item>";
}
Finally, close your channel and RSS tags that are still open.
$xml .= "</channel>";
$xml .= "</rss>";
Now to actually write the file. Using the empty file we created earlier, the PHP fwrite command is used to add the $xml variable we have just created into the file. <strong>Remember that PHP will only allow relative links in this stage</strong>.
Last thing to do then is simply to close the PHP tag.
$file = fopen("../../rss.xml", "w");
fwrite($file, $xml);
fclose($file);?>
To add some confirmation that it has been created (or rather, that nothing went wrong if you see no error), a simple link to the file is always helpful.
RSS File Created.
<p>
<a href="/rss.xml">View rss.xml</a>
</p>
And that's it, you should now have a working RSS feed. To make the feed visible in your web browser like on many websites, add this to your head tags on the pages you want the RSS feed to be visible:
<head>
<link href="/rss.xml" rel="alternate" type="application/rss+xml" />
</head>
As with most web things, there are many ways of doing the same thing, and this is simply one of them. I'm not suggesting it is the best way, but it works for me, so I hope this will help someone. I appreciate any comments, let me know if it's any use to you, or any requests for future tutorials!
Comments [ 1 ]

Click here to view to full post
I think I'm finally happy with the website design again... for now. I'm surprised the old design lasted a full six months, so that did quite well, and much of the code is copied into this version of the website, just tidied up a little with all the little extras I've inevitably learnt over the past six months.
Big thanks (and a free inbound link for you, hurray!) to http://sperling.com/examples/menuh/ for much of the CSS code for the interactive drop down rollover menu. A popular one seems to be Son of Suckerfish, but I found this one to be much more useful and customisable, even though it follows largely the same structure.
As for the transparency... yes, I know. It's too much. I think I'll go and take some of it away because it's slowing some certain browsers down more than others (I'm looking at you, IE). Meh, serves those users right for not getting a real web browser I suppose. I wish IE didn't come with Windows so people were forced to go and look for a browser and install it themselves rather than sticking with IE and not even knowing what else was available.
Although if no browser was installed by default, I guess you'd have to wonder how someone would look for and install a browser on a fresh install...
Anyway, enough rambling about the gripping subject of the state of web browsers. I guess this counts as my first blog post on here. I need some vaguely useful subjects to comment on in future.
Anyway, the point of this blog section is mostly for my own selfish benefit, to get some thoughts out of my head and vent them somewhere, even if nobody actually reads it, it's out of my head and I'm happy... ish.
I expect some tutorials will be put up soon (because search engines love tutorials, so I'm told), and then a big rant on something that's bothering me at the moment...
Post a comment
Click here to view to full post
As soon as I bother to write something, content will appear here.
In the meantime, whilst I edit my site layout (yes, again), LOOK - TRANSPARENCY!
Post a comment
22/06/09 |
↓ Silverstone 2009 ↓
This post contains a video.
Click here to view to full post
Here's what I got up to this weekend and took a few photos and videos. Despite the FIA and FOTA's best efforts, a race happened and everyone was happy for a while.
The video above is of the start and isn't great as I was trying to actually watch it rather than video, but it'll do.
Friday
Pits Straight - Free Practice 1
Mark Webber entering the pits:
Rear of McLaren:
McLaren interior after asking the guy guarding the car to take a photo, who surprisingly obliged:
Safety car:
Abbey Chicane - Free Practice 2
Lewis Hamilton:
Felipe Massa:
Timo Glock:
Saturday
Luffield - Free Practice 3
Robert Kubica:
Giancarlo Fisichella:
Nico Rosberg:
Sebastien Vettel:
Rubens Barrichello:
Copse - Qualifying
A Red Bull following a BMW and running slightly wide onto the dirt:
The remains Adrian Sutil's broken car after brake failure:
Porsches:
Becketts - GP2
Lucas di Grassi forcefully overtaking:
di Grassi again with a cool exhaust:
Sunday
Stowe - Race + Buildup
Driver parade:
The Stig being a chauffeur:
Jackie Stewart forgetting to turn up in a recent car:
Red Arrows:
Nick Heidfeld, Fernando Alonso, Lewis Hamilton and Robert Kubica:
Jenson Button struggling on to 6th place:
Sebastien Vettel after winning:
Lewis Hamilton about to entertain the fans supporting him with a couple of doughnuts, which I thought was a nice touch and most likely earned him a fine from an FIA determined to prevent a show:
Post a comment
08/06/09 |
↓ Black Hawk Model ↓

Click here to view to full post
It's been a while since I've updated anything, so here's a draft render from a project I've started working on.



Far too many polygons but still work in progress...
Post a comment
19/04/09 |
↓ Mod: UT3 City - Download ↓

Click here to view to full post
The UT3 City "mod" is available to download here. View the original report here. If you download it, please let me know, and tell me what you think in the comments.
It is a cross between a map and a mod, and could serve to become the base of a game with some tweaking. It is a basic city environment with options for global events such as weather and time of day, and is full configurable. A gameplay element could easily be added on top to form part of a mod and retain all the options.
A GUI is included from which to alter the settings, and was made with Windows Forms/C++ so requires all the required elements for that to run. Alternatively, the .txt file that it creates can be edited manually, and the commands can be found below.
Installation
For installation, copy the CTF-City.ut3 and CTF-City.ini files into the folder
Documents/My Games/Unreal Tournament 3/UT Games/Unpublished/Cooked PC/Custom Maps
and copy City.upk into
Documents/My Games/Unreal Tournament 3/UT Games/Unpublished/Cooked PC/
I haven't tested the file location for a Steam installation of the game, but the structure should be fairly similar.
For the external application to have any effect, the event.txt file that the .exe creates needs to go into where the game is installed:
Program Files/Unreal Tournament 3/Binaries
The CityConfig.exe should ideally be in this same place as the .txt file that is created goes into the same location as the .exe for now, so perhaps a shortcut made to the .exe would be worthwhile.
Loading the mod
Load UT3, select instant action then capture the flag. "City" should appear at the bottom of the list. Select it, click next, and set the bots slider to 0 (this will be overridden by game elements so having more than 0 will produce different results) and then start the game.
Console commands
To execute a console command, open up the console and type "causeevent" followed by one of the commands below. The variables are self explanatory so I won't go into any detail except where necessary. Some of these commands can also be manually put into the event.txt file if you don't have the correct framework installed to run the GUI.
Fog On
Fog Off
Fog Default
RainOn
RainOff
RainToggle
RainDefault
SnowOn
SnowOff
SnowToggle
SnowDefault
Dawn
Midday
Dusk
StopTime (This is the default option for a night start)
timeSlow
timeFast
timeVeryFast
timeNormal
trafficRed
trafficGreen
trafficNormal
spawn
spawnSingle
SpawnLow
SpawnMedium
SpawnHigh
SpawnVeryHigh
fps
spectator
player
SpawnGameMode
Post a comment
17/04/09 |
↓ Map: Far Cry 2 - Forts ↓
This post contains a video.
Click here to view to full post
[Download link at bottom of this post]
This is a Far Cry 2 map I made a while ago, and is intended for the "Uprising" gameplay style, where each team has to capture three points in the map.
There is a capture point within the base of each team, which means it will be difficult to capture one of these alone, so relying on teamwork and coordination. The final capture point is in the middle of the map at the top of a tower, with three vantage points to provide long-ranged cover, or from which to attack the opposing team.

The image on the right is of the UFLL's base, and contains a tower, which the APR team doesn't have. However, there is a lot of cover, so the advantage of having a high point from which to attack is reduced by the fact that the opposition can sneak through all the cover. There is also a lot of tall grass in the map, giving the tower an opportunity to pick out people crouching and sneaking through the grass.There are barricades to help prevent enemy vehicles from driving into the base and spawnraping everyone, although the players also spawn in elevated positions where vehicles are unable to reach, so irritations like this should be impossible.

At each spawn point there is a choice of a boat or a 4x4 to drive, both with mounted guns, so a team of two or more is ideal to make an attack, especially if the two vehicles coordinate and allow those on foot to advance first to time their runs to meet at the same time.
This image shows the other team's base, which as mentioned earlier doesn't have a tower, but the run towards the base is in the open so should be more easily defended, as you can see in the image directly below.
I set the weather to be slightly stormy to allow the foliage to move, although not excessively. After testing the motion at this setting, it provides ample cover in the long grass for players to crouch through and remain relatively undetected, meaning players should hopefully stay and defend their capture point where they are safer and able to try to pick out long range attack attempts.
An image of one of the high places that give a line of sight to the central capture point. There are many different methods to achieve the targets in the map, with multiple routes and vantage points leaving the players to explore, but the map isn't too open that anyone will become lost. A road also highlights the route to help prevent the feeling of not knowing where to go, which is often a problem with custom maps, especially with players new to a game or gametype. Where a player would gain an advantage from sneaking through the grass, another player could gain an advantage by using a high place to spot them, but at the disadvantage of being easily spotted. The positioning of vehicles and pickups and scenery is intended to make the game balanced not only between opposing teams, but also between individuals in a team - taking a vehicle has advantages and disadvantages, whereas typically the game favours players with a vehicle and can be frustrating for players without one.I have tried to alleviate as many of the problems that I have found with maps in the past, although as with all game content. more testing with many players will be required to find out how successful the map really is.
Download (4MB).
This file then needs to go into the "/user maps" folder either in your "Documents/My Games" folder, or within the main game directory.
If you download it, please let me know, and tell me what you think in the comments.
Post a comment
17/04/09 |
↓ Maps and mods - and L4D Server ↓
Click here to view to full post
This section will include downloadable maps and mods for various games, including UT3, Left 4 Dead, Crysis and Far Cry 2, as well as some other test standalone game elements.
Some of the Left 4 Dead content is already viewable on my in-game server, which you can join directly by typing "connect 217.163.30.87:27015" in the game console. The server alternates between custom content and an almost vanilla* server, so some of the time it won't contain anything new.
* By almost vanilla, I mean a vanilla server with a few niceties. Like auto spectate so you don't have to kick people that are AFK. But nothing intrusive like the tank mod which spawns an invincible tank and you just have to run....
23/05/09: Updated IP to 217.163.30.87:27015
Post a comment
13/04/09 |
↓ Car Rig Tutorial - 3ds Max and Reactor ↓
This post contains a video.
Click here to view to full post
This tutorial is to create the simple car rig you see in the video above using 3dsmax and Reactor physics simulation. I'll assume you don't know much about 3dsmax or Reactor, so should be able to follow it and get similar results to me. I'm going to provide all the values that I used so you can repeat exactly what I have, but feel free to experiment.
First, create a cylinder with radius 10 and height 1. Increase number of sides to 36 to make the motion a little smoother. Set the pivot point to be centred by going to the Hierarchy tab at the top of the right hand panel, then click "Affect Pivot Only", and "Centre to Object". This makes sure that the position of the wheels will be symmetrical on both sides when we come to add extra wheels. You can also make the height greater than 1 to make it a bit more sturdy, but 1 worked just fine for me in the video you see above.
Centre it to the origin by changing the space setting to 'World' (see below), and then right click on the slider of each axis of the object's position to set it to 0.

Rotate the cylinder 90 degrees along the y-axis, then move it 15 units in the x-direction and 20 units in the y-direction. It's easier to rotate if you turn on Angle Snap Toggle like I have in the image above (5th icon on the right of the 'world' selection). Then to move it exactly 10 units just type in 10 at the bottom, rather than moving it manually with the mouse. This value has to be exact to make sure the opposite wheels are also moved 10 units so the car is balanced.
Create a copy of the cylinder (shift and drag) in the y-direction and move it a sensible distance, as much as you like really. I moved mine 40 units, so it was balanced out with my y-position of the front wheel - so I set the y-value to -20.
Next make copies of both of these wheels by shift and dragging in the x-direction. Then set the world x-value to -15, to balance out the original wheels. You should now have something like this:

Now create a box. Mine has length 40, width 20 and height 10. The number of segments can remain at 1 for now. If you've done the above steps the same as me, you can right click on each positional axis of the box to reset it to the origin, and it will sit perfectly the middle of the wheels.
Create a simple plane and move it underneath the car so far to act as the ground.
Reactor time. If you haven't done so already, it's probably easiest to right click on the top toolbar and bring up the reactor toolbar. Select all objects in the scene, then select the first icon in this toolbar, which should be 3 boxes. This will add your objects into the simulation.
Select the wheels and open the Property Editor (4th icon from the end in the toolbar). Set the mass to 10. Select the box and set its mass to 25, and change the simulation geometry to bounding box. Select the ground plane and set it to unyielding and concave mesh.
If you preview the simulation now (2nd icon from end in toolbar), you should have all the objects in the scene, and everything falling to the ground when you press play. A cool thing you can do in the preview is right click an object and fling it around, but that's not very helpful just now.
You should have something like this uncoordinated car now:

To attach the wheels, add a Toy Car (12th icon from start of toolbar) into the scene by selecting it then clicking in the scene. On the panel that opens on the right, click the "none" next to Chassis and pick the box. Click the Add button underneath wheels and add the four cylinders.
To give the car some forward motion, tick the 'spin wheels' box.
Open up the preview again and you should now have a moving car. You can play around with the suspension to make it look a little more interesting - the lower the value, the softer it is. Edit the ground plane for some bumps and it will work them out and drive over them where physics will allow. I used a simple noise modifier on the plane on the video above, but you can edit however you like.

This is exactly what I used in this video. For my more advanced rigs I didn't use reactor, so they'll require a different tutorial at some point if there's any requests for it.
Post a comment
12/04/09 |
↓ Creating Dynamic RSS Feeds in PHP ↓
Click here to view to full post
Well, here it is. My first tutorial. I've decided to write this tutorial on creating a basic RSS/XML feed in PHP because it's something I couldn't really find a good tutorial on to suit my needs, so hopefully this will help somebody out. The same technique can also be applied to create XML feeds for sitemaps, which is always good for search engines.
I'll assume you have content being fed from an SQL database, know how to connect to the database from your website to display the information, and this is the content you expect to be put into your feed. It's quite a basic tutorial, so aimed at PHP novices, as I guess many tutorials are as that's kind of the point.
To begin with, create a blank .xml file on your website, and give it full control access in your web host settings. Mine's in the root of my website - <a href="http://www.adamgleeson.co.uk/rss.xml">http://www.adamgleeson.co.uk/rss.xml</a>.
Next, in your admin area, make the rss.php page. This needs to include your database connection information as usual.
<?php include "/connection.php"; // database connection file location
Then from this point onwards, the RSS/XML content will be added to as one single variable in PHP. This means the file will effectively be one long line, but web browsers and feed readers will sort this out and make it into a sensible layout as long as all the tags are correct.
The XML file needs to start with a definition and a channel open tag:
$xml = "<rss version=2.0>";
$xml .= "<channel>";
Note the ".=" to keep adding to what is previously in the variable without discarding it.
Continue by adding title and description tags for your feed. A title tag I would say is the minimum, but if you don't even want that you can skip this section I guess.
$xml .= "<title>Adam Gleeson</title>";
$xml .= "<description>Animation and Computer Games</description>";
$xml .= "<link>http://adamgleeson.co.uk/</link>";
$xml .= "<copyright>© Adam Gleeson 2008</copyright>";
Now for the feedy goodness. Grab your SQL from the database like you would for a normal page:
$sql = "SELECT * FROM table_name LIMIT 25";
$rs = mysql_query($sql);
while($rss = mysql_fetch_array($rs)){
And open up tags to start a new feed item:
$xml .= "<item>";
$xml .="<title>";
Add the title of the item, or whatever your table field heading is, then close the item tag.
$xml .= $rss["title"];
$xml .= "</title">;
Next comes the description. In my description I just have the date and category, rather than reformatting the text:
$xml .= "<description>";
$xml .= $rss["date"];
$xml .= "(";$xml .= $rss["category"];
$xml .= ")";
$xml .= "</description>";
Last tag to be entered in my feed is the all-important link. Just to make it easier, I've linked it to the ID of the relevant item, which the page then uses PHP GET to decide what to display by grabbing the ID from the URL.
$xml .= "<link>http://www.adamgleeson.co.uk/blog/?article=";
$xml .= $rss["id"];
$xml .= "</link>";
Remember to close the item tag, then rinse and repeat as necessary. If all your data is contained within one table, this should be enough to display everything. The close bracket here is to end the while loop, while the close item tag only ends this current part of the feed, before continuing down the rest of the table as required.
$xml .= "</item>";
}
Finally, close your channel and RSS tags that are still open.
$xml .= "</channel>";
$xml .= "</rss>";
Now to actually write the file. Using the empty file we created earlier, the PHP fwrite command is used to add the $xml variable we have just created into the file. <strong>Remember that PHP will only allow relative links in this stage</strong>.
Last thing to do then is simply to close the PHP tag.
$file = fopen("../../rss.xml", "w");
fwrite($file, $xml);
fclose($file);?>
To add some confirmation that it has been created (or rather, that nothing went wrong if you see no error), a simple link to the file is always helpful.
RSS File Created.
<p>
<a href="/rss.xml">View rss.xml</a>
</p>
And that's it, you should now have a working RSS feed. To make the feed visible in your web browser like on many websites, add this to your head tags on the pages you want the RSS feed to be visible:
<head>
<link href="/rss.xml" rel="alternate" type="application/rss+xml" />
</head>
As with most web things, there are many ways of doing the same thing, and this is simply one of them. I'm not suggesting it is the best way, but it works for me, so I hope this will help someone. I appreciate any comments, let me know if it's any use to you, or any requests for future tutorials!
Comments [ 1 ]
11/04/09 |
↓ Website Redesigned ↓

Click here to view to full post
I think I'm finally happy with the website design again... for now. I'm surprised the old design lasted a full six months, so that did quite well, and much of the code is copied into this version of the website, just tidied up a little with all the little extras I've inevitably learnt over the past six months.
Big thanks (and a free inbound link for you, hurray!) to http://sperling.com/examples/menuh/ for much of the CSS code for the interactive drop down rollover menu. A popular one seems to be Son of Suckerfish, but I found this one to be much more useful and customisable, even though it follows largely the same structure.
As for the transparency... yes, I know. It's too much. I think I'll go and take some of it away because it's slowing some certain browsers down more than others (I'm looking at you, IE). Meh, serves those users right for not getting a real web browser I suppose. I wish IE didn't come with Windows so people were forced to go and look for a browser and install it themselves rather than sticking with IE and not even knowing what else was available.
Although if no browser was installed by default, I guess you'd have to wonder how someone would look for and install a browser on a fresh install...
Anyway, enough rambling about the gripping subject of the state of web browsers. I guess this counts as my first blog post on here. I need some vaguely useful subjects to comment on in future.
Anyway, the point of this blog section is mostly for my own selfish benefit, to get some thoughts out of my head and vent them somewhere, even if nobody actually reads it, it's out of my head and I'm happy... ish.
I expect some tutorials will be put up soon (because search engines love tutorials, so I'm told), and then a big rant on something that's bothering me at the moment...
Post a comment
09/04/09 |
↓ Blog Coming Soon ↓
Click here to view to full post
As soon as I bother to write something, content will appear here.
In the meantime, whilst I edit my site layout (yes, again), LOOK - TRANSPARENCY!
Post a comment