The templates on this blog are viewed best in Internet Explorer 7.
Choose a style!
Halos
Rounded Rectangles
Soccer Field
Chrome

None

BlenderBoy's Blender Blog
Aug. 5, 2008

Faking Object Shadows -- Great Camera Setup

Posted in Blender 3D
I received a comment asking how I did the shadows and camera setup in my Car Game.


Shadows: The shadows are are not actual shadows (you have to fake the shape) but are very easy to make.

 1. In the mesh that you want to have the shadow for, make a plane, subdivide it (if you need to), and make it the right shape for your object.

 2. Then, in the 'Editing' buttons (F9) and in the 'Texture Face' panel, set the faces to 'shadow'. Now they will drop strait down the global Z axis and set on the next face that they hit when you start the game engine.

 3. From what I can remember, you need to make sure the face is even, in the 'z' direction, with the object center. To get the right effect, you should also add a semi-transparent material to the shadow faces.



Camera Setup: This is a little more complicated, but all it is, is a bunch of empties and a small script.

Here is a '.blend' file with just the camera setup: Camera Setup.blend. (right click, select 'Save target/link as')

For illustration purposes:


  Empty #1: The Camera!

  Empty #2: The parent of the camera. The script sets the location of this empty to the location of Empty #3.

  Empty #3: This empty is independent. It always tracks Empty #4, and moves toward it at a certain speed. The speed is defined in the script using a certain formula which makes it faster when it is farther away and slower when it is closer.

  Empty #4: This is the main camera position. It sets it's location to the location of one of Empty #6's ray's collision points or the location of Empty #5 if there is no collision. (was that understandable?)

  Empty #5: The location of Empty #4 when there is no collision. It has a location ipo so that it will match the distances of the collision rays from Empty #6 when you change the camera distance during the game by pushing 'c'.

  Empty #6: Parent this to the object you want to follow. This also sends the rays that determine camera collisions.


On the slight chance that you were able to understand that (I'm not a very clear writer most of the time), you now have the basic functions of the setup.
Comments (22) Post A Comment! Permanent Link


About Me

My name is Stephen. I am a Christian, homeschooled sixteen-year-old. The goal of this blog is to display some of the graphics I have created via Blender.

Blender is an open source 3D graphics creation program. It lets you create high quality 3D graphics and movies, and replay real-time, interactive 3D content. It is extremely fun!

Links

Home
View my profile
Archives
Email Me
My Blog's RSS
Tags
Blender Web Site
Blender Tutorials
BlenderNation.com


(yes, it's free!)

Friends

Because my friends list was getting too long for easy navigation down my side bar, I have changed it so it will not be there by default. You can turn it on and then off again by pressing this button.
BlogBoy
AnAmericanGirl
LibertyandJustice
Disneylandguy
chimpzrool
ILoveBaseball
TMoore
MBF
treehouseisland
Jonathan
msquid
IceJet
girlonfire
rejoiceinhope
purpleprincess
NOSboy11
antelopehead
MasterWindu
Politicalguy
JesusLovesU
BlenderBoyTestingBlog
Mater
pcboy
quadguys
Patches
poprocksandcoke42
mbullard
tylerscrashsite
teenforchrist
crazy4jesus
dtalkers
FABLEBOY101
Yankees213
Catcher818

Joyful24
bluidprinces
wings
Alainia
Karrinna16
greenpeppermint

Other

Page 1 of 1
Last Page | Next Page








These are all the recent main pictures on this blog.
Click the button below, then click a picture to see it full size.
All graphics and templates Copyright © 2009 BlenderBoy (author) - All Rights Reserved