ModelTool for OBJ to BZW conversion

General talk about the map making process.
User avatar
Valoche
Private First Class
Private First Class
Posts: 69
Joined: Fri Dec 20, 2002 5:39 pm
Location: France/Grenoble

Post by Valoche »

Thanks Jeff, it was the model that was too complex. Maybe a printf somewhere would help.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

umm, there are no limits to the number of faces or anything, so nothing should be "too complex" it's not like the tool does anything with the data, it just converters it.

Post the obj that dosn't work, so we can make the tool work with it. This is how bugs are fixed, first they are reported with all the data a developer needs to duplicate them :)
ImageJeffM
User avatar
Valoche
Private First Class
Private First Class
Posts: 69
Joined: Fri Dec 20, 2002 5:39 pm
Location: France/Grenoble

Post by Valoche »

Okay, here it is. Please note that I was experimenting with Anim8or :lol-old:

Valoche
Attachments
valoche.zip
Wavefront obj, zipped because BB does not allow .obj's
(2.5 KiB) Downloaded 1140 times
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

ok the problem is that not all of the faces have texture coords, the tool is limited to faces that have points, texture coords, and normals.

I think trepan is fixing it now.
ImageJeffM
User avatar
Sir Lance-A-Lot
Private First Class
Private First Class
Posts: 503
Joined: Tue Jun 29, 2004 12:49 am
Location: Amongst my Computers
Contact:

Post by Sir Lance-A-Lot »

When I export my object and host, on the server it is always below the ground and it moves as I move. Is there a way to change this?
Image
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG »

Model your object above the Y axis in Anim8tor. I tend to lose track of where the Y axis is, and make my objects below or through it. The Y axis is the grass in BZFlag. Just move them up when you model them.
User avatar
Memnarch
Sergeant First Class
Sergeant First Class
Posts: 273
Joined: Mon Jul 05, 2004 10:42 pm
Location: Sorry, I'm a Nowhere Man
Contact:

Post by Memnarch »

Ok, I went to cvs, and used the command in my shell program. This is the command I used: cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/bzflag/bzflag/tools co -P modeltool

Ok, and this is what I got:

cvs checkout: authorization failed: server cvs.sourceforge.net rejected access to /cvsroot/bzflag/bzflag/tools for user anonymous
cvs checkout: used empty password; try "cvs login" with a real password

So I really have no idea what I should do. Help?
Image
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG »

Cantcha just checkout the entire thing and pick out the modeltool?
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

model tool is not a module in itself so what you did will not work the tools dir is NOT a cvs root
just get the full bz tree and get the model tool code.
ImageJeffM
User avatar
Memnarch
Sergeant First Class
Sergeant First Class
Posts: 273
Joined: Mon Jul 05, 2004 10:42 pm
Location: Sorry, I'm a Nowhere Man
Contact:

Post by Memnarch »

ok, thanks! I think I know what I am supposed to do, so I'll get back to you when I fail! :wink:
Image
User avatar
Sir Lance-A-Lot
Private First Class
Private First Class
Posts: 503
Joined: Tue Jun 29, 2004 12:49 am
Location: Amongst my Computers
Contact:

Post by Sir Lance-A-Lot »

sigh...All my exported worlds are underground no matter which axis i build them on....
Image
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

make sure the lowest point is Z 0, your probably making them under the origin.
ImageJeffM
User avatar
Sir Lance-A-Lot
Private First Class
Private First Class
Posts: 503
Joined: Tue Jun 29, 2004 12:49 am
Location: Amongst my Computers
Contact:

Post by Sir Lance-A-Lot »

well, here is a screenshot of my object right b4 I export.
Attachments
can_1.JPG
Object
(54.9 KiB) Downloaded 439 times
Image
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

then what does the export file look like? does it put any objects under Z 0?
ImageJeffM
User avatar
Scorch
Private First Class
Private First Class
Posts: 747
Joined: Thu Sep 30, 2004 12:16 am

Post by Scorch »

JM, this also happens with arcs and such, i rotated an arc like 10 big with a 0.5 ratio using spin 90 90 0 0 (which i now know i shoulda only done spin 90 1 0 0 but thats besides the point) and in was moving weird AND you could like get in it and not go out so like the faces were messssed up!
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

well anything under Z 0 gets wacky, the ground isn't filled in with the Z buffer, so stuf drawn under it won't be occluded buy the grass. So any object mesh or not will look "wierd" when underground. Just don't make anything under z 0. when you rotate stuff, parts may go under z 0, you have to make sure that dosn't happen.
ImageJeffM
User avatar
Memnarch
Sergeant First Class
Sergeant First Class
Posts: 273
Joined: Mon Jul 05, 2004 10:42 pm
Location: Sorry, I'm a Nowhere Man
Contact:

Post by Memnarch »

Memnarch wrote:ok, thanks! I think I know what I am supposed to do, so I'll get back to you when I fail! :wink:
sigh... It is time. Ok, I donwnloaded the latest bzflag from cvs, and I configured, made and made install. What am I supposed to do now? What is the executing name I need to put in a shell? A little confused here... :oops:
Image
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Post by trepan »

Scorch: that's probably the matrix inversion
detection bug. It's been dealt with in CVS.
Legolas_
Private First Class
Private First Class
Posts: 513
Joined: Thu Jan 20, 2005 10:24 pm

Post by Legolas_ »

why wont it work? when i downloaded it and went into the file- i clicked on the modeltool thing and it blinked, nothing else happened.
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG »

You don't double click on it. Instead, you drag your OBJ file over it. Or, use the command line to call it.

Remember to add -flipyz to have your model placed the correct way.

To run it in the command line (run button) do this (assuming modeltool.exe is placed in C:\)

C:\modeltool.exe SOME_FILE.obj -flipyz

replace SOME_FILE.obj with the name of your OBJ file.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

legolas, it is a model conversion tool that is to be used with some other modeler ( your choice ). It is not an editor, or graphical modeling tool.

The -flipyz is ONLY for modeling programs and modelers that use the "Y" axis as the "UP" axis. Not all systems do this, so you don't need it for all models. If you are unsure about what your modeler uses, then you probably need to learn more about your modeler.
ImageJeffM
User avatar
LouMan
Chief Sgt. of Cartography
Chief Sgt. of Cartography
Posts: 338
Joined: Mon Jan 31, 2005 3:05 am
Location: Michigan, USA

Exported LightWave OBJ Converter

Post by LouMan »

I have been asked to post the VERY simple OBJ converter I created for my map making. This is a very small, untested Windows application with very limited use - it will only convert exported LightWave OBJ files into mesh 'language' for insertion into a bzw file. For that matter, it will not convert normals or texture coordinates. It will only convert vertices, faces and texture names. The output file is generated in the same directory as the source file, with the word "Converted" added to the filename, e.g. "box.obj" becomes "Convertedbox.obj" Copy and paste must be done from there. Please, please do not think that this is a polished application - I'm actually very hesistant to post it...
User avatar
LouMan
Chief Sgt. of Cartography
Chief Sgt. of Cartography
Posts: 338
Joined: Mon Jan 31, 2005 3:05 am
Location: Michigan, USA

Map Tool

Post by LouMan »

Hmm - didn't like the .exe file :? , let's try it with .zip...
Attachments
LWConverter.zip
(4.06 KiB) Downloaded 1062 times
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG »

Isn't this the same as the modeltool made by JeffM?
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

No it's a difrent application. It apears to be made in Visual Basic, so it's probably windows only.
ImageJeffM
Post Reply