questions about order things are rendered

If you're having trouble using Context Free or don't understand the language, ask for help here.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
seanth
Posts: 12
Joined: Thu Feb 08, 2007 12:09 pm

questions about order things are rendered

Post by seanth »

All-

I am using cfdg to make scale models of plants I use in experiments. In making an animation, I was surprised to see that things seem to be rendered in a somewhat (apparently) random way.

A video example is at: http://www.ice-nine.org/seant/Lab%20rel ... Render.mov

What determines when something is rendered? It'd be really nice if I could get Context Free to generate videos in which the models of my plants appear to come up from the ground.

-STH

User avatar
MtnViewJohn
Site Admin
Posts: 882
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Post by MtnViewJohn »

Context Free draws shapes in the order of largest to smallest. It has to do it in that order to guarantee that it actually completes. The cfdg language spec does not indicate when to stop executing a recursive rule. Context Free stops when the shape gets too small to be seen. If we don't draw largest first then Context Free can fall into an infinite loop, unable to determine that the shape is too small to see.

The kind of movie that you want to create can be done by writing a Python or Perl script that generates cfdg files for each frame of the movie. You can use QuickTime or some other tool to turn the PNG file for each frame into a movie.

Post Reply