BZFlag MapU - Box to Mesh V0.2.0

Discussion, updates, modifications, etc for the various map editors...
Post Reply
User avatar
Tanner
Private First Class
Private First Class
Posts: 575
Joined: Sat Sep 17, 2005 3:46 am
Location: Atl, GA
Contact:

BZFlag MapU - Box to Mesh V0.2.0

Post by Tanner »

Hi,

This is a simple program I made that takes the specifcations of a normal box, and converts it to a mesh allowing the user to spend much less time.

V0.2.0

Features:
  • Current Step Number
  • "Is This What You Want To Do?"
  • Generates a file called "mesh.bzw" with the mesh code.
  • Nicely labeled code telling you which is what side.
Bugs:
  • "Is This What You Want To Do?" does not recognize "Y", "N", "Yes", or "No".
Thanks
-Tanner
Attachments
BM_BM_0_2_0.zip
Box to Mesh V0.2.0
(144.44 KiB) Downloaded 267 times
Last edited by Tanner on Wed Jan 11, 2006 10:01 pm, edited 2 times in total.
Tanner - Segway HT i180 Red Owner - Random Map Creator - BZStocks - TS Software

Image
User avatar
^nightmare^
Private First Class
Private First Class
Posts: 1264
Joined: Sun Feb 20, 2005 7:14 pm
Location: Alabama
Contact:

Post by ^nightmare^ »

wow thats really awsome. Real easy to make tunnels and stuff.
Great job and keep up the good work :D
Need bzflag help? Try looking here: http://www.freewebs.com/bznightmare/map ... aghelp.htm
JPT
Private First Class
Private First Class
Posts: 260
Joined: Tue Nov 29, 2005 1:21 pm
Location: Germany

Post by JPT »

I get the invalid mesh warning, too.
But the porgramm creates a crazy geometric object, not a simple block.
But it's a great job !
With some modification, i can make the mesh work as a platform.
User avatar
The Client
Private
Private
Posts: 2
Joined: Fri Dec 16, 2005 9:43 pm

Post by The Client »

cool ill have to try it...
User avatar
The Knights Who Say Ni
Private First Class
Private First Class
Posts: 556
Joined: Mon Sep 26, 2005 7:21 pm
Location: Uplyme, England
Contact:

Post by The Knights Who Say Ni »

nice idea but it needs developing i think
also why does it create gmon.out :?
Image
Sig Made By AlliedArmour

TGPH
User avatar
The Knights Who Say Ni
Private First Class
Private First Class
Posts: 556
Joined: Mon Sep 26, 2005 7:21 pm
Location: Uplyme, England
Contact:

Post by The Knights Who Say Ni »

umm yer i just tested it and it said:

Code: Select all

invalid mesh face (0.000000): 5 6 7  face
  # plane normal = 0 0 1 -8.5
    vertices 5 6 7 # 8.5 8.5 8.5 8.5 -8.5 8.5 8.5 -8.5 8.5
    matref 0
  endface

invalid mesh face (0.000000): 1 2 3  face
  # plane normal = 0 0 1 -8.5
    vertices 1 2 3 # -8.5 8.5 8.5 -8.5 -8.5 8.5 -8.5 -8.5 8.5
    matref 0
  endface

invalid mesh face (0.000000): 0 1 3  face
  # plane normal = 0 0.203259 0 -9.90352e+027
    vertices 0 1 3 # -8.5 8.5 8.5 -8.5 8.5 8.5 -8.5 -8.5 8.5
    matref 0
  endface

invalid mesh face (0.000000): 3 4 5  face
  # plane normal = 0 0.203259 0 -9.90352e+027
    vertices 3 4 5 # -8.5 -8.5 8.5 8.5 8.5 8.5 8.5 8.5 8.5
    matref 0
  endface

invalid mesh face (0.000000): 2 1 0  face
  # plane normal = 0 0 1 -8.5
    vertices 2 1 0 # -8.5 -8.5 8.5 -8.5 8.5 8.5 -8.5 8.5 8.5
    matref 0
  endface

invalid mesh face (0.000000): 6 5 4  face
  # plane normal = 0 0 1 -8.5
    vertices 6 5 4 # 8.5 -8.5 8.5 8.5 8.5 8.5 8.5 8.5 8.5
    matref 0
  endface

invalid mesh face (0.000000): 7 6 4  face
  # plane normal = 0 0 0 0
    vertices 7 6 4 # 8.5 -8.5 8.5 8.5 -8.5 8.5 8.5 8.5 8.5
    matref 0
  endface

invalid mesh face (0.000000): 4 3 2  face
  # plane normal = 0 0 0 0
    vertices 4 3 2 # 8.5 8.5 8.5 -8.5 -8.5 8.5 -8.5 -8.5 8.5
    matref 0
  endface

invalid mesh face (0.000000): 5 6 7  face
  # plane normal = 0 0 1 0
    vertices 5 6 7 # 8.5 8.5 0 8.5 -8.5 0 8.5 -8.5 0
    matref 0
  endface

invalid mesh face (0.000000): 1 2 3  face
  # plane normal = 0 0 1 0
    vertices 1 2 3 # -8.5 8.5 0 -8.5 -8.5 0 -8.5 -8.5 0
    matref 0
  endface

invalid mesh face (0.000000): 0 1 3  face
  # plane normal = 0 2.10195e-044 0 0
    vertices 0 1 3 # -8.5 8.5 0 -8.5 8.5 0 -8.5 -8.5 0
    matref 0
  endface

invalid mesh face (0.000000): 3 4 5  face
  # plane normal = 0 2.10195e-044 0 0
    vertices 3 4 5 # -8.5 -8.5 0 8.5 8.5 0 8.5 8.5 0
    matref 0
  endface

invalid mesh face (0.000000): 2 1 0  face
  # plane normal = 0 0 1 0
    vertices 2 1 0 # -8.5 -8.5 0 -8.5 8.5 0 -8.5 8.5 0
    matref 0
  endface

invalid mesh face (0.000000): 6 5 4  face
  # plane normal = 0 0 1 0
    vertices 6 5 4 # 8.5 -8.5 0 8.5 8.5 0 8.5 8.5 0
    matref 0
  endface

invalid mesh face (0.000000): 7 6 4  face
  # plane normal = 52.5891 0 0 0
    vertices 7 6 4 # 8.5 -8.5 0 8.5 -8.5 0 8.5 8.5 0
    matref 0
  endface

invalid mesh face (0.000000): 4 3 2  face
  # plane normal = 52.5891 0 0 0
    vertices 4 3 2 # 8.5 8.5 0 -8.5 -8.5 0 -8.5 -8.5 0
    matref 0
  endface
this is the map file:

Code: Select all

#Mesh Generated By BZFlag MapU - MeshBox to Map By TS Software

#Right
mesh
	Vertex -8.5  8.5  8.5
	Vertex -8.5  8.5  0
	Vertex -8.5  -8.5  8.5
	Vertex -8.5  -8.5  0
face
	vertices 0 1 2 3
endface
face
	vertices 3 2 1 0
endface
end

#Left
mesh
	Vertex 8.5  8.5  8.5
	Vertex 8.5  8.5  0
	Vertex 8.5  -8.5  8.5
	Vertex 8.5  -8.5  0
face
	vertices 0 1 2 3
endface
face
	vertices 3 2 1 0
endface
end

#Front
mesh
	Vertex -8.5  8.5  8.5
	Vertex -8.5  8.5  0
	Vertex 8.5  8.5  8.5
	Vertex 8.5  8.5  0
face
	vertices 0 1 2 3
endface
face
	vertices 3 2 1 0
endface
end

#Back
mesh
	Vertex -8.5  -8.5  8.5
	Vertex -8.5  -8.5  0
	Vertex 8.5  -8.5  8.5
	Vertex 8.5  -8.5  0
face
	vertices 0 1 2 3
endface
face
	vertices 3 2 1 0
endface
end

#Top
mesh
	Vertex -8.5  8.5  8.5
	Vertex -8.5  8.5  8.5
	Vertex -8.5  -8.5  8.5
	Vertex -8.5  -8.5  8.5
	Vertex 8.5  8.5  8.5
	Vertex 8.5  8.5  8.5
	Vertex 8.5  -8.5  8.5
	Vertex 8.5  -8.5  8.5
face
	vertices 0 1 2 3 4 5 6 7
endface
face
	vertices 7 6 5 4 3 2 1 0
endface
end

#Bottom
mesh
	Vertex -8.5  8.5  0
	Vertex -8.5  8.5  0
	Vertex -8.5  -8.5  0
	Vertex -8.5  -8.5  0
	Vertex 8.5  8.5  0
	Vertex 8.5  8.5  0
	Vertex 8.5  -8.5  0
	Vertex 8.5  -8.5  0
face
	vertices 0 1 2 3 4 5 6 7
endface
face
	vertices 7 6 5 4 3 2 1 0
endface
end
im not great with maps but i dont think that thats right... :lol-old:
Image
Sig Made By AlliedArmour

TGPH
dango
Private First Class
Private First Class
Posts: 1400
Joined: Sun Feb 06, 2005 5:40 pm
Location: Somewhere over there.

Post by dango »

how come it places the excact same vertex twice in a row?
Vertex -8.5 8.5 0
Vertex -8.5 8.5 0

Vertex -8.5 -8.5 0
Vertex -8.5 -8.5 0

Vertex 8.5 8.5 0
Vertex 8.5 8.5 0

Vertex 8.5 -8.5 0
Vertex 8.5 -8.5 0
Last edited by dango on Sun Jan 08, 2006 9:40 pm, edited 1 time in total.
Image
User avatar
Tanner
Private First Class
Private First Class
Posts: 575
Joined: Sat Sep 17, 2005 3:46 am
Location: Atl, GA
Contact:

Post by Tanner »

The Knights Who Say Ni wrote:nice idea but it needs developing i think
also why does it create gmon.out :?
I beleive gmon.out is something to do with it running in the cmd.

To people with problems:

What coordinates are you using (for position and box)?

-Tanner
Tanner - Segway HT i180 Red Owner - Random Map Creator - BZStocks - TS Software

Image
User avatar
The Knights Who Say Ni
Private First Class
Private First Class
Posts: 556
Joined: Mon Sep 26, 2005 7:21 pm
Location: Uplyme, England
Contact:

Post by The Knights Who Say Ni »

postion 0,0,0
size 17,17,17

simple...
Image
Sig Made By AlliedArmour

TGPH
User avatar
Tanner
Private First Class
Private First Class
Posts: 575
Joined: Sat Sep 17, 2005 3:46 am
Location: Atl, GA
Contact:

Post by Tanner »

The Knights Who Say Ni
I tried that too, and get the same results.

me1
Hmm, I'll have to check my formulas.

Hopefully, I can get this fixed.

-Tanner
Tanner - Segway HT i180 Red Owner - Random Map Creator - BZStocks - TS Software

Image
User avatar
Teppic
Private First Class
Private First Class
Posts: 576
Joined: Mon Mar 07, 2005 10:00 pm
Location: The North Block

Post by Teppic »

Couple of things, a cube needs 8 vertices and the one in the example above has 32, they may be the same ones defined over and over again, but it's a waste of space in the map file.
Secondly, the way in which boxes are read by the map reader then put into the actual map is a little off compared to the co-ords of vertices that are in the example:- The size in x and y is applied to the box in both positive and negative directions, where as the size in z is is only applied in the positive direction, so a box 20 x 20 x 20 would be 40 wide , 40 long and 20 high.

EDIT: also marking an inside point 1/2 z above the origin and making the structure a single mesh should stop flag and player spawning inside the box.
User avatar
Tanner
Private First Class
Private First Class
Posts: 575
Joined: Sat Sep 17, 2005 3:46 am
Location: Atl, GA
Contact:

Post by Tanner »

Updated Version 0.2.0

Fixed the error problem. Should work very nicely now....

-Tanner
Tanner - Segway HT i180 Red Owner - Random Map Creator - BZStocks - TS Software

Image
User avatar
The Knights Who Say Ni
Private First Class
Private First Class
Posts: 556
Joined: Mon Sep 26, 2005 7:21 pm
Location: Uplyme, England
Contact:

Post by The Knights Who Say Ni »

umm are you going to attach it?
Image
Sig Made By AlliedArmour

TGPH
User avatar
Tanner
Private First Class
Private First Class
Posts: 575
Joined: Sat Sep 17, 2005 3:46 am
Location: Atl, GA
Contact:

Post by Tanner »

The Knights Who Say Ni wrote:umm are you going to attach it?
In original post. :)

-Tanner
Tanner - Segway HT i180 Red Owner - Random Map Creator - BZStocks - TS Software

Image
User avatar
Mostly Harmless!
Private First Class
Private First Class
Posts: 347
Joined: Sun Oct 30, 2005 4:37 am
Location: California

Post by Mostly Harmless! »

I had nothing to do, and wanted to try out an icon editor. So I decided to make an icon for this program. Bear in mind that this is my first icon and I will make any changes neseccary.
Attachments

[The extension ico has been deactivated and can no longer be displayed.]


I never make stupid mistakes. Only very, very clever ones.
It is not the fall that kills you. It's the sudden stop at the end.
Always remember you are unique. Just like everybody else.
User avatar
eagle
Private First Class
Private First Class
Posts: 510
Joined: Tue Jan 25, 2005 10:29 pm
Location: Round Hill, VA

Post by eagle »

hey, thats pretty cool mostly harmless. what did you use?




one problem with the program thing......its .exe and i have a mac :(
~~~~~
I do know everything, just not all at once. Its a virtual memory problem.
User avatar
im fine u?
Private First Class
Private First Class
Posts: 99
Joined: Thu Dec 22, 2005 4:05 am
Location: in computer
Contact:

Post by im fine u? »

I use Awicons Lite for icons, if anyone cares :D
Image

Owner at: Gnurdux's servers

Admin at: (DVN)'s server
tankzilla's server
A Heart Attack's server
User avatar
Mostly Harmless!
Private First Class
Private First Class
Posts: 347
Joined: Sun Oct 30, 2005 4:37 am
Location: California

Post by Mostly Harmless! »

I downloaded a trial of icon lover.

I never make stupid mistakes. Only very, very clever ones.
It is not the fall that kills you. It's the sudden stop at the end.
Always remember you are unique. Just like everybody else.
User avatar
person1
Private First Class
Private First Class
Posts: 159
Joined: Wed Sep 14, 2005 3:44 am
Location: Omaha, Nebraska

curious

Post by person1 »

what is the point of this program?

Will it later be able to combine the outline of multiple boxes into one mesh or what?
Image
Image
I not just any person, I am person1
User avatar
Tanner
Private First Class
Private First Class
Posts: 575
Joined: Sat Sep 17, 2005 3:46 am
Location: Atl, GA
Contact:

Re: BZFlag MapU - Box to Mesh V0.2.0

Post by Tanner »

Tanner wrote: This is a simple program I made that takes the specifcations of a normal box, and converts it to a mesh allowing the user to spend much less time.
-Tanner
Tanner - Segway HT i180 Red Owner - Random Map Creator - BZStocks - TS Software

Image
User avatar
BIYA
Corporal
Corporal
Posts: 891
Joined: Fri Dec 03, 2004 1:43 am
Location: Fredericksburg, Virginia
Contact:

Post by BIYA »

I understand that part but what do you mean by it saving time?
User avatar
Mostly Harmless!
Private First Class
Private First Class
Posts: 347
Joined: Sun Oct 30, 2005 4:37 am
Location: California

Post by Mostly Harmless! »

It allows the user to specify the information as if he were making a normal box, but outputs it as mesh. Not a meshbox.

I never make stupid mistakes. Only very, very clever ones.
It is not the fall that kills you. It's the sudden stop at the end.
Always remember you are unique. Just like everybody else.
User avatar
badgerking
Private First Class
Private First Class
Posts: 98
Joined: Sat Mar 19, 2005 5:27 pm
Location: Iowa, USA

mesh, meshbox, and vi

Post by badgerking »

Just curious but what's the difference from an opengl perspective of a mesh and meshbox? My thought was that meshbox was probably a bzfs "macro" of some kind that automated the creation of boxes via the mesh.

If you really want to quickly convert a 1.0 map of boxes, just open the file in a real text editor, like vi, and globally replace box with meshbox. No need for an external program to do it.

Or am I missing the point of this program?
User avatar
TD-Linux
Sergeant
Sergeant
Posts: 724
Joined: Wed Apr 27, 2005 8:26 pm
Location: Mountain View, CA

Post by TD-Linux »

This is a good idea. The really nice thing about it is that you can, after running your map through it, import it into Blender and your boxes are now fully editable like meshes!

ENTRIELY OFF-TOPIC: You don't need to use a shareware or adware program like awicons, the GIMP supports exporting them. Try googling it.
User avatar
Zehra
Private First Class
Private First Class
Posts: 915
Joined: Sun Oct 18, 2015 3:36 pm
Location: Within the BZFS API and Beyond it
Contact:

Re: BZFlag MapU - Box to Mesh V0.2.0

Post by Zehra »

Usually bumping an old thread is frowned upon. (In this case, an updated cross platform clone inspired by Tanner's work is provided.)
boxtomesh(py).txt
Pyhon script clone of box to mesh, rename '.txt' extension to '.py'. Provided under CC0-1.0 license (fixed minor bug)
(4.41 KiB) Downloaded 96 times
Just rename the extension to `.py` and it should work.(You'll need Python3 for this script to work.)
License for script: CC0 1.0 Universal (CC0 1.0)

-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra

See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.

Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
Post Reply