Quake3World.com
https://www.quake3world.com/forum/

Minecraft to Quake3 level converter
https://www.quake3world.com/forum/viewtopic.php?f=10&t=46333
Page 1 of 1

Author:  o40 [ 09-08-2011 08:40 AM ]
Post subject:  Minecraft to Quake3 level converter

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

Author:  Hipshot [ 09-08-2011 09:18 AM ]
Post subject:  Re: Minecraft to Quake3 level converter

That's pretty cool =)

Author:  Ouija [ 09-08-2011 03:13 PM ]
Post subject:  Re: Minecraft to Quake3 level converter

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

Author:  dghost77 [ 09-08-2011 03:35 PM ]
Post subject:  Re: Minecraft to Quake3 level converter

Amazing!

Author:  Silicone_Milk [ 09-08-2011 04:15 PM ]
Post subject:  Re: Minecraft to Quake3 level converter

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.

Author:  obsidian [ 09-08-2011 04:45 PM ]
Post subject:  Re: Minecraft to Quake3 level converter

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.

Author:  deqer [ 09-08-2011 08:29 PM ]
Post subject:  Re: Minecraft to Quake3 level converter

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).

Author:  IveGotPenisEnvy [ 09-08-2011 08:45 PM ]
Post subject:  Re: Minecraft to Quake3 level converter

What? THIS IS QUAKE III ARENA!

Author:  o40 [ 09-08-2011 10:24 PM ]
Post subject:  Re: Minecraft to Quake3 level converter

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.

Author:  Eraser [ 09-08-2011 11:25 PM ]
Post subject:  Re: Minecraft to Quake3 level converter

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

Author:  o40 [ 09-09-2011 07:49 AM ]
Post subject:  Re: Minecraft to Quake3 level converter

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

Some screens of brush optimization:

Image
Image
Image

Author:  Ouija [ 09-09-2011 10:26 PM ]
Post subject:  Re: Minecraft to Quake3 level converter

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.

Author:  obsidian [ 09-10-2011 07:13 AM ]
Post subject:  Re: Minecraft to Quake3 level converter

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.

Author:  o40 [ 09-11-2011 08:59 AM ]
Post subject:  Re: Minecraft to Quake3 level converter

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

Author:  4days [ 09-13-2011 05:18 AM ]
Post subject:  Re: Minecraft to Quake3 level converter

Hipshot wrote:
That's pretty cool =)

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/