wings3D error

Questions and answers about the how and why of making maps.
Post Reply
Sir_Pants
Private First Class
Private First Class
Posts: 194
Joined: Mon Mar 28, 2005 2:41 am
Location: SOMEwhere in WA

wings3D error

Post by Sir_Pants »

when i convert my obj file to .bzw and try to run it in bzfs i get non-convex mesh face, invalid mesh face, what does that mean?
MONKEYPANTS.COM
Image
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Post by trepan »

try triangulating your faces before exporting.
in the sub-menu for exporting, there are 3
options for Tesselation, select triangulation.
Sir_Pants
Private First Class
Private First Class
Posts: 194
Joined: Mon Mar 28, 2005 2:41 am
Location: SOMEwhere in WA

Post by Sir_Pants »

it still came up with those errors maybe its because my object is a hollowed out box with cylinder in it?
MONKEYPANTS.COM
Image
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Post by trepan »

A cleanup will probably help. BZFlag
considers zero length edges to be invalid.
In wings3d's Body mode, RMB -> Cleanup.
User avatar
BIYA
Corporal
Corporal
Posts: 891
Joined: Fri Dec 03, 2004 1:43 am
Location: Fredericksburg, Virginia
Contact:

Post by BIYA »

There a problem I dont like about tesselating. It creates more faces which equals bigger file size for the object which intern makes the download process to get on the server take longer...
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

you don't have to teselate, just make sure all your faces are convex. Teseating is just the fastest easyest most automatic way to ensure that every single one of your faces is convex ( since you can't have a concave triangle ). This will increase the face count. Any face with more then 3 verts will be turned into N-2 faces.

Many people don't seem to know the meaning of "concave"

from the dictonary

Main Entry: 1con·cave
Pronunciation: kän-'kAv
Function: adjective
Etymology: Middle English, from Middle French, from Latin concavus, from com- + cavus hollow
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

Now to illustrate it with faces.
Each shape here can be considered a face in a mesh, looking directly "at" it or "normal" to it.

Image

The Green face is convex, it has no "dents" in it, and is a valid face.
The Red face is concave, it has a vertex that goes back "inside" and makes the face invalid.

The red face would have to be broken up into more then one covex face to be made valid.

Teselating makes all faces into a grouping of triangles. Since a normal triangle can not have a "dent" then they automaticly become valid convex faces. You can have "degenerate" triangles that are invalid but these are rare cases where 2 points on a triangle are in the same place.
ImageJeffM
Sir_Pants
Private First Class
Private First Class
Posts: 194
Joined: Mon Mar 28, 2005 2:41 am
Location: SOMEwhere in WA

Post by Sir_Pants »

ok so ive got the obj file made but after i convert to bzw file it wont load all the stuff, here are the files and a pic of the errors
Attachments
problem.zip
zip file with all three
(32.16 KiB) Downloaded 201 times
MONKEYPANTS.COM
Image
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

You have some realy messed up faces in the obj file. There are 4 faces that have 18 verts each and go ALL over the place. ( the outer walls that don't have the holes in them). They are non planar faces and a non convex faces. You should fix them in your modeler cus it seems to have generated some realy messed up faces.
ImageJeffM
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Post by trepan »

Pick your 4 square faces, and quadrangulate them.

Also, I noticed that your holes aren't exactly circular.
If you select all of the vertices along 1 of the 2 rings,
and deform->inflate->100%, it'll make them into a nice
circle. Then repeat for the other ring.

P.S. The convex criteria has been modified (In my code
at least), so that polygons are still considered convex
if they have collinear edges. What this means is that
my bzfs read your .bzw file without any errors.
User avatar
Dervish
Private First Class
Private First Class
Posts: 651
Joined: Thu Dec 05, 2002 12:39 am
Location: public void

Post by Dervish »

trepan wrote:P.S. The convex criteria has been modified (In my code
at least), so that polygons are still considered convex
if they have collinear edges. What this means is that
my bzfs read your .bzw file without any errors.
Trepan, what does "collinear edges" mean? Thanks.
protected object myTank(){
foreach(noob in this.game){return frag(noob);}}
Image
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Post by trepan »

Here's a freebie:

Code: Select all

From WordNet (r) 2.0 [wn]:
  collinear
       adj : lying on the same line
also:
http://mathworld.wolfram.com/Collinear.html
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

now for the visual aid.



-------------------------------------------------------------------------------------

all those lines are collinear.
ImageJeffM
User avatar
Dervish
Private First Class
Private First Class
Posts: 651
Joined: Thu Dec 05, 2002 12:39 am
Location: public void

Post by Dervish »

Ahhh, thanks trepan. :)

btw, I download Wings 3D binary yesterday, but haven't installed it yet. One baby step at a time I guess, hehehe.

Any work on the map file I sent you yet?
protected object myTank(){
foreach(noob in this.game){return frag(noob);}}
Image
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Post by trepan »

Dervish:
I received your "i will send tomorrow" PM,
but no other. No have map, no can fix map.
User avatar
Dervish
Private First Class
Private First Class
Posts: 651
Joined: Thu Dec 05, 2002 12:39 am
Location: public void

Post by Dervish »

Lol, I sent it to teppic by mistake. I was wondering why it was taking you so long:)

Darn PM in phpBB boards... so easy to make a mistake on the name search thing. I sent it to you this time. Thanks.

Image
protected object myTank(){
foreach(noob in this.game){return frag(noob);}}
Image
Post Reply