Intro RWX, AW University
Log for Saturday August 1st, 1998
Note: the models mentioned here can be seen in AWUniv at
34.5S 37.0W 2.3a 320.
===================================================================
Magine: ok....i guess we should start :)
Magine: let's take a look at the web page, ctable1 again
Magine: ctable1 is the original version, made using primitives...
Magine: below that is the script for ctable2, where the primitives
have been converted to vertices and polygons by saving the file from rwxmod
Magine: you'll notice that rwxmod puts some extra stuff in there
that can usually be safely removed...
ommm: lots of zeros
Magine: well yeah that too :)
Magine: but i'm referring to the lines right after modelbegin that
i "commented out"
ommm: ok
Magine: (removed them using the comment marker #)
Magine: those are the default values which would be in effect anyway
Purdy1: so all the transformbegin etc?
Magine: i think rwxmod puts them there just in case there's another
model in the "scene" that has an error in it
Magine: purdy, right
ommm: oh
Purdy1: wow.. thats alot of stuff!!! that is not necessary.. what
would happen if it was left there?
Purdy1: I see it in alot of files
Magine: it won't hurt to leave that stuff there, of course...but
it doesn't seem to be necessary, in my experience, and it makes the file
a little bigger, so
Magine: a lot of files?
Purdy1: yeah
Magine: on the web page you mean?
Magine: page down to "ctable2.rwx", that's what we're looking at
Purdy1: no.. rwx files that I open and retexture
Magine: ohhh, sorry
Purdy1: I see those commands alot
Magine: i see....welll yeah, rwxmod puts that stuff in there, and
you can leave it there if you want
Purdy1: k :)
Magine: i suppose it does offer some extra safety against badly
created models nearby that might have left thing messed up
Magine: for instance, sometimes you'll see black rectangles around
objects, that shouldn't be there?
Likeness: would that extra stuff make a diff in the rendering speed?
Magine: that may be due to some model in the area that has some
kind of error in it
Magine: likeness, everything you put in a file will take some time
to render, yes
Magine: although not necessarily noticably
Magine: myself, i strip the extra stuff out, and it hasn't had
any bad effect so far :)
Purdy1: cool
Likeness: k :)
Magine: anyway, getting back to ctable....i added numbers to the
vertices using fixrwx. has everyone looked at fixrwx yet?
ommm: yup
Purdy1: no
Likeness: yes
Sportster: yes
Magine: purdy, it's no big deal, but it is handy to number vertice
without having to do it manually....
Purdy1: very!!! Thanks :)
ommm: why did you number these?
Purdy1: its a prog that does it automatically?!
Magine: ommm, so you could see what verts are being referred to
in the polygon (quad) commands in the file
ommm: o
Purdy1: good for adding textures etc?
Magine: yes, fixrwx is a dos program that adds those number comments
to vertices
Magine: texmap adds texture info, and that is a windows program
:)
Purdy1: k :)
Magine: so...you can see here that when rwxmod converted the primitives
to verts/polys, it left the color commands in place...
ommm: ja
Magine: so you can use color commands as markers, to keep track
of the parts of your model after rwxmod converts it...
Magine: now, moving down to the script for ctable3, you can see
the reason for converting to verts/polys...
Magine: and here is where i need to explain UV's
Magine: :)
Magine: just a sec, looking for a visual aid i UL'ed
Magine: well anyway...
Magine: you probably all know that UVs have to do with adding texture
to a model
Sportster: yuppa
ommm: yo
Purdy1: UV's are added when using texmap on certain vertices? hence
the need to use vertex #'s?
Sportster: aha
Magine: to specifiy a texture for a model, you use the texture
command, similar to color or surface commands
Magine: "texture bitmapname"
Purdy1: right.. how do you determine where to add that command?
Magine: however, without UV info added to each vertex command,
the texture won't appear
Magine: purdy, the texture command, like color, surface, etc, affects
whatever polygons (triangles, quads) follow it, until the next texture
command
Magine: (i'm hedging while trying to get this visual aid to UL,
heheh)
Magine: ok
Magine: well, there it is, sort of
Purdy1: :)
Likeness: poop, not d/ling :(
Sportster: did you kick it
Sportster: Purdy ?
Purdy1: I got it :) yep! Kicked it good and hard!
Magine: you guys seeing blue square on black background?
Sportster: :))
Purdy1: I do
Edward: yes
Purdy1: with #'s
Sportster: no Magine :((
Sportster: still d/l
Magine: do you see the panel at all? oh
Likeness: brb
Sportster: rw-uvmap ?
Magine: yes
Sportster: :)
Magine: oh welllll, you can also look at the texmap help file,
which has the same diagram...
ommm: sorry, reboot
Magine: anyway, the thing about UVs is this.....
Magine: you can think of texture mapping as if you were pinning
an elastic sheet to the object
Sportster: ok
ommm: dig
Magine: at the vertices
Magine: and the UV values tell renderware what parts of the bitmap
should be pinned to each vertex
Magine: so actually, the UVs are nothing more than coordinates
on the bitmap!
Purdy1: parts of the bmp! cool!
ommm: k
Sportster: the same coords used for the Verticies?
Magine: they are really X,Y coordinates on the flat bitmap, but
they call them UV to avoid confusing them with the x,y,z coordinates
of the vertices
Purdy1: ahhh
Purdy1: that really confused me!
Magine: sportster, no....they are the same kind of coordinate system
(except you only need x & y because bitmaps are flat)
Magine: but the numbers are different
Sportster: ahhhhhh...got it !!
Purdy1: so on a more complex object, you can map bmp's to certain
parts...
Magine: as you can see in this diagram [rw-uvmap.rwx], all bitmaps
are given coordinates starting at 0,0 in the upper lefthand corner
Magine: and increasing to the right and down
Magine: up to 1,1 at the lower righthand corner
Magine: so UVs 0,0 refer to the upper left corner of the bitmap
Magine: and UVs 1,1 refer to the lower right corner of the bitmap
Purdy1: .5 .5 the middle?
Magine: exactly, purdy :)
ommm: where r u reading this?
Purdy1: being vertex #67 on the table
Magine: well, let's not think about the table in particular for
a moment
Purdy1: the progs do this automatically?
Magine: renderware automatically maps the bitmap onto the model
according to the UV values that you put in the rwx file :)
Purdy1: and how do we know where to put in the uv values?
Magine: texmap figures that out for you :)
Purdy1: cool!!! *whew*
Magine: but i wanted you to understand what all those funny numbers
mean, so they won't seem so intimidating :)
Likeness: scuse me, taking pic of object
Magine: you can also use UVs greater than 1, if you want the bitmap
to repeat on the surface of an object
Magine: called "tiling"
Magine: you
Magine: you're probably all noticed, for instance, how the grass
or stone texture on some walks repeats itself
Purdy1: ok.. how do you get rid of the tiles? Like on a *rug* that
you only want one tile?
Magine: purdy, you would just change the UVs
Purdy1: to read what?
Purdy1: basic example?
Magine: ok....
Magine: you don't have to calculate this yourself, since texmap
will do it for you, but just so you'll know what it does...
Purdy1: cool :o)
Magine: hm, let me see if i can get my coolest visual aid to appear,
heheh
Purdy1: LOL
ommm: xxing fingers...
Sportster: Puttin my glasses on !! :0
Purdy1: you are so helpful!!! Really!!! :o))
ommm: whooaa
Likeness: no UV's greater then 1......hmmm
ommm: woo hoo
Magine: that's just part 1 of the demo, ommm :P
Magine: [rw-tex1.rwx]
Purdy1: yes! The clock is not tiled!
Magine: you all see the globe and the clock face?
Purdy1: yes
Sportster: yes
ommm: ya
Magine: ok, the clock picture represents a bitmap that you want
to put onto the globe
Purdy1: hehe
Purdy1: so exciting!
ommm: k
Magine: it's sort of like you're moving the bitmap thru the model,
leaving the imprint behind :)
Magine: [rw-tex2.rwx 3,4,5,6,7...]
Likeness: :0) this is cool
ommm: digit
Purdy1: wow! :o)
Sportster: neat !!!!!!!!
ommm: zowie!
Likeness: hehe
Edward: excellent
Sportster: (do I hear ticking?)
Purdy1: rwx example?
ommm: what IS it?
ommm: time-space continuum..
Purdy1: can you put it up Magine? The file?
Magine: it should be here...aren't you seeing them?
Likeness: yes, see them all, very cool :))
Magine: or do you mean, can i put the file on the examples page?
Purdy1: I mean can you put the file text on the page?
ommm: puleez
Likeness: the completed one
Purdy1: :o)
Magine: heheh...ok, well this is just supposed to be a visual aid
to help you see how UVs relate to vertices
Purdy1: this is so great!
Sportster: and...even after the imprint is left on the globe....the
original remains (in back) ?
Magine: well, sportster, this is just a symbolic representation
:)
Sportster: oh...ok :))0
Magine: to show you how texmap calculates UVs
Likeness: just shows you the process
Sportster: got cha :))
Magine: each point on the clock bitmap, each UV from 0,0 in the
upper left to 1,1 in the lower right,
Magine: has to be "connected" to the corresponding vertex
Magine: so, for instance,
Magine: if the middle of the bitmap is supposed to appear at vertex
#50 (just for example) in the center of the model,
Magine: then vertex #50 would have UV .5 .5
Magine: i hope i'm not confusing the issue, heheh
Likeness: nope
Magine: now you will notice here that the clock image appears reversed
on the back of the globe
Sportster: nope...I get the concept :))))) COOL !!!!!
Purdy1: I saw that
Edward: Am I right in thinking that this is not like laying a cloth
around the sphere. If I texture mapped my photograph I would end up with
a long forhead and chin but a normal sized nose?
Magine: edward, that's right
Edward: It depends on the angle away from the texture.
Magine: now this only shows a very simple way of mapping an image
to a sphere...
Purdy1: and that can be a prob in here... wierd lookig floors and
panels if there are no tiles
Purdy1: distorted
Magine: it would be better if the bitmap were actually wrapped
around the sphere instead of just pushed thru it from one side
Magine: or, at least, if the image was only pushed halfway thru
from one side, and then again from the other side, so it wouldn't be reversed
on one side
Edward: If you look at the plante#.jpg files they are distorted.
I assume this is because they are used to texture map onto round heads.
Purdy1: and it can be done?
Magine: it can be done, but unfortunately i'm still working
on getting texmap to do spherical mapping
Magine: however, you can map from different directions, from front
or sides or top or bottom
Purdy1: ok.. and like some roof panels.. there are 2 textures..
one on each side by reversing the quads?
Edward: If you map a texture onto a cube the picture will look
correct on the front and back but the top, bottom and sides will just have
lines on them.
Magine: well, if you want a dif texture on each side of a quad,
you will have to have different vertices for each quad
Edward: ok
Magine: edward, that's right, because each side of the cube is
sharing vertices with 4 other sides
ommm: will materialmode double produce enough quads?
Magine: what materialmode double does is simply to make polygons
visible from both sides
ommm: visible but not double the quads?
Magine: however then the polygon would definitely have the same
texture on both sides, reversed on one side
Purdy1: cool
Magine: looking for another vis aid, lol
ommm: here comes...
Magine: guess i should have created these before you all got here,
heheh
Magine: hm, well it's there on the server, just not appearing....
Magine: oh well....
Purdy1: I see the rw-cube1
Sportster: it's more exciting this way Magine...thew anticipation
:)))
Magine: the point is, if you want dif textures on all 6 sides of
a cube, you have to use separate vertices for each polygon
Magine: even tho some vertices will be in the same location
ommm: interesting
Magine: so that you can put dif UV values on the verts for each
side
Magine: see rw-cube3.rwx on the example page...
Purdy1: hehe I tried to do that this morn on an existing object...
to make a trunk.. same tex on all but the top..
Purdy1: only showed the top and bottom
Magine: this blue cube with names on the sides is rw-cube3
Magine: you can see in the example how some of the vertices have
the same x,y,z values
Magine: oh yes, i wanted to explain about tiling also
Magine: going back to this picture here
Magine: the black one with blue lines :) rw-uvmap.rwx
Magine: you can use UVs greater than 1
Magine: but they represent repetitions of the same image
Magine: well, this isn't quite right, but....
Magine: hm, no, i think that's just going to be more confusing
Magine: just imagine that whatever image is on the bitmaps, repeats
itself off to the right and down
Magine: so, if you wanted to put 4 copies of the image on the model,
Magine: your would use UV 2,2 for the lower right
Magine: and 2,0 for the upper right
Magine: and 0,2 for the lower left
Magine: the upper right would still be 0,0
Magine: am i making any sense here?
Likeness: yes
Purdy1: wow!!! That sure clears that up for me! :o)
Sportster: yes
Magine: purdy, really or are you kidding me? :)
Purdy1: really!
Purdy1: LOL
Magine: ok, great :)
ommm: does texmap handle everything?
Magine: texmap creates UVs, but you have to decide how you want
to map the object
Magine: for instance, do you want to tile that image or not, do
you want the image applied from the top or side or front, etc
Magine: have you all read the texmap help?
ommm: like, could u put 4 copies on the model w texmap?
ommm: no
Purdy1: no
Likeness: no
ommm: just looked at the interface
Magine: ok, it would be a good idea to read that, i sort of explain
this there also
ommm: if we use texmap, do we need to still do things by hand?
Magine: how do you mean, ommm?
Magine: texmap isn't a modeler, you still have to make the model
byu hand
ommm: i mean, could you go thru the whole procedure in steps --
how to add texture to GPs?
Magine: ok
ommm: i mean using texmap
Magine: 1. create your model using gp's
Magine: 2. open and save it using rwxmod, to convert it to vertices
and polygons
Magine: 3. add the texture command for whatever texture bitmap
you want to use: "texture stone12" for instance
Magine: 4. open the file in texmap, select the kind of mappng you
want, and press the "go" button :)
Magine: that should do it, except you have to keep some things
in mind
Purdy1: put that command in where? what does it preceed or follow
in the rwx file?
ommm: brava!
Magine: it's the same as the color or surface commands, you
would put it before the polygon/quad/triangles that you want to have that
texture
Purdy1: is there a rule or can it go in anywhere? OK, thanks :)
Magine: you can also put "Texture null" to turn texture off, if
you only want texture on part of the model
Purdy1: ok
ommm: what size on texture files?
ommm: file size and x-y size
Magine: textures should be 128x128 pixels, because rw will resize
them to that anyway
ommm: ok
Magine: they can be any size, that is...but will appear 128x128
here
Magine: so you might as well keep them small :)
ommm: i see
Magine: it's 256x126 with the hi-res, cd-rom version of the awb
Purdy1: and if they are not 128x128, do they distort?
Magine: yes
Purdy1: like become fuzzy?
Purdy1: K :)
Magine: rw squashes them
Purdy1: I bet every texture of mine is the wrong size! LOL
Likeness: thought they were 256x256?? with hi-res
Magine: well jpgs are fuzzy anyway because they are "lossy".....when
you save a jpg in your paint program, not all the image info is saved
Magine: that's how come they can compress them so much
Magine: the data they throw away isn't usually very noticable tho
Magine: depending on the degree of compression
Magine: another point, you should probably also use the "texturemode
foreshorten" command when texturing models
Sportster: That's why I can't display a clear JPG with the creat
picture command !!
Magine: otherwise the texture may distort strangely as you view
the object from different directions
Magine: sportster, that's right....even pictures from the web get
squashed to 128x128
Sportster: thanks !!!
Magine: see these two pictures?
Purdy1: yes, one darker
Sportster: yes
Magine: [rw-pan1.rwx, rw-pan2.rwx]
Magine: the one on the left, pan2, has the "texturemode foreshorten"
command,
Magine: but the one on the right, pan1, doesn't...you can see how
it wiggles around as you view it from dif angles
Purdy1: wow! What a diff
Likeness: haha
Magine: texturemode foreshorten tells rw to adjust the image for
perspective
Magine: there is also "texturemode lit", which tells rw to adjust
the color of the image according to the lighting in the world it's in
Magine: so in active worlds, an image with texturemode lit is lighter
on the side facing the "sun"
Sportster: and this is all done through texmap Magine??
Magine: but without texturemode lit, it's the same on all sides
Purdy1: what about texturemode lit foreshorten ?
Magine: no, texturemode commands are something you put in the rwx
file
Sportster: ok
Likeness: so you can eliminate that lighting difference when you
take out the word lit?
Magine: texturemode lit foreshorten is just telling rw to use both
lit and foreshorten modes at once
Magine: yes, like
Likeness: cool :))
Sportster: yuppa...VERY cool !!!!
Magine: i guess in the time we have left, we talk about texmap's
options.....
Magine: although you can also read the texmap help file for that
:)
Magine: ...unless there are other questions? i have the feeling
that i could have been clearer today....
Sportster: no Magine..once again, you took very complicated issues
( to me anyway) and simplified them !!!!!
Edward: Its a complicated subject, you did really well.
Magine: ok...you all understand how tiling works?
Likeness: yes, very well thank you :))
Purdy1: yes :)
Sportster: I think so.....
Edward: yes
Magine: you can also take just a part of a bitmap image and use
it to cover the whole model,
Magine: by adjusting the UVs
Edward: If I used 0,0, 1,0 0,1 and 1,2 on a quad would it distort
the texture?
Magine: um, on what vertices of the quad? :)
if you put the UV info backwards, guess what? the image will appear backwards
:)
Sportster: makes sense :))))
Edward: Ok. I was thinking of using the 1,2 instead of the usual
1,1
Magine: for instance if you put UV 0,0 (upper left of bitmap) on
a vertex that was on the lower right of the model,
Magine: and UV 1,1 (lower right of bitmap) on a vertex that was
on the upper left of the model
Magine: and did that consistently for all the vertices in the model,
Magine: then the image would be upside down :)
Magine: think of it this way, when using texmap:
Magine: whatever number you put for min U will determine the part
of the bitmap that gets stuck to the leftmost verts of the model
Magine: whatever you put for max U will determine what part of
the bitmap gets stuck to the rightmost verts
Sportster: lower right most?
Magine: min V will determine what part of the bitmap gets stuck
to the top verts
Sportster: got it
Magine: pardon me,
Magine: now i've confused myself :P
Purdy1: LOL
ommm: u2?
Sportster: ..I've got the lock on cunfusion here Magine !!
LOL
Purdy1: o.o top left... 0.1 top right?
Magine: 1,0 top right
Purdy1: 1.0 bottom left 1.1 bottom right?
Sportster: 1,0 bottom left 1,1 bottom right
Magine: the first number U, is left-right
Magine: the second is up-down
Sportster: thanks :))
Magine: when in doubt, look at the diagram, heheh
Magine: 0, 0 top right
Magine: damn
Magine: :P
Magine: 0,0 TOP LEFT
Likeness: hehe
Sportster: I'll keep quite now :))))))))))
Magine: 1,0 TOP RIGHT
Purdy1: hehe
Sportster: LOL
Magine: 0,1 BOTTOM LEFT
Magine: 1,1 BOTTOM RIGHT
Magine: dunno my left from my right, lol
Purdy1: okay! LOL
Magine: heheh
Sportster: :)))
Magine: so, now do you all feel ready to start adding textures
to things? :)
ommm: we will see
Purdy1: :o) yep, will see
Magine: feel free to email me if you have any questions
ommm: great class, thanks!
Sportster: umm....sure !!! :))))
Purdy1: yes! Thanks Magine :o)
Sportster: thanks Magine :)
Likeness: tanks Magine :))
Magine: sure thing :)
Magine: next week i hope we can cover everything i forgot, lol
ommm: assignment?
Sportster: hehehehe
Magine: if you have any priorities, email me and i'll make sure
i fit them in, if possible
Magine: assignment....add textures to your models! :)
ommm: okayyyyyy!!!
Sportster: ko....
Purdy1: Okay, gotta go look at some files!! *so excited to try
new found knowledge!*
Magine: :) good luck, all of you
<Prev Next>