Quake3World.com Forums
     Level Editing & Modeling
        Minecraft to Quake3 level converter


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Minecraft to Quake3 level converter

Recruit
Recruit
Joined: 20 Aug 2011
Posts: 8
PostPosted: 09-08-2011 08:40 AM           Profile Send private message  E-mail  Edit post Reply with quote


Ever wondered how it would be to strafejump through a minecraft level?
I did. So I started a minecraft to quake3 level converter as a small programming project.

It was not hard to read the block information from the minecraft server_level.dat,
and with some simple algorithms I filtered out all the blocks you cannot see or reach,
and merged the other blocks as good as I could.
Then to write the blocks as brushes to create the .map file.

I released the map for the defrag mod here: http://ws.q3df.org/map/mineqraft/

The map area is 110x110 brushes which is about the limit of what I could compile with q3map2.exe.
The VIS stage is just too heavy (and memory consuming).

I decided to release the current state of the code on github.
It is not good looking or has good names for everything but at least it gets the job done.

https://github.com/o40/Mineqraft

I will continue working on this sporadically to implement som better optimization and some other features I want to try out.

The big limitation for me at the moment is that I used the old (and simple) minecraft level format and I
have not yet managed to connect to the server with a client to do some alterations of the level generated by the server.

If you like to contribute to this project send me a PM.

The thing I want most is some kind of parser for the minecraft region format (.mcr) so I can use the latest version of the server.

If you just want to test this converter out you can grab the code from github and compile it yourself,
or send me a PM and I can make you a binary.

Image Image

http://koponen.biz/mc2et/shot0004.jpg




Top
                 

This is not Æon!
This is not Æon!
Joined: 20 Jan 2002
Posts: 2222
PostPosted: 09-08-2011 09:18 AM           Profile Send private message  E-mail  Edit post Reply with quote


That's pretty cool =)



_________________
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe


Top
                 

Grunt
Grunt
Joined: 16 Aug 2011
Posts: 55
PostPosted: 09-08-2011 03:13 PM           Profile Send private message  E-mail  Edit post Reply with quote


To improve vis, make the thing mark unimportant (not covering much) blocks as detail and use caulk on the invisible sides. I can't help you much in regards on how should detail be discriminated from structural, but your best bet would be to have this converter look for natural "rooms", that is boundaries of a cavern - and base structural on that as opposed to single blocks. While I'm a shitty programmer, I don't think that implementing it to behave based on a simple grid of 4x4x4 and 2x2x2 chunks would be that hard. Last but not least, it should merge as many detail brushes as possible afterwards. Below is how it'd work if done in 2D, but you can adapt that to voxels as well. Color means priority of blocks, red being structural, green detail while yellow could be either depending on settings.
Image




Top
                 

Veteran
Veteran
Joined: 23 Aug 2011
Posts: 174
PostPosted: 09-08-2011 03:35 PM           Profile Send private message  E-mail  Edit post Reply with quote


Amazing!




Top
                 

Immortal
Immortal
Joined: 12 Mar 2005
Posts: 2205
PostPosted: 09-08-2011 04:15 PM           Profile   Send private message  E-mail  Edit post Reply with quote


This is indeed pretty badass. I was thinking to myself for a while that it would be cool to import .map files in to minecraft so we could build castles and such with brushes in GtkRadiant.

Awesome to see others are having similar thoughts.




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 09-08-2011 04:45 PM           Profile Send private message  E-mail  Edit post Reply with quote


LOL... I made a copy of Q3DM6 on the old Q3W Minecraft server, about time we could do things the other way around.

For VIS, you are better off converting everything to detail and then manually drop caulk and hint brushes in as necessary. Just leave the outer box as structural by default.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Insane Quaker
Insane Quaker
Joined: 28 Dec 2009
Posts: 298
PostPosted: 09-08-2011 08:29 PM           Profile Send private message  E-mail  Edit post Reply with quote


In GTKRadiant 1.4, you can make brushes detail by selecting them and pressing CTRL+M. You can see which brushes are detail or not by pressing CTRL+D(turns on/off detail brushes from view).




Top
                 

Grunt
Grunt
Joined: 24 May 2011
Posts: 71
PostPosted: 09-08-2011 08:45 PM           Profile Send private message  E-mail  Edit post Reply with quote


What? THIS IS QUAKE III ARENA!




Top
                 

Recruit
Recruit
Joined: 20 Aug 2011
Posts: 8
PostPosted: 09-08-2011 10:24 PM           Profile Send private message  E-mail  Edit post Reply with quote


Ouija: Thanks for the nice picture. It is a very nice suggestion. I will play around with this when I get home.

I can post some screens of how it looks today if you are interested.




Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 44138
PostPosted: 09-08-2011 11:25 PM           Profile   Send private message  E-mail  Edit post Reply with quote


That's really cool. How long did it take to compile this map?




Top
                 

Recruit
Recruit
Joined: 20 Aug 2011
Posts: 8
PostPosted: 09-09-2011 07:49 AM           Profile Send private message  E-mail  Edit post Reply with quote


Uhm, 7 hours I think, VIS was probably >90% of that time.

Some screens of brush optimization:

Image
Image
Image




Top
                 

Grunt
Grunt
Joined: 16 Aug 2011
Posts: 55
PostPosted: 09-09-2011 10:26 PM           Profile Send private message  E-mail  Edit post Reply with quote


Obsidian: Hints aren't necessary, while placing things outside the hull won't be as efficient as structural/detail when it comes to culling.
Consider using different voxel chunk sizes for structural depending on settings, higher chunks = faster vis but slower runtime. Q3 handles open spaces badly so some vis is necessary here and there.

Detail brushes need manual merging, q3map doesn't do that for you I think. Even if it does, for the sake of cleaner .map files - below is the depiction of an algorithm that takes care of detail merging. (could apply to structural as well) Again, it's 2D but you can adapt it for voxels:
Image
I forgot to take textures into account, but I guess you can figure that one out on your own. Honestly, I'd rather just code all that crap by myself but making changes to someone else's code is too much of a pain in the arse for me.




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 09-10-2011 07:13 AM           Profile Send private message  E-mail  Edit post Reply with quote


Ouija wrote:
Obsidian: Hints aren't necessary, while placing things outside the hull won't be as efficient as structural/detail when it comes to culling.

Whether hints are necessary would depend on the layout of the map, wouldn't it? On a simple box map, no; on a map with valleys and turns, yes.

I'm not sure what you mean by "placing things outside the hull", anything outside the hull isn't even part of the map. Perhaps I'm misunderstanding you and something is lost in the translation (I don't think English is your primary language?).


Ouija wrote:
Consider using different voxel chunk sizes for structural depending on settings, higher chunks = faster vis but slower runtime. Q3 handles open spaces badly so some vis is necessary here and there.

You may want to read about how vis works. Look up SPoG's technical articles, djbob's hint tutorial and the hint tutorial I wrote here on Q3W. You're right about Q3 handling open spaces badly because there is little suitable geometry for occlusion, but using larger or smaller brushes on planar surfaces won't affect in game performance if your PVS includes the entire map. You're better off converting all the voxels to detail so your map actually compiles. The principle problem the OP was having was that VIS was getting too complex, so converting to detail simplifies the VIS process when the PVS is completely futile anyway. Merging brushes will only help with rendering performance because there are less polygons to render.


Ouija wrote:
Detail brushes need manual merging, q3map doesn't do that for you I think.

Q3Map2 doesn't generally merge structural or detail brushes at all. There are some special cases, but I wouldn't depend on Q3Map2 doing it for you. Some type of scan-line or ray-trace algorithm as you suggested would probably be a good idea though.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Recruit
Recruit
Joined: 20 Aug 2011
Posts: 8
PostPosted: 09-11-2011 08:59 AM           Profile Send private message  E-mail  Edit post Reply with quote


I am doing some tests with making everything detail and then hinting it. For this test I used a bit too large hints but you get the idea.

Before:
Image

After (with 4x4 block large hints):
Image

I have a lot of code cleanup to do though, and I just feel like playing Deus Ex at the moment.

Other stuff I might do on weekends:
http://i.imgur.com/JueBw.jpg




Top
                 

4days Joined: 15 Apr 2002
Posts: 8193
PostPosted: 09-13-2011 05:18 AM           Profile Send private message  E-mail  Edit post Reply with quote


Hipshot wrote:
That's pretty cool =)




Top
                 
Quake3World.com | Forum Index | Level Editing & Modeling


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.