Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Ogre3D

I would like to put some space junk in my game environment. Make it look like the first 2 search results. Those junks don't need to be interactive. Just need to have a 3D junk circling around the earth.

Can the community give some suggestion on how to implement this? Should I use particle in Ogre3D or create entities for those junks, or any other approach? If using particle, how should I make the object still and spread out around the earth? Thanks.

share|improve this question
    
Space junk is usually invisible to the naked eye - maybe you meant asteroid fields? google.com/images?q=asteroid+field –  egarcia Oct 21 '10 at 13:15
add comment

2 Answers

up vote 2 down vote accepted

Particles would be a decent solution. It really depends on how close the player will get to the junk.

For positioning each piece of junk you can generate a random direction vector, and a random float called distance. You would then position that piece of junk at direction * (minimumJunkDistance+distance).

To have it circle the earth I would simple apply trigonometry to have it move on a fixed orbit at a fixed velocity.

I'm not sure if Ogre automatically does this, but it would be nice if the junk fades out before it hits the camera's near plane to stop it from dissapearing suddenly.

share|improve this answer
    
Clear and concise, +1 –  Jishaxe Jan 22 '13 at 19:09
add comment

Use an Ellipsoid emitter for your particles.

There is an example of the Ellipsoid here: http://www.ogre3d.org/tikiwiki/ParticleExampleSun&structure=Cookbook

Since you want the particles fixed in space, you will need to experiment with the time_to_live, duration, etc.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.