Jump to content


Photo

Blender 2.61 - export to .map

a script

79 replies to this topic

#1 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1647 posts

Posted 06 January 2012 - 06:30 PM

This is quite exciting :) I've just found out that there's a script that can export geometry from Blender to Quake 3 .map format. That means you can not only make static meshes but also BSP entirely in Blender. It's hidden by default, you have to enable it in user preferences -> addons -> import / export. I created a default Blender torus:

export_02.png

The walls don't have any thickness so script has to add inner walls. That's what "thickness" option is for:

export_01.png

Exported .map needs to be converted to Doom 3 map format. Thankfully there's a neat converter: http://www.fileplane...3-Map-Converter
The program converts not only .map but also other files. There's a lot of options which I simply unchecked. You need to put path to Quake 3 but a false one will do just fine. In converted .map file you have to remove these lines:

export_05.png

Now you can open the map in Darkradiant. I applied the stone texture in Radiant. As you can see exporter has added thickness to the shape and now it has inner walls:

export_03.png
export_04.jpg

In game you can see that compiler has removed the unneeded polygons (since no entity will ever get inside the torus):

export_06.jpg
export_07.jpg
  • jaxa likes this

It's only a model... /// My channel on YouTube


#2 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1647 posts

Posted 06 January 2012 - 06:32 PM

Here's a related tutorial: http://www.katsbits....cs-tutorial.php

It's only a model... /// My channel on YouTube


#3 SeriousToni

SeriousToni

    Beginner Contest 2012 Winner

  • Member
  • PipPipPipPip
  • 2207 posts

Posted 06 January 2012 - 06:40 PM

That's so cool and in 3ds Max 12 you can't even import .ase (though you can export .ase) :(
"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

#4 Baddcog

Baddcog

    Mod hero

  • Development Role
  • PipPipPipPipPip
  • 5360 posts

Posted 06 January 2012 - 06:59 PM

Lol wut? Max 2012 breaks the dreaded import ase issue only to make it worse by not having an exporter? What's the purpose of that?

--------

Is cool that you can work in blender, however I don't know how useful it is unless you can grid snap good. Other wise you'll get leaks all over. And building with scripted thickness would be tough to get right, better to just build with cubes like in DR. And in DR you can align tex at the same time, also using props like door frames to keep scale correct...

And in DR you can cut a brush up into parts for doors/windows, then turning the existing hole fillers as vportals.

And I suppose you can't make patches, or maybe you can just use a plane and it basically is a patch (though probably not editable with verts/rows). By the looks of that torrus it seems like a 3x3 plane might just end up as 9 quads in DR and not an actual patch.
Dark is the sway that mows like a harvest

#5 SeriousToni

SeriousToni

    Beginner Contest 2012 Winner

  • Member
  • PipPipPipPip
  • 2207 posts

Posted 06 January 2012 - 07:12 PM

Lol wut? Max 2012 breaks the dreaded import ase issue only to make it worse by not having an exporter? What's the purpose of that?


Hey Baddcog!
Yes I have got 3ds Max 2012 and you can not import .ase files. You can export .ase files though. I don't get it why.. This was the case in 2011 too, but there were plugins available (which aren't available for 2012). So I can export models but can't import them which is annoying since you could export entire rooms from Dark Radiant for 3ds max. You could but you can't ^^

I guess that's the same idiocy as when they decited not to use Reactor anymore and instead the NVidia thingy.

Edited by SeriousToni, 06 January 2012 - 07:14 PM.

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

#6 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1647 posts

Posted 06 January 2012 - 07:38 PM

You can snap to grid in Blender just as easy as in Radiant. I used torus to demonstrate how easily you can create complicated shapes. Normally all visible geometry should be ase. I see it as a tool for invisible stuff like clip models and BSP to seal complicated rooms like twisted, round skewed tower. In the grass demo there's a huge ground model:

gass.jpg

NPC can't find path on models or patches so I had to put brushes below it:

gass2.jpg

I spent many ours on it and the effect is still not perfect. In Blender it would be as simple as duplicating the ground model, extrude it downwards and export. And the effect would be perfect.

It's only a model... /// My channel on YouTube


#7 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9500 posts

Posted 06 January 2012 - 08:04 PM

Great find Arcturus.

I'll have to give Blender another shot. I've heard the interface is much more intuitive these days.
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#8 Baddcog

Baddcog

    Mod hero

  • Development Role
  • PipPipPipPipPip
  • 5360 posts

Posted 06 January 2012 - 11:31 PM

@Serious Toni, I guess I misread your post. No, there hasn't been a good exporter for many new versions of Max. I had 8 for awhile and before that I had 5. 5 had a scriptt, up to at least 8 didn't.

@Arcturus, Ai can walk on patches, they just can't pathfind, so yeah you need to put brushes under. However they can be up to 48 units or so lower than the models/patches, so they don't have to bee all that accurate.

It looks like you were trying toi get all those brushes as close as possible, when all you probably really needed was one giant wedge. It would be alot cleaner pathfinding and much cleaner to work with too. It would only take 5 minutes too.
Dark is the sway that mows like a harvest

#9 Nosslak

Nosslak

    Advanced Member

  • Member
  • PipPipPip
  • 680 posts

Posted 07 January 2012 - 02:51 AM

I'll have to give Blender another shot. I've heard the interface is much more intuitive these days.

Yeah, you really should! The basics haven't changed all that much though, so if you were unhappy with the hotkey-based interface chances are that you'll not like it this time around either.

Yes I have got 3ds Max 2012 and you can not import .ase files. You can export .ase files though. I don't get it why.. This was the case in 2011 too, but there were plugins available (which aren't available for 2012). So I can export models but can't import them which is annoying since you could export entire rooms from Dark Radiant for 3ds max. You could but you can't ^^

I think the same problem's present in Blender. I haven't looked very hard but I haven't been able to find any script to import .ASE either.

#10 SeriousToni

SeriousToni

    Beginner Contest 2012 Winner

  • Member
  • PipPipPipPip
  • 2207 posts

Posted 07 January 2012 - 06:35 AM

Heh, really? Isn't it funny that these programs can export but can not import?? :D
"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

#11 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1647 posts

Posted 07 January 2012 - 07:19 AM

It looks like you were trying toi get all those brushes as close as possible, when all you probably really needed was one giant wedge. It would be alot cleaner pathfinding and much cleaner to work with too. It would only take 5 minutes too.

No, I'm sure it wasn't that simple. They still have problems with pathfinding at some places, they sometimes have to go round, even after hours of tweaking.

It's only a model... /// My channel on YouTube


#12 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1647 posts

Posted 07 January 2012 - 07:23 AM

I think the same problem's present in Blender. I haven't looked very hard but I haven't been able to find any script to import .ASE either.

There's a script for Blender 2.4x and it's not a big deal to have two versions installed.

It's only a model... /// My channel on YouTube


#13 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1647 posts

Posted 08 January 2012 - 01:48 PM

Ok, the script has some drawbacks. You can easily make shapes like this:

2.png

Every brush is perfectly aligned:

1.png

But if you modify it liike this:

3.png

All brushes are misaligned:

4.png

So the shape has to be symmetrical on x and y. I don't see much sense here. In both cases vertices aren't snapped to grid. I read that script automatically rounds degrees in brushes. But it doesn't do that in the first case.

It's only a model... /// My channel on YouTube


#14 OrbWeaver

OrbWeaver

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 7641 posts

Posted 08 January 2012 - 02:19 PM

Creating detailed or curved geometry with brushes isn't really a good idea in any case. They don't have the same flexibility as a proper mesh, and you will never get any smooth shading.

#15 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1647 posts

Posted 08 January 2012 - 02:24 PM

Yes, as I wrote earlier this is for non-visible stuff.

It's only a model... /// My channel on YouTube


#16 Serpentine

Serpentine

    Uber member

  • Active Developer
  • PipPipPipPip
  • 2903 posts

Posted 08 January 2012 - 03:18 PM

I think the same problems present in Blender. I havent looked very hard but I haven't been able to find any script to import .ASE either.

You should be able to find the assimp based importer for blender, it should be able to import most ASE, as well as all of the other TDM formats. I think it's being maintained atm, if not I can update it again.

#17 Baddcog

Baddcog

    Mod hero

  • Development Role
  • PipPipPipPipPip
  • 5360 posts

Posted 08 January 2012 - 06:10 PM

The reason why those brushes get tweaked (mainly) is that they all have th be convex. So some of the faces are ending up concave (and you can't turn edges like you do in a 3d program).

But you can effectively turn the edges by cutting all the cubes in half. But even when I've done that with simple squares in DR to make the brushes not optimize together it can be very hard to get the textures to align properly if at all.

Doom3 is pretty picky about brushes when it compiles and that's probably why those black brushes of death appear.
Dark is the sway that mows like a harvest

#18 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1647 posts

Posted 12 January 2012 - 07:20 PM

23.png

Now you probably wonder: what the hell is this? I did some testing and found that you can't export one ring of a torus:

46.png

without small misalignments. You can however export whole torus and then delete unneeded parts in DarkRadiant. Also, if shape can be exported without misalignments it can also be exported rotated without a problem. With that in mind I started to build a tower.

01.png

Now select top edges and place a cursor in line with them.

02.png

It's important that cursor is aligned horizontally, otherwise torus will be incorrect. Then spin the vertices 360 degrees. I used 72 steps, that gives 5 degrees per step.

03.png

Now select this ring:

04.png

Copy it and convert into new object. Now rotate it -5 degrees for easier extruding:

05.png

Extrude new part of the tower:

06.png

Clean the rotation:

06b.png

This way you can add more and more parts. You can change direction in which the tower is skewed.
At the top I added a battlement:

21.png
24.png

It's only a model... /// My channel on YouTube


#19 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1647 posts

Posted 12 January 2012 - 07:43 PM

Before exporting I will need to establish where to put windows. For that I need to know where are the stairs. So I copied the meshes to another layer:


25.png


Add a loop where the top of the door will be:


26.png


This way in Radiant we will be able to simply delete four brushes and the place for the door will be ready.


28.png


To add stair is put a single step and an "empty". Then I used array modifier with empty as a target. By rotating and scaling this empty you can easily modify shape of the stair. You can set number of steps and their position relative to the original step in modifier's options.


29.png
30.png


When all the loops needed for windows are ready:


47.png


All the elements can be exported as .map (one at a time). There can't be holes for windows, just loops that will create brushes of the proper size ready to be removed in DarkRadiant.

Export each part separately and save as a prefab. When you have all the prefabs simply put them together:

36.png
45.png

It's only a model... /// My channel on YouTube


#20 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1647 posts

Posted 12 January 2012 - 07:46 PM

1.jpg
2.jpg
3.jpg

These cracks inside are because only outside vertices are connected:

37.png

That's enough to seal inside of the tower.

It's only a model... /// My channel on YouTube


#21 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1664 posts

Posted 13 January 2012 - 12:48 PM

Thats pretty fascinating man, surely seems like there is a LOT of potential to create map geometry in sophisticated shapes, already in working brush form! I had seen the katsbits tutorial before, but it was a very simple parking lot kind of space, nothing of this magnitude...

#22 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1647 posts

Posted 13 January 2012 - 04:39 PM

Yes, I think it has a lot of potential :)
I didn't mention that script has hard-coded limit of 'face width' to 10. With scale 1 that's a bit too little for my needs. I want 15. The solution to that is to scale down the mesh x0.1 times and export with scale 10 and face width 1.5. I tried to modify the script for Blender 2.6.1 to change this value to say 20, but without success. I managed to change it in Blender 2.49 though and exported normally as width 15.
Funny, the script has always been there for years. I probably didn't think that there might be a Quake to Doom converter and forgot about it until now.

It's only a model... /// My channel on YouTube


#23 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9500 posts

Posted 14 January 2012 - 09:26 AM

The biggest potential gain I see from this is that you could:

1) lay down rough map geometry
2) plot areas where you wish to VP
3) do detail work on high profile geometry items
4) export the map excluding stuff from step 3
5) save stuff from step 3 as ASE models

It'll simplify the process of hybrid mapping styles. It would even allow you to AO bake to both models and brushes at the same time... Just clone the whole map then scale it a little then bake then export is as a model (or several models). Pretty nice improvement over the previous workflows for this.
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#24 demagogue

demagogue

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 5500 posts

Posted 15 January 2012 - 02:23 AM

Just to be clear, you mean steps 1-5 are all inside Blender, right?

Of course the other direction would be to build modeling features right into Dark Radient so you could build a custom model right in situ. Wouldn't that be dreamy.
Posted Image

#25 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1664 posts

Posted 15 January 2012 - 06:01 AM

Learning Blender is a chore man, Im sorry to say, so its probably going to be a while before I can give this any use. I can think of ways that building a detailed house interior with a polygon modeler and than exporting it as brushes would be a lot faster and more confortable than doing it with the rigid pieces inside DR; but I also agree with Arcturus that there is great potential in just modeling free-style, organic shapes to be used as architecture models, and using the original shape as base for a quick and accurate double to be used as de facto underlying map geometry.

Now if only I had the brains to learn the program... (Im actually learning two other 3d modelers right now (Rhino and Revit Architecture, that's the main problem, your memory is psread to thin... 3 with DR, if you think about it...)

Edited by RPGista, 15 January 2012 - 06:02 AM.




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users