Skip to main content

Hello to All!

I am new to FME and I am lost, I hope you could help me. My goal is to convert a Minecraft World to the IFC file format. The Minecraft World is very small, it is a void and has only one object. The object can be divided in 3 elements by material. I want to generate one output file with each element as an object in IFC. I also want to transfer the materials, if this is possible.As far as I understand, FME can read the Minecraft World only as a Point Cloud. I couldn't find a way to use the geometry or somehow recreate it for the IFC writer. I saw the AutoCAD to IFC conversion example, Reading Point Clouds and the How to make Minecraft worlds examples, and read the related Q&A;, but I am still struggling.I am uploading my files here:

 

Thanks,Victoria

P.S.My version of FME: FME Desktop 2017.1 Student License
My version of Minecraft: 1.12.1
OS: Windows 10

 

@Mark2AtSafe @dmitribagh

 


Hi @vi,

Minecraft format is a point cloud, so reading as a point cloud is the only possibility. Then, of course, we can turn it into anything what makes sense, including an IFC model.

You can replace the points with cubes, which can be written to IFC. So, coerce your point cloud to points, get the coordinates of each point (CoordinateExtractor), build a square (2DBoxReplacer, where point's x and y are minimal coordinates, and x+1, y+1 are the maxes), then 3DForcer can bring them to z, and Extruder up 1 unit will make cubes.

The cubes then can go to IFC (for example, as ifcSlab). I just made a little test, which seems to generate a reasonable IFC.

Of course, this will work fast only with really small Minecraft worlds - a few hundreds to a few thousands of points. If you need to convert bigger worlds with hundreds of thousands or millions of points, I would recommend a bit different approach - we can generate rasters from point clouds (multiple rasters by z), create polygons RasterToPolygonCoercer, after that we can switch back to the algorithm I explain above. I tried this method to convert bigger models to KML, and it worked reasonably well.

I hope this helps, Please let me know if you have more questions.

Dmitri

 


Hi @vi,

Minecraft format is a point cloud, so reading as a point cloud is the only possibility. Then, of course, we can turn it into anything what makes sense, including an IFC model.

You can replace the points with cubes, which can be written to IFC. So, coerce your point cloud to points, get the coordinates of each point (CoordinateExtractor), build a square (2DBoxReplacer, where point's x and y are minimal coordinates, and x+1, y+1 are the maxes), then 3DForcer can bring them to z, and Extruder up 1 unit will make cubes.

The cubes then can go to IFC (for example, as ifcSlab). I just made a little test, which seems to generate a reasonable IFC.

Of course, this will work fast only with really small Minecraft worlds - a few hundreds to a few thousands of points. If you need to convert bigger worlds with hundreds of thousands or millions of points, I would recommend a bit different approach - we can generate rasters from point clouds (multiple rasters by z), create polygons RasterToPolygonCoercer, after that we can switch back to the algorithm I explain above. I tried this method to convert bigger models to KML, and it worked reasonably well.

I hope this helps, Please let me know if you have more questions.

Dmitri

 

Hi @dmitribagh,

 

Thank you so much for the quick answer and the thorough explanation! I am going to try this now.

 

Could you tell me what you think about keeping the material names? Is it this possible, and do I need the material styler transformer?

 

Have a nice weekend!

 

Victoria

 

 

 


Hi @dmitribagh,

 

Thank you so much for the quick answer and the thorough explanation! I am going to try this now.

 

Could you tell me what you think about keeping the material names? Is it this possible, and do I need the material styler transformer?

 

Have a nice weekend!

 

Victoria

 

 

 

Hi @vi,

 

the Styler transformer won't keep the materials - basically, it assigns Minecraft numbers to features, and it is a Minecraft's job to interpret the numbers as materials. You would have to make a reverse work - using the numbers in blockID and blockData components (or attributes after coercion), set the proper IFC attributes. This is certainly possible - I can suggest using AttributeValueMapper, TestFilter, and AttributeCreator, and maybe IFC transformers.

 

Dmitri

 


Hi @vi,

 

the Styler transformer won't keep the materials - basically, it assigns Minecraft numbers to features, and it is a Minecraft's job to interpret the numbers as materials. You would have to make a reverse work - using the numbers in blockID and blockData components (or attributes after coercion), set the proper IFC attributes. This is certainly possible - I can suggest using AttributeValueMapper, TestFilter, and AttributeCreator, and maybe IFC transformers.

 

Dmitri

 

Hi @dmitribagh,

 

Thank you for the info! I tried everything and it seemed to work, the translation was successful and I can see the correct geometry in the data inspector, but when I open the IFC-file in Revit there is nothing. My guess is that I messed up something very basic when reading Minecraft or coercing the point cloud, but I can't put my finger on it.

 

I also tried to keep the materials, but that part didn't work at all, maybe because of the first problem.

 

Could you please take a look at my file and help me?

 

Best,

 

Victoria

 

minecraft2ifc.fmwt

 

minecraft2ifc.fmwminecraft2ifc-result1-translation-successful.pngminecraft2ifc-result2-translation-successful.png

Hi @vi,

if you see the correct geometries in Data Inspector, it means you created them correctly.

Writing to IFC is a bit tricky, you may want to refer to our knowledge base articles such as this one:

 

https://knowledge.safe.com/articles/595/autocad-to-ifc-conversion-example.html

 

 

In my example, I added GeometryPropertySetter_2 and set geometry name to 'Body' for all cubes, and that did the trick - I was able to see the output in Revit.

See the attached file - a part of it is made based on my earlier description, another part is copied and slightly adjusted from the link above. I used random numbers instead of blockID, but it should be the same. If you need just the numbers of the blocks, simply send them to the Reference attribute in AttributeCreator (the one that does not have any numbers in its name), use AttributeValueMapper only if you would like to map numbers to words (or other numbers), for example, if blockID is 2 make call it 'grass', or if is 1, make it 'stone'.

Unfortunately, I am not really an IFC expert, so if this does not help, I may need to ask my colleagues to help.

Dmitri


Hi @vi,

I am sorry I didn't mention it before - you have to specify the non-standard components you want to preserve in "Point Components to Preserve" parameter of the PointCloudCoercer transformer. FME is currently lacking some component capabilities available for attributes, such as exposing components not covered by LAS format. Simply open the transformer parameters and type the names of the components in that parameter - blockID and blockData. After this transformers, the point cloud will be split into individual points and the components you typed will be available as attributes on each point - you can check it in Data Inspector. AttributeValueMapper will also work as expected.

Dmitri


Reply