...
Magine: did everyone get my email and look over the materials?
rwxmod and so forth?
...
Magine: anyone who didn't?
...
Magine: well, if you didn't get on my mailing list, then email
me at magine@pipeline.com and i'll send you the materials list...
Magine: if you *did* get my email, better look those things over
by next time :)
...
Magine: question 2, do any of you have any experience with making
rwx models at all?
...
Magine: ok.....so most of you have some idea what we're doing here
:)
Magine: but for those that don't :) a quick summary:
Magine: the basics.....renderware is a set of DLLs used for 3d
programming. a DLL, if anyone doesn't know, if just a file containing various
routines that a program can call on
Nieves: Hello where is everyone?
Magine: the active worlds browers, this thing we're using, calls
upon the renderware DLLS (rw) to draw everything we see here
Magine: ...up here nieves, on the balcony....
Nieves: ok sorry I am late
Magine: mainly, the awb uses renderware scripts, which is what
rwx files are
Magine: rwx files are just lists of commands that tell the awb
and rw how to draw each object or model
Magine: this IS the *intro* class :)
Magine: anyway.......rwx files are zipped before putting them on
a world server, but otherwise the awb uses them "as is"...they don't need
to be compiled or anything :)
Magine: (don't laugh, i had someone in the first class who was
unclear about that)
Magine: any questions so far?
...
Magine: ok, terminology.....
Magine: first polygons.
Magine: everything that rw draws in actually made up of flat, 2d
shapes of 3 or more sides, called polygons
Magine: a 3-sided polygon is a triangle, 4-sided is called a "quad",
and more than 4 sides is just called a polygon :)
Magine: since rw can draw triangles and quads faster than polygons
of more than 4 sides, most objects are made out of mostly triangles and
quads
Paul: I've seen the term ngons what does it mean?
Magine: but when i use the word "polygon" in class, you should
know i'm including trianlges and quads...
Magine: ngon...hm, i would guess that just refers to polygons,
paul
Paul: ok
Magine: as in "n-sided"
Builder M: I am just 12 tell me the hard stuff so i can understand
it
Magine: we'll get to it, BM :)
Magine: just a sec, need to find a demo model here :)
Paul: Better go easy on the sugar, BM or you won't make it through
5 of these 2 hr classes.
Builder M: what
Builder M: ahh
Magine: ok, there it is [rw-sph3.rwx]...sorry for the delay
Magine: anyway, what i wanted to show you is how even a sphere
is made out of polygons
Magine: or avatars.... [see wiregrrl avatar]
Builder M: brb please wait
Magine: anyway.....polygons are made out of connected "vertices"
(or "verts") ...singular, "vertex"
Paul: You've got alien bones
Magine: a vertex is simply a point in space
Magine: like these red balls here represent vertices that make
up a polygon
Magine: when they're connected,
Magine: ...they form a polygon
Magine: one of the peculiar qualities of polygons in rw, is that
they only have one side....
Magine: if you look at this poly from the other side, you won't
be able to see it :)
selda: surface normals?
Magine: but i'm getting a little bit ahead of myself here.....
Jakknife: Like the anim4x4 objects in aw
Magine: jak, that's right...
ombili: how come there`s only one side ?
Magine: all polygons only have one side, ombili :)
Magine: if you want something to appear to have 2 sides, you have
to make another polygon for the other side :)
ombili: ok
Builder M: like quad 1 2 3 4 and quad 4 3 2 1
Magine: the side of the polygon that shows, depends on the order
that you list the vertices, yes BM
Magine: but let's back up a second, because i wanted to explain
about vertices....
Builder M: so if you just add quad 1 2 3 4 *drifts off thinking*
*smirks*
Nieves: Where do you list them?
Magine: nieves, i will get to that, i want to explain the abstract
concepts first :)
Nieves: ok
Magine: so....a vertex is described in terms of it's position in
3d space, using 3 numbers
Magine: called x, y and z
Magine: as you see on this model here with the arrows
Magine: the first number, x, describes the position of the vertex
in terms of left and right
Magine: 0 is the center, positive is to the right and negative
is to the left of center
Magine: the second number, y, descibes the vertex's position in
terms of up and down
Magine: and the third number, z, describes the position of the
vertex in terms of depth, toward you is positive, away is negative
Magine: oh, i forgot to say, with y, up and down, up is positive
and down in negative
Magine: so, getting to rwx files,
Magine: to create a polygon like this,
Magine: you would first describe each vertex by listing it's x,y
and z coordinates
Magine: like "vertex .2 -.4 1"
Magine: if you open your web window and click on that blue sign
over there, you can see an example
Magine: everyone got it?
Paul: yes
Nieves: looking
Builder M: yes
ombili: no
Magine: the first example, rw-poly2.rwx, is this polygon we're
looking at (minus the red balls, which i added here to show you the vertices)
Builder M: brb
Nieves: They are very precise numbers
Nieves: right to the decimal
Daphne: Sorry I'm late Magine.. RL birthday party interferred with
online iimportant stuff.. *G*
Nieves: how do you calculate them?
Magine: yes, nieves, but one of the things you'll see in this class
is how you can let rwxmod figure out those numbers for you :)
Magine: for now, i just wanted you to see a very simple rwx script....
Nieves: ok
Builder M: I am skipping this c class and coming to next one?
Magine: every script begins with "modelbegin" and ends with "modelend"
ombili: ok i got it
Magine: also, every script needs at least one "clump"....but don't
worry about clumps yet, just know that every script needs at least one
:)
Nieves: clump means??
Magine: a clump is just a convenient way of arranging a model into
parts
Magine: in many cases, a model will only have one clump
Nieves: ok
Magine: but, for something complex, there are reasons why you might
want to divide it into parts
Magine: the next line in the script, "addhint editable" is not
always necessary...it's a hint that you are giving rw about how to draw
the model
Builder M: I have to go can i ask you real quick how to loop iteams
how to add two iteams in one script
Magine: talk to me another time, BM
Builder M: after class?
Magine: sure
Builder M: k
Magine: the vertex lines describe the 7 verts at the corners of
the polygon, and the "polygon" command below that links the verts together
to make the polygon
Magine: the surface command describes the way light reflects from
the object
Magine: and "color" describes the red, green and blue proportions
making up the model's color
selda: are the vertices listed in a specif order (clockwise)?
Magine: yes....selda, that is what determines which side the polygon
is visible on :)
Nieves: If I understand correctly always in xyz order?
Magine: the numbers in the "vertex" lines are always in x,y,z order
selda: which order are each vertices listed in?
Magine: and each vertex command is itself implicitly numbered
Magine: if you skip down the web page to rw-cone3.rwx, you can
see how i've numbered the vertex lines
Magine: the "#" is used in rw scripts for comments; anything to
the right of a # is ignored
Nieves: so bascially this is creating an object is like writing
a short program?
Magine: exactly, yes
Magine: each line in the rwx script is an instruction that you're
giving renderware :)
Paul: Aren't your verts in counterclockwise order in terms of 3D
space?
Magine: ....so, what i wanted to make clear in case it's not obvious,
is that those numbers in the "polygon" command refer to the vertices listed
about
Magine: (paul, yes, counterclosewise is the visible side)
Magine: the first number in the polygon command, the 7, is the
number of vertices,
selda: thanks
Magine: followed by the vertex numbers,
Magine: similar to the polygon command are the "triangle" and "quad"
command, which are more common
Magine: they're the same idea, except they don't need the first
number that tells the number of vertices,
Builder M: I will be back at 9:00
Nieves: When you say that the first number is 7
Magine: since triangles are always 3, and quads 4
Nieves: you are talking about the rwpoly2.rwx?
Magine: the first number in the polygon command, in rw-poly2.rwx,
refers to the number of vertices in the polygon
Magine: you could, for instance, have a polygon with more sides...say
12, then the first number
Nieves: got it!
Magine: would be 12, followed by 12 vertex numbers
Magine: so, is everyone clear on vertices and polygons? :)
Nieves: yes
Jakknife: yes
selda: yes
Moorea: yes
random: yes
ombili: maybe
Magine: heheh
Magine: what's the question, ombili?
ombili: i`ll wait later
Magine: ok
Magine: well, next we will discuss graphics primitives...which
you can use to simplify all this vertex and poly stuff, and which are the
basis for much of this class
Nieves: I didn't get a chance to download the programs you suggested,
will we use them tonight?
Magine: often, instead of calculating all these vertices, you can
use graphics primitives (gp's i'll call them) to create shapes for you
Magine: no, nieves, i just wanted you to have an idea of what i
was talking about when i refer to them
Nieves: ok
Magine: gp's are commands that create simple shapes like cones,
cylinders and spheres
selda: like geometric primatives in vrml?
Magine: those are probably the same thing, selda, yes
Magine: for instance, you can see the second example script on
the web page, rw-cone1.rwx...
Magine: this it what it looks like
Magine: just a single line produces this cone :)
Magine: the three numbers following the "cone" refer to the cone's
height, width at the base, and number of sides
Magine: and btw, in aw one meter is about .1 in rw scripts
Magine: so this cone is about 2 meters tall
Magine: there are also gp commands for cylinder, sphere, hemisphere,
block...
Magine: you can look them up in the rwapi.hlp file that mentioned
in the email.
Magine: btw, i should mention that...the rwapi.hlp file lists all
of the rw commands and brief descriptions
Magine: in the section of "scripting language"
Magine: the rest of the rwapi.hlp is about writing programs like
the awb, and doesn't concern us as much
Magine: here are the gps all lined up for you :) (rw-gpver.rwx)
Magine: now the neat thing about gp's, is that they can be converted
into vertices if you want, by using rwxmod
Magine: just open a rwx file with rwxmod, and save it, and any
gp commands in it will be converted to vertex and polygon (triangle, quad)
commands instead
Magine: the value of doing that will become clear when we get into
textures later...
Daphne: LOL I was just going to ask the value of converting too..
*G*
Magine: daphne, it's also good because you can then manipulate
the vertices and polys to reshape your model
Magine: anyway...i want to leave you this time with the knowledge
to start playing around with the gp's themselves, so in the half hour we
have left i want to talk about moving things around inside a model :)
Daphne: I figured there would be advantages in "fine
tuning".. *S*
Magine: there are several commands for controlling the positioning
of shapes in a model, or the whole model itself
Magine: first, the translate command
Magine: you can see an example on the web page, rw-trans1.rwx....
Magine: the 3 numbers after the "translate" describe relocating
the part of the model that follows, in x,y and z coordinates
Nieves: y
Magine: hm, i thought i had a model here to show you
Magine: anyway, you can see in the example script that each of
the 3 spheres is moved vertically (the y coordinate) so the model is 3
spheres stacked on top of each other
Nieves: This would make a change in the object or cause motion?
Magine: there's the model...
Magine: it doesn't cause motion, it's just a way of repositioning
parts of the model
Magine: for instance, with rw-tran1.rwx here,
Magine: without the translate command, all 3 spheres would be in
the same place
Magine: the translate command is used to make the green sphere
appear about the blue, and the red about that
Jakknife: above=about ;)
Magine: right :)
Paul: Is there an absolute translate, so they aren't cumulative?
Magine: for that you use the transformbegin...transformend commands,
paul :)
Magine: everything in a rwx script that follows a translate command
will be affected by that command
Magine: unless you use transformbegin and transformend, which limit
the effects of translation, rotation and scaling to the area between the
transformbegin...end
Nieves: Therefore it take the same three series of polygon and
relocates them?
Magine: in the example rw-tran1.rwx, the effect is cumulative,
because transformbegin...end isn't used.
Magine: but suppose i had wanted the red sphere to be to the left
of the blue sphere, instead of on top
Builder M: back
Magine: i could have put "transformbegin" before the first translate
command,
Magine: and "transformend" after the (green) sphere command
Magine: then, the next command would start out "fresh" without
the upward translation
Magine: and i could out "translate -.12 0 0" instead, to move the
red sphere to the left instead of up
Magine: i don't know if that's clear or not :)
Builder M: not clear
Nieves: not very unfortunately
Magine: ok...the next example, ctable1.rwx, may clarify.
Jakknife: Think I'llundstnd after doing it.
Magine: this is ctable1, a little cafe table i made from primitives.
you can see that it's made from discs and cones...
Magine: (disc is another gp i forgot to mention, oops)
Magine: the various go commands will make more sense when you look
at rwapi.hlp
Magine: gp commands, that is
Magine: but in the example script for the cafe table, you can see
how transformbegin and transformend are used,to limit the effect of translate
and rotate to a particular part of the model
Builder M: huh
Nieves: Do you have a sample of the table?
Nieves: Maybe it would help to see it
Magine: it's right here in front of me :)
Nieves: Yes I see it now sorry
Magine: all of these models are on the awu server and you can create
them yourselves to look at them....
Magine: use ID Student3 and privledge password crayon
Magine: (login/privledges menu)
ombili: do we do it now ?
Magine: so does everyone get the translate command? :)
Nieves: I see so the cone like figure is used twice I see
Magine: i meant if you want to come here between classes, ombili
ombili: ok
Magine: yes, nieves
Jakknife: yes
Magine: ok, the other positioning command i want to mention tonight
is the rotate command
Nieves: So basically this table is made with 4 shapes?
Magine: well, there are more than 4 because each disc needs two
sides,
Magine: remember polygons only are visible on one side :)
Magine: and there's that disc at the top too, in the middle
Nieves: The dics being the top and bottom shapes correct?
Magine: yes
Magine: 6 discs actually
Nieves: middle? is that not a cone?
Jakknife: i see.
Magine: middle of the top surface, i meant
Magine: 6 discs...3 with 2 sides each, that is
Jakknife: have to get close
Magine: disc 1, the base, disc 2 the top, and disc 3 the solid
disc in the center of the top
Magine: the quickly mention the rotate command......it's a little
confusing so i will discuss it next time also....but basically, the simplest
way of using it
Nieves: I see the center of the table has an additional disk
Magine: ("to quickly mention", i meant)
Magine: ..simplest way of using rotate is to put a "1" for the
axis that you want the object to be rotated around and 0 for the other
2 numbers in the rotate command
Magine: for instance, to rotate something around the y (vertical)
axis, you would put "rotate 0 1 0 45" to rotate it 45 degrees, for example
Magine: or -45 to rotate it in the opposite directions
Magine: for instance, here's a cone rotated 90 degrees around the
x axis...
Magine: the command would be "rotate 1 0 0 90"
Magine: this cone, rw-rot2, is rotated around the y axis...but
you can't really tell since it looks the same however you turn it on that
axis
Magine: and rw-rotz.rwx here (pardon me jak) is rotated around
the z axis (rotate 0 0 1 90)
Magine: does that make sense to everyone?
Jakknife: yes
Nieves: sort of
selda: yes
Blooms: :)
Magine: ok....well we are runnning late so the color and surface
commands will have to wait til next time, altho you can look them up in
the rwapi.hlp to get some idea.....
ombili: it`s better
Nieves: ok
Magine: but your homework assignment, should you decide to accept
it :) is to create a simple model using several graphics primitives and
the translate/rotate commands...
Magine: strictly optional of course :)
ombili: thanks
Jakknife: Will do. ;)
selda: thnks Magine
Magine: sure thing, selda :)
Daphne: Magine,, Thank you for your time and patience ...
*hugs* See you next Tuesday, hon...
Magine: well, hope i have been more clear than confusing :)
Nieves: Thanks Magine :-))
Magine: see ya all next time....email me any questions you have
Jakknife: ditto to Daphne
random: thanks Magine
Daphne: btw.. Is there a place to have the models we
make shown off?? *S*
ombili: thank you Magine
Daphne: just send you the rwx file maybe??
Magine: also i'd like it if you'd email me about anything i could
be more clear on, sort of get some feedback :)
Magine: daphne, we can show off the models here next time if you
email them to me :)
Jakknife: cool
Nieves: I was late will a get a log
Magine: yep, you will all get the log
Magine: :) have fun modelling :)
...
Magine: night all...poof! :)