Thursday, March 5, 2015

Class notes 3/5: 3D animation and OpenGL

can do "moderately interesting" things with 3D animation in Max

there's a center point (0,0,0) around which everything is measured

OpenGL has lighting capabilities to determine direction of incoming light

reminder: use qmetro instead of metro, since it's ok if a frame of video gets dropped

jit.gl.render object --> render means turn something into a usable output, so it draws whatever it thinks it should draw and puts it out

send a message "erase, bang" to jit.gl.render to clear the previous information and give us the new information

give jit.gl.render object @erase_color 0. 0. 0. 1.--which means no red, no green, no blue, full opacity--when it erases, it's black--RGBalpha for this object (not the same order in every object)

jit.gl.gridshape object --> makes lots of tiny triangle drawings and stitches them together to make your picture--@shape attribute: sphere, cube, taurus, all kinds of things--put in pak position object 0. 0. 0.  so initial position is at origin--if you give it no size information, it will pretty much fill up screen

to automate something moving through space, have program running to continually change x, y, and z values--can use line objects or any algorithm you can dream up

check jit.gl.gridshape's attributes in inspector window--there's a lot--also check OB3D attributes, which are all available to any GL object

attrui object--type in gl_color, it gives you a menu--when you make an attrui object, it gives you the options to change that attribute in selectable form, either a menu or a continuum

@lighting_enable --> turns on lighting capabilities, otherwise looks like light is coming from all directions

jit.gl.texture object --> whatever you send into this can be referred to with the @texture attribute of jit.gl.gridshape--texture can be an image or a movie that will play in that shape

depth enable attribute--> can decide which objects are in front of & behind other objects

can also put a movie on a plane to put it in 3D space--> jit.gl.videoplane

to change name of a string of jit objects, send message drawto [new name]

pak camera object--> tells where your camera is coming from, position can be controlled just like a gridshape

nurbs is a cool concept--you have a 3D shape, and you have points that protrude or intrude to distort it--can put an image or video on the shape to see the image or video distorted

jit.gl.physics or jit.gl.physdraw (or something like that) object--> should emulate some natural physical movements, like a ball bouncing against a wall

jit.gl.multiple object --> if you want a whole bunch of the same thing, instead of adding shapes or whatever individually--once it reaches the maximum number you specify, it'll stop

*from reading: wireframe mode allows you to see 3D shapes as a grid

No comments:

Post a Comment