Export to GitHub

google-highly-open-participation-psf - issue #322

Add soy.meshes.Billboard class which renders a material on a quad


Posted on Jan 9, 2008 by Helpful Giraffe

A "billboard" is a quad (rectangle) which is always rendered facing the camera, sometimes called a "sprite". There are numerous tutorials for doing this using OpenGL. soy.meshes.Billboard must render such a quad with optional axis-alignment set via boolean property.

A soy.meshes.Mesh class handles rendering by the orientation and position of the soy.bodies.* it belongs to, each mesh can potentially belong to many bodies.

As can be seen in the code ( http://svn.pysoy.org/trunk/pysoy/src/meshes/Mesh.pxi) the only OpenGL code needed to implement this is that specific to billboards; soy.bodies.Body has already transformed into the scene and the Billboard's .material property will handle color/texture/etc.

The source can be obtained through svn co http://svn.pysoy.org/trunk/pysoy

Completion:

Commit the work to http://svn.pysoy.org/, attach your diff(s) to this task, and contact the ghop-python mailing list.

Relevant webpages:

Task duration: please complete this task within 5 days (120 hours) of claiming it.

Comment #1

Posted on Jan 12, 2008 by Happy Horse

I claim this task

Comment #2

Posted on Jan 13, 2008 by Happy Horse

I think I have finished this issue. Here is diff for this issue. I cannot commit it into http://svn.pysoy.org/ because I don't have access

Attachments

Comment #3

Posted on Jan 13, 2008 by Happy Ox

Looking good! Only thing it's lacking is a way to change size, perhaps a .size property and doing some trivial matrix math.

Comment #4

Posted on Jan 14, 2008 by Happy Horse

Already done

Comment #5

Posted on Jan 14, 2008 by Happy Ox

Confirmed, this task is complete. Very elegant solution and quickly implemented.

Comment #6

Posted on Jan 14, 2008 by Happy Horse

(No comment was entered for this change.)

Comment #7

Posted on Jan 23, 2008 by Happy Ox

adding tag for student

Status: Completed

Labels:
pysoy opengl ClaimedBy-dev.jrx