Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
SimAnt-lite

SimAnt-lite

2003-11-24       - By NoiseCrime

 Back
Reply:     1     2     3  

-- -- Original Message -- --
From: "Adam Kane" <akane@(protected)>

> Not really a game, but here's an educational simulation about how ants
> behave.  As it gets going, you see the ants wander around until they find
> food and then they return home - leaving a scent trail as they go for
> their nestmates to follow.

Very nice, always been fascinated by Ants, Ant colonies, and their use of
pheromones. Its a good start, and has plenty of scope, but rather annoying
that some features aren't implemented yet ;)

> - framerate
Rather low I thought, avg 20 fps

> - camera controls
Would rather not have to select different camera modes through the buttons,
why not use modifier keys as well? e.g. left click and drag pans view,
rightclick of shift click and drag rotates (or better orbits around a fixed
point)

> - ideas to bump up fun-factor
A Magnifier glass and light source,
Hot water
Predators

Probably a good idea to check out previous simulations
SimAnt,  AntWar (http://www.antwar.com/) and a basic simulation here
http://klaudius.free.fr/


> - bugs/crashes
none, although one time I ran it, several ants caught stuck walking into
each other for some time.

> - optimization suggestions

1. General
First off don't forget to look at other ares not just the 3D to optimise.

Are you using modelsunderray for Ant placement on terrain (height)?
If so make sure you're not casting straight along the world axis (e.g.
0,0,1) instead offset it slightly (e.g. 0,0,0.9999). There is a bug which
makes the axis cast so much slower.

2. Pheromone
What resolution do your spheres have?
Looks quite high, could be worth setting it lower, or allowing the user to
tweak it themselves.

You might want to consider collapsing several spheres together in a single
mesh. The reasons for this have been discussed at length and basically
revolve around minimising the number of models in the scene, you should be
able to find more info in the archives.

However collapsing for spheres might be problematic, and certainly start to
get slow if you 're combining many polygons.So perhaps look to move away
from spheres, and use a different primitive, one with less polygons, and
could be collapsed together easier. Alternatively how about 2 or 3 pheromone
models, each containing 1,2 or 3 pheromone meshes collapsed into a single
mesh. That way as you drop pheromone, you can check if two or three
consecutive ones could be replaced with single mesh version. This should
work for 2 quite well, 3 would be used less as it requires them to be in
line.

Actually taking this to a logical conclusion, I'd suggest maybe ditching the
spheres (they tend to obscure whats going on anyway. Instead look to use
quads, with a nice pheromone picture on it (e.g. a green circle), and place
that instead of spheres. You'll have to play with the no-depth settings for
the mesh (and therefore the draw order) to ensure they remain above the
terrain. Again you'll want to collapse these quads/decals together into a
single mesh periodically to keep the model count down.

Alternatively try putting the pheromones indicators into an image, and
upload it as a texture. You could use multi-texturing, so the first pass is
the pheromone trials, the second the terrain. You need to map from
worldspace to imagespace and draw a pixel for each pheromone.

3. keyframeplayer
> (specific to a bunch of small - 200 poly - keyframed models running about)

Ah, now herein lies you're problem.
I was going to suggest a method I've been experimenting with until I noticed
you were talking about keyframeplayer not the bonesplayer.  So I decided to
double check and rip you're dcr, to see how the Ants were built. In doing so
I think I've found the main culprit for the poor performance and one that
will seriously inhibit the number of ants you could have in the scene.

Basically each Ant uses 12 separate models and its this fact alone,
irrespective of the number of polygons in an Ant as a whole that is the
problem. As I said earlier the biggest performance gains are made by using
as few models (and models with submeshes) as possible.  As the number of
Ants increases the number of models increases 12 times, and very quickly
you'll end up with hundreds of models. I think the single most effective
change you could make at this point is to rebuild the Ants as a skinned mesh
and use the bonesplayer instead. Sure the amount of vertex manipulation will
be the same, between the bonesplayer and keyframeplayer, but importantly
you'll only have a single model per Ant!

The only issue is I noticed the Ants have several shaders, you'll need to
reduce this to a single shader, so possibly move to using a texturemap or
vertex colours (as long as you use a directional light in the scene).

With this 1 to 1 mapping of 1 Ant has 1 mesh, you should gain performance,
and I think especially when/if you start to use a much higher number of
ants.


Hope this helps

NoiseCrime 2003
www.noisecrime.com
Purveyor of cool Shockwave games, toys and new media content.






__ ____ ____ ____ ____ ____ ____ ____ ____ ____
Dir3d-l mailing list
Dir3d-l@(protected)
http://nuttybar.drama.uga.edu/mailman/listinfo/dir3d-l