Genetic algroithms applied to scene rendering

Started by
15 comments, last by Cedric 20 years, 6 months ago
heh, all GA methods are slow so to get a good result, no real surprise there

Yann, didn''t you mention you used a set of weights to control the equation & selection of splitting planes in your ABT? Couldn''t you do this on a smaller scale and use the GA to control them instead of the whole tree generation?

Then you could train a good set of generic weights, and run the GA on each level to try and see if it can tweek them in a specific case.
Advertisement
What about a neural network for this job, could be more adapted than GA ? I''m not sure about the outputs that it should produce..It looks like one would need need an extra large hidden layer and tons of inputs.
I''m not an expert in 3D rendering techniques, but I am fairly experienced with GA''s so I''ll put in my .02 here.

If I understand correctly, efficient culling basically boils down to being able to split your scene up into groupings of triangles that you will use so you can cull entire groups at once instead of testing each individual triangle. This is then extended to support a hierarchy of triangle groupings (ie. quadtrees, octrees, etc) [not really sure what an ABT is, but I''m guessing its some kind of alternative to quadtrees].

You could definately use a GA to find an efficient "non-regular" grouping of triangles that produces efficient culling. The way I would do it is first create the geometry for your scene. Then create a playable version of the game that either uses per-triangle culling and will only run on very beefy computers, or use lower-quality geometry to create this playable version. Have a bunch of people play-test this version, and have code that will log the camera position and orientation for every frame. Once you have enough of these logs you can create a weighted map of your scene that determines what camera locations occur most often and least often. You can then design a GA that will generate a hierarchical grouping of the scenes geometry and use this weighted map of camera locations to choose say 100+ viewpoints to use to render frames from and recording how efficient this specific triangle grouping is (this will be your fitness function).

Yes, this will take a very long time to run. You will probably need to set it up on a top of the line PC and let it churn away for a month or so. If you develop it in a distributed manner (which this specific GA lends itself to very naturally) you can use the idle time of all the computers in your company to do the computations. I would expect a properly designed GA to be able to generate a triangle grouping that is drastically better than any generic approach such as quadtrees or octrees.
One approach is to start out with every triangle in the level that will be drawn together ( same materials, etc. ).

Then, find local clusters of these somehow, and create a bounding box for these.

I suppose the GA could contain rules about when to split a cluster, or how to decide on which triangles joined a cluster.

This seems like quite a lot of overkill, though. A per-material AABB tree or ABT with a notion of node size hueristics could probably do 99% of the optimal solution in terms of fps.

Remember the goal is not >95% culling efficiency, but >95% potential frame rate.

Culling efficiency limits frame rate at the low end, but then has very little effect at the high end. That''s how you know you''re doing it right.
Of course you could always develop your fitness function so that it rewards framerate instead of culling efficiency. That would alleviate your concerns about that. But now I am curious as to how much improvement a GA generated "triangle tree" (not sure what the appropriate term is) will have versus an optimized traditional method. Sounds like a good masters project.
quote:Original post by Anonymous Poster
What about a neural network for this job, could be more adapted than GA ? I'm not sure about the outputs that it should produce..It looks like one would need need an extra large hidden layer and tons of inputs.

I used a NN to create ABTs for quite some time. Eventually, I replaced it by more conventional heuristics. The NN gave very good results, but was just too resource hungry - very slow convergence rate, and it used tons of memory. The new heuristics are much, much faster and give only slightly worse results.

As for the GA, it would probably be possible with a rules set as SimmerD mentioned. It could be combined with a classical approach, but shifting weights as the creation of the tree advances. But I won't even dare to imagine the time needed for even a moderately complex scene...

Edit: unless you have a massive parallel architecture, such as a cluster. Although synchronisation could be an issue.


[edited by - Yann L on October 17, 2003 9:48:44 PM]
I used a NN to create ABTs for quite some time. !!
If you dont mind, could you tell us what inputs & outputs you had?
Thanks!

[edited by - aboeing on October 18, 2003 1:13:49 AM]

This topic is closed to new replies.

Advertisement