Blender conversion

Questions and answers about the how and why of making maps.
Post Reply
User avatar
The Purple Panzer
Field Marshal
Field Marshal
Posts: 246
Joined: Tue Sep 23, 2003 8:13 pm
Location: Stonington, CT
Contact:

Blender conversion

Post by The Purple Panzer »

I have a model in .obj format; if I run the old modeltool, I get an empty .bzw file. I can read it into Blender, but the old Python script fails - perhaps it's just a version-related issue, maybe it's something deeper. (Years ago I invested some time in learning Blender, but I've forgotten it all).

Is there anyone out there who has the tools to do a .obj => .bzw conversion? I suppose I can't worry much about textures, as there's no direct way to manage those - but I don't mind. If I really care about some part of the resulting model, I'll edit the .bzw file by hand and add color, etc. (I'm pretty sure I've done this at least once; takes patience, but is doable).
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Blender conversion

Post by blast »

Wings3D can export to BZW.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Re: Blender conversion

Post by JeffM »

I'd like to see the obj that model tool failed on.
ImageJeffM
User avatar
The Purple Panzer
Field Marshal
Field Marshal
Posts: 246
Joined: Tue Sep 23, 2003 8:13 pm
Location: Stonington, CT
Contact:

Re: Blender conversion

Post by The Purple Panzer »

I'll attach it; it'll just be the .obj file, though there's a .mtl file and a number of .jpg textures. If you like I can send everything zipped. Actually, just found out it's too large, either by itself or zipped. If you send me your direct email I can try that; or maybe the size is the main issue.

I've had it sitting around a bit; I think it may have been from here:
https://free3d.com/3d-models/brandenburg-gate/1/obj
(there are several Brandenburg Gate .obj models out there for use without restriction; or maybe there are just a few that are posted in several places).
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Blender conversion

Post by blast »

That one seems to have restrictions. Won't be able to host the textures.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
User avatar
The Purple Panzer
Field Marshal
Field Marshal
Posts: 246
Joined: Tue Sep 23, 2003 8:13 pm
Location: Stonington, CT
Contact:

Re: Blender conversion

Post by The Purple Panzer »

Blast, I appreciate the constraint.

I may just generate by hand a similar model; the one I grabbed seemed unrestricted, and 3D models I think are more generally serious concerns than just textures - there's physical design work there, or even scanning of existing structures. I *do* recall that the thing I grabbed had essentially unlimited rights, but it's been a while and I can't be sure - and, though images.bzflag.org tracks textures, I don't want to be putting meshes out there that violate anyone's intellectual property.

BTW, I have a few images pending in the BZ image submitter process.

There's of course a deeper issue hiding here, of the ownership of cultural objects - I'm fairly certain no one is claiming copyright over any aspect of the Brandenburg Gate design; or, for that matter, of the Colosseum or the Parthenon. But the people who do laser scans of those sites might well claim ownership of the digital data that represent those structures. There's an analogy to music: there's the composer's copyright, but there are also "performance" copyrights, so you can't just share out a sound track of Furtwangler's Beethoven's Fifth (perhaps the best ever recorded). For this gate (one small piece of a pseudo-historical map) I can work around this, but a library of generally-usable models of historical structures (without restriction) seems like something we should work towards. It actually sounds like something an academic institution should get behind.

The original issue though is the map process, can one take an .obj and use it. I'd invested time in Blender; apparently Wings3D is a bit simpler, and for simple structures maybe it's worth learning. Not just for BZ; I find more and more I'm bumping up against the need for prototype fabrication, or at a minimum visualization. Architecturally I think Google Sketchup seems to be dominating; I have no idea what the IP issues are there, but if they're not overly restrictive that might be a goldmine for building virtual worlds.

Sry to run on so much; just found out our daughter's dream choice for college is happening, and that she'll be a cadet at the U.S. Coast Guard Academy this Fall (though, "Swab Summer" starts something like 10 days after she's out of High School). She was so happy she was in tears, and so am I.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Re: Blender conversion

Post by JeffM »

Model tool works fine, you probably just didn't wait long enough. This is not a typical mesh.

This mesh is highly unsuited to bzflag, it's got over 206,000 faces in it. It takes my machine like 5 min to re-index it.

The resulting bzw is 48 megs.
This mesh will run like crap in bzflag.

Also you don't own it and don't have rights to modify or redistribute it, it's has a restricted license. No mater what your thoughts are on the subject matter, you don't own this mesh file, period. You are free to remodel the original, because the author of the mesh file doesn't own that, they just own the file. It's like photos, you have copyright on specific photos, but not necessarily the subject matter, so other people are free to take there own photos.

You should remodel this using a much lower polygon counts.
ImageJeffM
User avatar
The Purple Panzer
Field Marshal
Field Marshal
Posts: 246
Joined: Tue Sep 23, 2003 8:13 pm
Location: Stonington, CT
Contact:

Re: Blender conversion

Post by The Purple Panzer »

I understand Jeff; the original .obj file I have is under a Creative Commons license (I *think* it was from here - https://www.yobi3d.com/q/3D-Models/Bran ... te--Berlin; something I grabbed some time back). That was too big to email you, so I sent you a pointer to the free3D one, which is what I could find quickly. But none of this matters, as I expect the polygon count issue will be roughly the same, so I might as well just put together some meshboxes and columns.

It seems Wings3D has a shallower learning curve; I may just spend some time with it for future projects. Is there a rough polygon count for objects that will be well-behaved in BZFlag? Under 100? 1000?
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Re: Blender conversion

Post by JeffM »

The tank has 256 triangles as a reference.

It really depends on how the object is built and how many triangles are in objects that are seen at the same time.

it's not really a per object limit, but one for the entire scene.

In general you want to use as few as possible while still keeping the graphics quality you want. then see how well that runs on your target hardware (for many bzflag players that is 10 year old onboard intel video chipsets)
ImageJeffM
User avatar
The Purple Panzer
Field Marshal
Field Marshal
Posts: 246
Joined: Tue Sep 23, 2003 8:13 pm
Location: Stonington, CT
Contact:

Re: Blender conversion

Post by The Purple Panzer »

(see attached image)

I spent about 90 minutes just hacking up a simplified Brandenburg Gate; so far it's undecorated, and I use a transparent bronze-color pyramid on top instead of a statue - who will care? And this has play implications (drivethrough, not shootthrough). I can make it more accurate and detailed, but I'm not sure I want to over-embellish (there are details you can't quite see already, and I'd rather not ding framerate). I built it largely via code I've got that can emit columns, temples, structures of various sorts - they end up as defined objects, but you can parameterize their creation, which is key.

Anyway, just for your amusement. The entire thing ends up as one "define", so it may be scaled, moved, etc., easily. When it's fully done I may just post it as an object for others to use.
Attachments
bzfi0004.png
bzfi0004.png (143 KiB) Viewed 5516 times
Post Reply