View Full Version : Grass animation
03-15-2012, 05:22 PM
I am supposed to do a project on grass animation as my course work- "computer animation and simulation".
Can anyone please help me on how do i start the project. I am completely new to this field. I am not supposed to use any tools like maya, I have to use opengl and code in C++ to get he desired result. Can anyone please tell me how do i start programming? Do you have any code snippet for the same?
University of Houston, Texas.
03-15-2012, 05:32 PM
Don't your professors at your university teach you things? Like how to draw things, how to transform them, etc?
I'm guessing how you would start is by drawing a blade of grass. If you can't do that, then draw a triangle. Then figure out how to draw lots of them. Then draw them with different orientations. Then animate those orientations based on time.
Start real simple. For example, try to animate a single, green rectangle, getting longer. When that's working, put it into a subroutine that gets called 1,000's of times. Use random number generators to position and scale each blade of grass differently. Then go back into the 'blade' subroutine and add more detail, like a triangular tip to each blade, multiple rectangles making up the body of the blade, and a little bit of curvature to each blade by slightly rotating each rectangle making up the body of the blade relative to its parent. Piece of cake! Sounds like fun, actually.
03-19-2012, 11:48 AM
Thanks MaxH. Actually, I haven't used opengl up til now. So I am learning the concepts of OpenGl. I was wondering if there is any good tutorial/video which explains me concepts of shaders in opengl.
You don't have to use a shader to do your assignment. If you're satisfied to use the older, fixed pipeline, form of GL, I'd suggest the NeHe Tutorials. They give you source code for different operating systems.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.