Author Topic: Making a Tremulous map in Blender.  (Read 27815 times)

m4gnificent_b4st4rd

  • Guest
Making a Tremulous map in Blender.
« on: November 08, 2009, 12:43:05 pm »
Hi, I'm new to the forum. :)

I've made maps for quake3 before using Blender's .map export script and I'd like to do the same with Tremulous. It's quite easy really, meshes are exported as brushes, lights as lights and all the classname stuff is done by giving logic properties to empties. With this you can export fully functional, (if visually simple), .map files.

The only difficulty is that Tremulous has some different classname stuff, like overminds, alien spawns etc. To make a working Tremulous map I'd need to know these things so I could assign them to empties. If someone could provide me with a simple .map with the basic stuff in it I could set up Blender to export trem maps and maybe do a little tutorial for any Blender users who (like me) don't want to Gtkradiant.

EDIT - never mind, i just found out that the .map files are in the pk3s. great idea.  ;D
« Last Edit: November 08, 2009, 06:34:37 pm by m4gnificent_b4st4rd »

Odin

  • Spam Killer
  • *
  • Posts: 1767
  • Turrets: +113/-204
    • My Website
Re: Making a Tremulous map in Blender.
« Reply #1 on: November 08, 2009, 07:55:03 pm »
It might be a better idea to split up your geometry and export them as individual ASE files instead. Then, reconstruct the map in radiant with the models and give them all spawnflags 6.

m4gnificent_b4st4rd

  • Guest
Re: Making a Tremulous map in Blender.
« Reply #2 on: November 08, 2009, 08:00:15 pm »
Hi Odin,

No need for me to mess around with radiant, like I said, Blender can export fully functional Tremulous maps.

I dug the classname stuff out of one of the trem maps and assigned them to some empties, built a box of brushes around it and stuck some lights in. I then exported it with a slightly modified quake3 .map export script and compiled it. It runs without any problems. Obviously it's an incredibly simple map, but it does prove that functional maps can be made with blender.  ;D

Click the thumbnail below...


If you want to take a look at the .Blend file and the pk3 you can get it from here.
« Last Edit: November 08, 2009, 08:08:27 pm by m4gnificent_b4st4rd »

A Spork

  • Spam Killer
  • *
  • Posts: 1010
  • Turrets: +37/-230
    • Spork - Unvanquished.net
Re: Making a Tremulous map in Blender.
« Reply #3 on: November 08, 2009, 08:49:46 pm »
I think I've heard before though that blender doesn't do vis right or something, so it's brutal for fps(correct me if I'm wrong)
Don't shoot friend :basilisk:! Friend :basilisk: only wants to give you hugz and to be your hat

Proud Member of the S.O.B.F.O.B.S.A.D: The Society Of Basilisks For Other Basilisks Safety and Dominance
:basilisk:    :basilisk:    :basilisk:

m4gnificent_b4st4rd

  • Guest
Re: Making a Tremulous map in Blender.
« Reply #4 on: November 08, 2009, 09:18:02 pm »
I'm not sure about the vis thing, whether that's something that happens during the compile stage or whether it's something that has to be set up in gtkradiant.

I'm aware that Gtkradiant is the best option for serious mapping, but to be honest I'm not a serious mapper. I'm more into modelling and all I need in the way of mapping is a box room with a spawn and a few lights. If I can do that in Blender using the quake3 .map exporter then I can save myself the hassle of having to use radiant. (It's not a bad program, but I'm so used to Blender's user interface that switching to Gtkradiant isn't a pleasant experience for me).

m4gnificent_b4st4rd

  • Guest
Re: Making a Tremulous map in Blender.
« Reply #5 on: November 08, 2009, 09:26:39 pm »
A Spork. It's just occured to me why you might have heard that Blender created maps have bad fps. Any ase or md3 models that you make in Blender won't block vis in the game, so if you made a map using models to make all the walls and rooms then I guess the game would be rendering the entire map all the time, which would kill the fps.

However, the quake3 export script actually creates a regular .map file full of brushes, just like Gtkradiant does (just with a lot less features). So once you compile the .map file to a .bsp it should work just as well as if you had created it with Gtkradiant.

A Spork

  • Spam Killer
  • *
  • Posts: 1010
  • Turrets: +37/-230
    • Spork - Unvanquished.net
Re: Making a Tremulous map in Blender.
« Reply #6 on: November 08, 2009, 10:19:55 pm »
No, actually the reason I heard was the lack of Detail brushes, which If you have much detailing, makes reduces vis and wrecks fps.
Don't shoot friend :basilisk:! Friend :basilisk: only wants to give you hugz and to be your hat

Proud Member of the S.O.B.F.O.B.S.A.D: The Society Of Basilisks For Other Basilisks Safety and Dominance
:basilisk:    :basilisk:    :basilisk:

m4gnificent_b4st4rd

  • Guest
Re: Making a Tremulous map in Blender.
« Reply #7 on: November 08, 2009, 11:54:57 pm »
A Spork - Interesting. These detail brushes must look different in the .map file for q3map2 to know what to do with them. Any chance you could show me a chunk of a map file with a detail brush and a non-detail brush for comparison?

Plague Bringer

  • Posts: 3815
  • Turrets: +147/-187
Re: Making a Tremulous map in Blender.
« Reply #8 on: November 08, 2009, 11:56:13 pm »
A Spork - Interesting. These detail brushes must look different in the .map file for q3map2 to know what to do with them. Any chance you could show me a chunk of a map file with a detail brush and a non-detail brush for comparison?
They're the exact same except one doesn't split vis. Everything inside a room should be detail, and the only non detail brushes (iirc/afaik) should be ones that separate your map from the void.
U R A Q T

m4gnificent_b4st4rd

  • Guest
Re: Making a Tremulous map in Blender.
« Reply #9 on: November 09, 2009, 12:00:54 am »
How can they be exactly the same in the .map file yet q3map2 knows which ones are detail and which ones aren't? That doesn't make sense to me.

Plague Bringer

  • Posts: 3815
  • Turrets: +147/-187
Re: Making a Tremulous map in Blender.
« Reply #10 on: November 09, 2009, 12:33:17 am »
Well, they are recognized as being different. It's just a value attributed to the brush. Other than that, though, they're completely the same.
U R A Q T

m4gnificent_b4st4rd

  • Guest
Re: Making a Tremulous map in Blender.
« Reply #11 on: November 09, 2009, 12:59:12 am »
Ok, if there is a value attached to a detail brush and this is saved to the .map file then what I need to know is how is this done.
« Last Edit: November 09, 2009, 01:11:22 am by m4gnificent_b4st4rd »

A Spork

  • Spam Killer
  • *
  • Posts: 1010
  • Turrets: +37/-230
    • Spork - Unvanquished.net
Re: Making a Tremulous map in Blender.
« Reply #12 on: November 09, 2009, 01:52:35 am »
In all reality, it'd probably be just as easy to just learn Radiant....After all, its designed for that.
Don't shoot friend :basilisk:! Friend :basilisk: only wants to give you hugz and to be your hat

Proud Member of the S.O.B.F.O.B.S.A.D: The Society Of Basilisks For Other Basilisks Safety and Dominance
:basilisk:    :basilisk:    :basilisk:

UniqPhoeniX

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: Making a Tremulous map in Blender.
« Reply #13 on: November 09, 2009, 04:19:01 am »
The .map exporter creates a separate brush for each surface, causing a huge mess, and without proper vis, the map will lag. You could export each room as .ase and create only basic walls to block vis in radiant. But even then, if you want the details to be at least solid, you have to use spawnflag 6 (2+4), which also creates a mess with small details. Either way, you should use radiant.

MitSugna

  • Guest
Re: Making a Tremulous map in Blender.
« Reply #14 on: November 09, 2009, 08:54:55 am »
The .map exporter creates a separate brush for each surface, causing a huge mess, and without proper vis, the map will lag. You could export each room as .ase and create only basic walls to block vis in radiant. But even then, if you want the details to be at least solid, you have to use spawnflag 6 (2+4), which also creates a mess with small details. Either way, you should use radiant.
+1
Blender is only good for creating detail brushes. Kats made a map that way, IIIRC.

m4gnificent_b4st4rd

  • Guest
Re: Making a Tremulous map in Blender.
« Reply #15 on: November 09, 2009, 10:46:06 am »
A Spork -
Quote
In all reality, it'd probably be just as easy to just learn Radiant....After all, its designed for that.
Obviously if I met someone who wanted to make maps and had never used either Blender or Gtkradiant then I'd advise them to go for Gtkradiant, but I'm writing this stuff for people who are already Blender users. Gtkradiant is specialized for making maps, but as a 3d modelling program it doesn't even come close to Blender. Blender has python scripting which can be used to generate content, layers to stop the build process getting cluttered and all kinds of tools that Gtkradiant just doesn't have. Also there is the fact that there are a lot of Blender users out there who might fancy trying their hand at mapping, but might go off the idea once they realize that they have to learn a completely new 3D modelling program that has a user interface that is painfully different to the one they already know.

UniqPhoeniX -
Quote
The .map exporter creates a separate brush for each surface
That's not quite accurate. If the script finds a mesh that is a cuboid or a triangular prism it will export those to a regular brush (check out is_cube_facegroup, is_tricyl_facegroup and write_cube2brush). It's only when it finds a mesh that isn't a cuboid or triangular prism that it resorts to the process of exporting each face as a brush, which I agree is a bit of a mess. This can be avoided by making sure all your meshes are cuboids/triangular prisms or doing what I did and ripping out the "separate brush for each surface" part of the script.
Quote
But even then, if you want the details to be at least solid, you have to use spawnflag 6 (2+4), which also creates a mess with small details.
I agree, but it's not necessary to make the ase meshes solid if you build them fairly close to the brushwork. Check out this map by dONKEY. He made a simple map out of brushwork then made ase models that were pretty close to the brushwork, but weren't all straight lines and angles. He could make his ase models give a more slumped realistic shape to the houses, but because the ase models were still pretty close to the shape of the brushwork it wouldn't actually be necessary to make use a solid spawnflag on them. An approach like this could give you the best worlds, simple brushwork for vis and collision detection, but non-solid ase meshes giving all the visual stuff.

For dONKEY's map he actually blocked out the basic map in Gtkradiant, compiled it to bsp, then decompiled it to an ase model, then imported that ase model into blender and used it as a guide to build the ase models around. This works, but is a slow process. Using the quake3 .map export script would allow you to design all your brushwork in Blender, which would be way quicker. When it came to exporting you could select only the Blender layers that contained meshes designed to be brushwork (cuboids and triangular prisms) and export them along with the lights and classname empties to a .map file. Then export the rest of the meshes as ase files. The advantage of this system is that if you wanted to change the underlying brushwork you could do that quickly and easily in Blender without having to go through the whole "block out the basic map in Gtkradiant, compile it to bsp, then decompile to an ase model, then imported that ase model into blender" business.

m4gnificent_b4st4rd

  • Guest
Re: Making a Tremulous map in Blender.
« Reply #16 on: November 09, 2009, 11:27:38 am »
Here's the .map file of a map I made in Blender. I put a cuboid and a triangular prism in the centre of the room so you can see that they really do export to proper brushes and not a brush per face. I'd appreciate it if you guys could load it into Gtkradiant and check it out.

EDIT - removed the map file because it was messing up this page's width.
« Last Edit: November 10, 2009, 06:03:04 pm by m4gnificent_b4st4rd »

A Spork

  • Spam Killer
  • *
  • Posts: 1010
  • Turrets: +37/-230
    • Spork - Unvanquished.net
Re: Making a Tremulous map in Blender.
« Reply #17 on: November 09, 2009, 02:34:10 pm »
Ummmm....
A .map file is supposed to be a file, not lots of nonsensical code...
How bout uploading the actual file please.
Also, you have gotten responses from some actual mappers here, you should try taking their advice.

Also, radiants interface is not that hard, took me like 10minutes to figure out the basics(on the other hand, I still haven't gotten into modelling, cuz blenders interface is just confusing).

If you want to map, just learn radiant, its designed to build maps, unlike blender.
Don't shoot friend :basilisk:! Friend :basilisk: only wants to give you hugz and to be your hat

Proud Member of the S.O.B.F.O.B.S.A.D: The Society Of Basilisks For Other Basilisks Safety and Dominance
:basilisk:    :basilisk:    :basilisk:

m4gnificent_b4st4rd

  • Guest
Re: Making a Tremulous map in Blender.
« Reply #18 on: November 09, 2009, 03:26:03 pm »
Quote
A Spork - A .map file is supposed to be a file, not lots of nonsensical code...
Are you trolling me or something? Grab one of the map files from inside a Tremulous pk3 and they will look pretty much exactly like the "nonsensical code" I just posted. 
Quote
Also, radiants interface is not that hard, took me like 10minutes to figure out the basics(on the other hand, I still haven't gotten into modelling, cuz blenders interface is just confusing).
If you'd actually bothered to read my posts you'd see that I never said that Gtkradiant's interface was hard, I just said it was "painfully different" to Blenders. Blender's interface might seem "confusing" to you, but once you get used to it it becomes second nature, which is why I found it very hard to use Gtkradiant, because I'm so accustomed to a radically different UI. You seem to be trying to turn this into some kind of flame war about which is the better package, Gtkradiant or Blender, but you are totally missing the point. I've already stated that Gtkradiant is better for mapping
Quote
m4gnificent_b4st4rd - I'm aware that Gtkradiant is the best option for serious mapping
and I've stated that someone who wants to start making maps should use it
Quote
m4gnificent_b4st4rd - Obviously if I met someone who wanted to make maps and had never used either Blender or Gtkradiant then I'd advise them to go for Gtkradiant
I'm just a Blender user sharing some useful information with other Blender users, not trying to convert anyone from using Gtkradiant
Quote
m4gnificent_b4st4rd - I'm writing this stuff for people who are already Blender users
So, if you are happy with Gtkradiant go ahead and use it. Just don't feel the need to come here and start a Gtkradiant/Blender flamewar with someone who has already said that Gtkradiant is the better tool for the job.

cron

  • Donators
  • *
  • Posts: 197
  • Turrets: +22/-22
    • GrangerHub
Re: Making a Tremulous map in Blender.
« Reply #19 on: November 09, 2009, 03:42:29 pm »
I agree with m4gnificent_b4st4rd that radiant can be confusing once you've been using blender for a while. The best approach does seem to be to use blender for exporting the .map, and then editing in radiant, using this method:

http://www.katsbits.com/htm/tutorials/blender_export_model_to_map.htm
and
http://www.katsbits.com/htm/tutorials/blender_export_model_to_map_advanced.htm

Now if only someone would patch radiant to work more like blender.... :D


m4gnificent_b4st4rd

  • Guest
Re: Making a Tremulous map in Blender.
« Reply #20 on: November 09, 2009, 04:27:05 pm »
Quote
Now if only someone would patch radiant to work more like blender....
That would be fantastic.  ;D


A Spork

  • Spam Killer
  • *
  • Posts: 1010
  • Turrets: +37/-230
    • Spork - Unvanquished.net
Re: Making a Tremulous map in Blender.
« Reply #21 on: November 09, 2009, 07:44:55 pm »
I'm not trolling you, a .map is a file type. Like a .exe, or .jpeg.
The code behind it is useless, unless you know what it all means.
Don't shoot friend :basilisk:! Friend :basilisk: only wants to give you hugz and to be your hat

Proud Member of the S.O.B.F.O.B.S.A.D: The Society Of Basilisks For Other Basilisks Safety and Dominance
:basilisk:    :basilisk:    :basilisk:

Demolution

  • Posts: 1198
  • Turrets: +157/-64
Re: Making a Tremulous map in Blender.
« Reply #22 on: November 09, 2009, 08:10:03 pm »
Sometimes if you need to change only a few values, it is much simpler to open the .map with notepad and make the necessary changes.

Clan [AC] - For all your air conditioning needs please visit: http://s1.zetaboards.com/AC_NoS/index/
my brain > your brain.
and i am VERY stupid.

doomagent13

  • Posts: 506
  • Turrets: +18/-18
Re: Making a Tremulous map in Blender.
« Reply #23 on: November 09, 2009, 08:13:19 pm »
The "code" is the contents of a .map file.  The effectively ARE the same thing.  Posting the contents rather than just uploading a file makes it easier for others to see what he was trying to explain.  If you actually look at the contents of a .map file, you might find it to actually be somewhat legible.  It isn't the most useful form of the data, as most people cannot visualize what a map will look like from just the .map, but manual editing does have it's uses.  For that matter, you could make a map entirely from a text editor...

mooseberry

  • Community Moderators
  • *
  • Posts: 4005
  • Turrets: +666/-325
Re: Making a Tremulous map in Blender.
« Reply #24 on: November 09, 2009, 10:33:04 pm »
I'm not trolling you, a .map is a file type. Like a .exe, or .jpeg.
The code behind it is useless, unless you know what it all means.
::)

Step1: Copy code.

Step2: Create new text file (on desktop let's say)

Step3: Save as Toothpaste.map

Step4: Move to your /maps folder (or wherever you have radiant pointed to look for map folders)

Step 5: Open Radiant.

Step 6: Open Toothpaste.map

Step 7: ???

Step 8: PROFIT!

Wow, that was hard, and btw don't try to act like you know what you're talking about when you clearly have no idea.

EDIT: @bastard: Nice, beautiful map!  ;)

Also, just in case you weren't aware, info_player_start is not needed, and info_human_intermission, and info_alien_intermission are almost always included but not necessary to build or play.
« Last Edit: November 09, 2009, 10:57:32 pm by mooseberry »
Bucket: [You hear the distant howl of a coyote losing at Counterstrike.]

मैं हिन्दी का समर्थन

~Mooseberry.

Plague Bringer

  • Posts: 3815
  • Turrets: +147/-187
Re: Making a Tremulous map in Blender.
« Reply #25 on: November 09, 2009, 10:46:07 pm »
^

& common sense.
U R A Q T

UniqPhoeniX

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: Making a Tremulous map in Blender.
« Reply #26 on: November 10, 2009, 02:54:06 am »
Yes, you need an info_player_intermission, not info_player_start. Other then that, the .map works in radiant, compiles and plays. I'm wondering tho, how complex brushes can it create?

m4gnificent_b4st4rd

  • Guest
Re: Making a Tremulous map in Blender.
« Reply #27 on: November 10, 2009, 09:16:13 am »
mooseberry - thanks for telling me about info_player_intermission (and for appreciating the beauty of my map).  ;)

UniqPhoeniX - well it can currently only make cuboids and triangular prisms because those are the only things it checks for. I'm thinking of modifying the script so that it exports all meshes as brushes. this will mean i'll have to be careful about how i construct the meshes, but it will give me more flexibility. an understanding of how the brushes in the map file work is important at this point. each line in a brush description starts with 3 sets of numbers, like this-
( -1408.00000000 -1408.00000000 0.00000000 ) ( -1408.00000000 1408.00000000 0.00000000 ) ( 1408.00000000 1408.00000000 0.00000000 )
these describe 3 points in space. q3map2 uses these 3 points to describe an infinite plane. it makes an infinite plane for each of the lines in the brush description and then the resulting brush is the space within where those planes intersect (the shape has to be convex). this all sounds a bit weird but it will come in handy when it comes to making meshes for export. take a look at the mesh in this picture-

The triangles on the top and the bottom might look a bit odd, but since faces are used to describe infinite planes then those triangles should be fine for forming the top hexagon required for that shape. Once you get your head around thinking in infinite planes this allows you to make all kinds of complex brushes very quickly. Blender has a massive array of tools for doing this kind of mesh work and then you have the option of making python scripts to make it even faster. For example, say if you wanted loads of those hexagon things that I've modelled above in different sizes (not sure why you would though), a script could be made to accept various dimensions (distance from bottom to outer edge, outer edge to top, bottom radius, middle radius and top radius) and then it would instantly generate a mesh ready to be exported to a brush. Far quicker and easier than try to make one with the clip tool in Gtkradiant I imagine.

De-limiting the script so that it will export any mesh shouldn't be too hard to do and once I've got it sorted I'll start experimenting with it and post the results here. It could be a very useful tool.

m4gnificent_b4st4rd

  • Guest
Re: Making a Tremulous map in Blender.
« Reply #28 on: November 10, 2009, 07:35:16 pm »
I've got some good news. I ripped out the part of the code in the export script that checked for cuboids and triangular prisms so now my script is completely de-limited and will export any mesh (even if it doesn't make sense). To test it I another mesh like that octagonal thing from my previous post into that little box map I had and exported it. It turned up in the map without any problems.  8)

(screenshot with r_showtris on).

This means that I can create very complex shapes for Tremulous maps that are genuine brushes. These can be pasted into a .map file and then forgotten about, which makes life a lot simpler than messing around with Ase/md3 models. Btw, that shape took about 30 seconds to make in Blender, I'm guessing it might take a bit longer with Gtkradiant's clip tool.

Some other good news is that I've found a bsp import script. This means I can import compiled maps straight into blender without having to mess around with the decompiling to ase stage. This means that if a mapper had a difficult bit of brushwork that they needed they could just email me the bsp of what they had so far, I could use that as a guide to build the part they needed and then email back the chunk of .map file that they needed. This could be a seriously useful tool.

If anyone has any requests I'd be happy to help.  :)

m4gnificent_b4st4rd

  • Guest
Re: Making a Tremulous map in Blender.
« Reply #29 on: November 10, 2009, 09:05:56 pm »
Hmmm. I was experimenting and made this weird claw thing.

I was dissapointed to see that the edges of the segments didn't line up correctly, even though they were a perfect match in Blender. I've noticed this before with quake3 type maps, if you make brushes with too many weird angles errors start happening. Pretty annoying. I guess this is one situation were I'd have to use an Ase model instead.
« Last Edit: November 10, 2009, 09:07:38 pm by m4gnificent_b4st4rd »