Tricky jump-through floors

Questions and answers about the how and why of making maps.
Post Reply
User avatar
ClayOgre
Private First Class
Private First Class
Posts: 227
Joined: Mon Apr 18, 2005 3:17 am
Location: Southern Indiana (originally from Alaska)

Tricky jump-through floors

Post by ClayOgre »

The "Tower" map objects by LouMan allow you to jump up through the underside of a floor and land on the upper side. How is this done? I removed the "drivethrough" tags and the ability to do this went away. Is this something that can only be done with pure meshes? If you use drivethrough with a meshbox, you just jump through it and fall right back down instead of landing on the top side. Is it a function of a material?
User avatar
LouMan
Chief Sgt. of Cartography
Chief Sgt. of Cartography
Posts: 338
Joined: Mon Jan 31, 2005 3:05 am
Location: Michigan, USA

Post by LouMan »

Using a meshbox with the drivethrough option makes all 6 sides of the meshbox drivethrough (correct me if I am wrong, anybody). Using a simple mesh that defines all six sides, however, give you the ability to define which "sides" of the box are drivethrough. I made the "under" side of the boxes I created for the tower drivethrough, but left the "top" side of the boxes alone (no drivethrough) in the faces section of the mesh definition. An example of this is as follows:

define box
mesh
vertex -0.500000 0.500000 0.000000
vertex 0.500000 0.500000 0.000000
vertex 0.500000 -0.500000 0.000000
vertex -0.500000 -0.500000 0.000000
vertex -0.500000 -0.500000 1.000000
vertex -0.500000 0.500000 1.000000
vertex 0.500000 0.500000 1.000000
vertex 0.500000 -0.500000 1.000000
normal 0.000000 0.000000 -1.000000
normal -1.000000 0.000000 0.000000
normal 0.000000 1.000000 0.000000
normal 1.000000 0.000000 0.000000
normal 0.000000 -1.000000 0.000000
normal 0.000000 0.000000 1.000000
face
vertices 0 1 2 3
normals 0 0 0 0
matref BottomSide
drivethrough
endface
face
vertices 4 5 0 3
normals 1 1 1 1
matref Side1
endface
face
vertices 5 6 1 0
normals 2 2 2 2
matref Side2
endface
face
vertices 2 1 6 7
normals 3 3 3 3
matref Side3
endface
face
vertices 3 2 7 4
normals 4 4 4 4
matref Side4
endface
face
vertices 4 7 6 5
normals 5 5 5 5
matref TopSide
endface
end
enddef
User avatar
ClayOgre
Private First Class
Private First Class
Posts: 227
Joined: Mon Apr 18, 2005 3:17 am
Location: Southern Indiana (originally from Alaska)

Thank you

Post by ClayOgre »

I did some fiddling around at work and finally understood what you had done. Thank you for your reply, it was most helpful. I do have one other question, though. From your code example, you can specify a face with FOUR vertices? I tried it earlier, but got some wierd effects. However, it took me a bit before I realized that the list of vertices began with zero rather than one, so that might account for it. Also took me a bit to figure out that the order in which you specify the vertices determines which side of the face "exists", since until you actually full enclose some space with your mesh, you have what amounts to a bunch of "one-sided" objects, depending which side you are looking at.

Again, thank you. I can see a lot of uses for this little trick.
User avatar
BinarySpike
Corporal
Corporal
Posts: 735
Joined: Mon Mar 28, 2005 11:58 pm
Contact:

Post by BinarySpike »

Me too.

I see alot of uses...
User avatar
LouMan
Chief Sgt. of Cartography
Chief Sgt. of Cartography
Posts: 338
Joined: Mon Jan 31, 2005 3:05 am
Location: Michigan, USA

Post by LouMan »

You can define a face by four or more vertices, but you must be careful to avoid convcavity.

Main Entry: 1con·cave
Pronunciation: kän-'kAv, 'kän-"
Function: adjective
Etymology: Middle English, from Middle French, from Latin concavus, from com- + cavus hollow -- more at CAVE
1 : hollowed or rounded inward like the inside of a bowl
2 : arched in : curving in -- used of the side of a curve or surface on which neighboring normals to the curve or surface converge and on which lies the chord joining two neighboring points of the curve or surface


I have found that the faces will eventually be tripled by bzfs in any case; defining faces with more than 3 vertices will only save a little space in your bzw file (again, correct me if I am wrong anyone). Normally, I create my entire mesh in my modeler using whatever number of vertices it assigns, until I am completely finished with my model. I will then use my modeler's "triple" command to make all faces 3 sided - this will correct for any concave surfaces I may have created.

You are correct about the vertex indices starting at 0. I had several days of trouble when I first started making mesh objects, until I figured this out too :wink: Unless I have to, I try to avoid hand coding vertices and faces anymore unless I really, really need to - I let my modeler and the obj-bzw modeltool handle most of the tedious work now. There is no way in heck I could have created most of the objects in my maps without them.
User avatar
TD-Linux
Sergeant
Sergeant
Posts: 724
Joined: Wed Apr 27, 2005 8:26 pm
Location: Mountain View, CA

Post by TD-Linux »

I always use Wings3D. It's not that I can't make hand meshes, it's just that I can't stand to knowing that I could use Wings3D instead. :lol-old:

I can't seem to make what you are talking about in Wings3D for my one particular model. In this model, I have to remove a face.

How do I remove a face in Wings3D? I try to dissolve it, but then Wings3D auto-generates a new one.
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Post by trepan »

In Wings3D, faces with the _hole_ material will not be exported.
Post Reply