3D model importing guide: Faster, Better, (Stronger?)

    Criss

    Social Media Director
    Joined
    Jun 25, 2013
    Messages
    2,187
    Reaction score
    1,772
    • Master Builder Bronze
    • Video Genius
    • Competition Winner - Stations
    Shame that schematics cannot physically go beyond the 256 height limit despite altering the kv6toshcematic files. It also appears that some ships get cut off while others wrap when hitting the height limit. Would you happen to know if something triggers this difference?
     
    Joined
    Jul 2, 2013
    Messages
    47
    Reaction score
    86
    I've personally only seen the wraparound taking place, then again after I saw that once I stopped using taller models. I guess with the larger EVE models all dimensions are larger than 256, so rotation doesn't solve anything. Are you doing anything different in the process when you get wraparound or cut-off? I know that the standard converter you can find will do the cut off after 256 and the one I provided will cut off after 2048, but other than that I'm not sure what would cause the difference.
     

    Criss

    Social Media Director
    Joined
    Jun 25, 2013
    Messages
    2,187
    Reaction score
    1,772
    • Master Builder Bronze
    • Video Genius
    • Competition Winner - Stations
    I've personally only seen the wraparound taking place, then again after I saw that once I stopped using taller models. I guess with the larger EVE models all dimensions are larger than 256, so rotation doesn't solve anything. Are you doing anything different in the process when you get wraparound or cut-off? I know that the standard converter you can find will do the cut off after 256 and the one I provided will cut off after 2048, but other than that I'm not sure what would cause the difference.
    Wait, did the one that you provide that is modified, does it cut off it's height or it's length? I noticed you posted a 2048 modified one and was going to try it however I also read that schematic files cannot support certain values. I assumed this meant height past 256.

    I modified the files so that it would not give me the error while it was running telling me models were too large. All axis set to 2560. I run the entire thing through eclipse because I am new to all of this and can't seem to export the jar file correctly.

    Now one model, a difter battleship was about 100+ blocks over the height limit. It cut it off on the bottom and copied it back in place on top.

    Then I imported a jovian Phantom, a much taller ship. It cut off the tops and bottoms and did not wrap them anywhere. Nothing should have changed as I did all this during the same session of messing with it. I can give some screenshots if you want.
     
    Joined
    Jul 2, 2013
    Messages
    47
    Reaction score
    86
    Wait, did the one that you provide that is modified, does it cut off it's height or it's length? I noticed you posted a 2048 modified one and was going to try it however I also read that schematic files cannot support certain values. I assumed this meant height past 256.
    It cuts of the height. Length and width are probably limited to a far higher, yet unkown, power of 2. I meant that if at least one dimension of your ship is <=256, you can rotate it beforehand in something like blender, then rotate it back in SMedit. Cutting it up into pieces can also be a neat idea though.

    I was hoping to try some wrapping models myself, but it seems the SMedit download I linked to has gone offline. (Fresh windows install, so my previous jar is gone). I'll definitely be able to test it on friday though, maybe earlier if I find another source for the SMedit .jar before that.

    I wonder if anyone out there has the knowhow to make a direct converter without the intervention of the schemtic format. You'd be able to get more accurate colours and no more nasty height limit. Looked at it myself but it's way beyond my current level of programming skills.
     
    Joined
    Oct 31, 2015
    Messages
    10
    Reaction score
    1
    spacie , I tried to import a 1:1 scale EVE apocalypse like Criss did in his video, however I'm having problems with the kv6toschematic.jar.

    Whenever I import a model in it it just closes, very similar to Zenaris problem. I also use windows 10 ilke Zenaris does, so I'm guessing this is a windows 10 issue. Do you know any workarounds?

    Btw, I can use the regular kv6toschematic which has the 500 lenght limit. The modified one however doesn't work for me.
     
    Joined
    Jul 2, 2013
    Messages
    47
    Reaction score
    86
    spacie , I tried to import a 1:1 scale EVE apocalypse like Criss did in his video, however I'm having problems with the kv6toschematic.jar.

    Whenever I import a model in it it just closes, very similar to Zenaris problem. I also use windows 10 ilke Zenaris does, so I'm guessing this is a windows 10 issue. Do you know any workarounds?

    Btw, I can use the regular kv6toschematic which has the 500 lenght limit. The modified one however doesn't work for me.
    I'm using windows 10 and it's quite functional for me, also tried the one I put up for download, seems to be fine as well. Would you mind checking what version of Java you're running? That's the only fixable issue you could have that I can think of.
     
    Joined
    Nov 16, 2014
    Messages
    450
    Reaction score
    113
    • Legacy Citizen
    • Purchased!
    • Community Content - Bronze 1
    I used the schematic method, but color doesn't happen, I just get a grey shell like normal. Am I doing something wrong, or do I have to manually add color?
     
    Joined
    Oct 31, 2015
    Messages
    10
    Reaction score
    1
    I'm using windows 10 and it's quite functional for me, also tried the one I put up for download, seems to be fine as well. Would you mind checking what version of Java you're running? That's the only fixable issue you could have that I can think of.
    What version and build of java do you use?
    [DOUBLEPOST=1446450922,1446448844][/DOUBLEPOST]Fixed it by installing Java 8 build 66. spacie you should mention that in the main post. Zenaris you ought to do that:
    http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
     
    Joined
    Jul 30, 2015
    Messages
    11
    Reaction score
    1
    • Purchased!
    Hey Guys, I wanted to share a quick tool I made for Poly2Vox

    Personally I always hate to have to use the CMD and then browse to the folder that I have Poly2Vox in.
    So I present "Drop File here.BAT"

    Nothing fancy: just drag and drop your OBJ file onto it (The OBJ file doesn't even have to be in the same folder as Poly2Vox.exe/Drop File here.BAT), a window will pop up:


    Just enter your dimension and hit Enter, you will find your KV6 file in the Poly2Vox folder with the same name as the Obj file. (again doesn't matter where the OBJ file is on your computer, the KV6 will appear along side the "drop file here.BAT")

    Happy Converting ;)
     

    Attachments

    • Like
    Reactions: Dire Venom
    Joined
    Oct 11, 2015
    Messages
    6
    Reaction score
    3
    is there anything i can do about the max height limit being 256.
    whenever something is higher then 256 the top gets cut off and merged with the bottom.

    also when i take for example jita 4 station. and convert the 3ds file to a kv6 file. it's oriented wrong. flipped 90 degrees.
    it's pretty much impossible to get really big things converted.
    is there a way to convert things and make em as big as i want. without having to keep to a max height of 256
     
    Joined
    Jul 30, 2015
    Messages
    11
    Reaction score
    1
    • Purchased!
    Well best I can figure is put whatever model you are working on on its side in a 3d program. then convert it into a schematic and re-rotate in smedit.

    other then that, try cutting the model up in multiple parts and then cobble it together inside StarMade, by using the advanced tools/docking.

    TIP: You can change the max size for advanced build. open up Server.CFG with notepad and look for
    Code:
    PLAYER_MAX_BUILD_AREA =
    This will define the max area that you can add/remove/copy/paste in advanced build. I have mine set to 500
     
    Joined
    Jan 9, 2015
    Messages
    136
    Reaction score
    11
    • Purchased!
    • Legacy Citizen
    Hey Guys, I wanted to share a quick tool I made for Poly2Vox

    Personally I always hate to have to use the CMD and then browse to the folder that I have Poly2Vox in.
    So I present "Drop File here.BAT"

    Nothing fancy: just drag and drop your OBJ file onto it (The OBJ file doesn't even have to be in the same folder as Poly2Vox.exe/Drop File here.BAT), a window will pop up:


    Just enter your dimension and hit Enter, you will find your KV6 file in the Poly2Vox folder with the same name as the Obj file. (again doesn't matter where the OBJ file is on your computer, the KV6 will appear along side the "drop file here.BAT")

    Happy Converting ;)

    is the dimensions just /v#? or is it something alse? im trying to convert a .3db file cause i seen that ploy2vox can support them... it's not working :p


    EDIT: oh wait..it says 3DS....
     
    Joined
    Jul 4, 2016
    Messages
    1
    Reaction score
    0
    Hello,

    In the comparison chart I noticed that the poly2vox method is said to be able to "theoretically handle any x and y size". How might this be achieved?

    When I try to run the line "poly2vox <filename> /v6000", or any number above 4096 for that matter, it tells me that the y dimension is limited to 4096.
    I'll note that I'm attempting to create .schematic files for Minecraft rather than StarMade, but I found that this post was one of the most detailed describing the use of poly2vox. The files I'm trying to achieve will be cities or towns with extensive x and y dimensions, though I'm not looking to exceed the z limit of 256, as that's the height limit in Minecraft anyway.

    Edit: I have another problem as well. When I'm running kb6ToSchematic after converting the file to a .kv6, it tells me it can't load the input file because the X-axis exceeds the maximum, but, I didn't know there was a maximum in kv6ToSchematic. The x dimension in my file is 4095.

    Thanks for any help,

    Jake
     
    Last edited:
    Joined
    Nov 23, 2016
    Messages
    4
    Reaction score
    7
    3D model importing has been a known and used feature of SMedit for quite a while now.
    In the past there were two ways of going about this: directly put an .obj file into SMedit or convert the .obj to .binvox first.
    This guide describes a third alternative, which is far more accurate than SMedit's own polygon to block converter and orders of magnitude faster than the binvox route (once properly set up).
    Let me first introduce a sample of converted ships: all the battlecruisers from EVE online, approximately 1:1.


    You can download all 12 of the shells as a sample pack here: link
    All symmetrical ships have been mirrored as well.

    Now, onto the main point: What is this new method? Basically it's the conversion of a 3D model into a voxel/block format with something called poly2vox, converting the resulting file into a minecraft schematic with kv6ToSchematic, importing that into SMedit and saving it as a starmade blueprint.

    Now why would you go through all that trouble? Let's see by comparing it to the two existing alternatives:


    So, the main advantages are better quality than SMedit alone, consistent 1 block hull thickness, much quicker than binvox, support for more formats and support for texture to block colour mapping
    The main disadvantage being the 256 height limit, which gets in the way of making really big things. For tall, thin ships you can get around this by rotating the model on its side in something like blender. Then again, most starmade ships fit into these box dimensions.

    "That sounds great! I want to use this!"
    Perfect! Let's get started then!
    You'll need a couple of things:
    Poly2Vox: Where the magic happens (download halfway down the page)
    KV6toSchematic: A modified version. The standard version has a size limit of only 512x512x256 (and can be found here)
    SMedit: It's outdated and slow, but you ain't got no choice, son.

    Below you can find a detailed instruction on how to perform each step of the process.

    Poly2vox Setup and Use
    When you have downloaded the zip file from the site above, you'll want to extract poly2vox.exe from the file with 7zip, winrar or any other acrchiver. Unfortunately this is a command line program, meaning it doesn't have a user interface and just clicking it won't do anything.
    You'll have to start by opening a command prompt (cmd.exe) and navigating to the directory where you put it by entering
    Code:
    cd <directory>
    or
    Code:
    cd /d <directory>
    if you saved it on a different drive than your OS is on.
    if you now enter poly2vox in the command prompt, you should get a detailed description of all the parameters you can use here. For now we'll only be using the /v# parameter. This specifies the largest dimension of the resulting block/voxel model, which makes scaling ships quite easy.
    Keep in mind that doubling the scaling factor will increase the conversion time by roughly a factor 8, (triple means waiting 27 times longer, etc.) so be careful what you put there.

    Now is the time to find a nice 3d model and start converting it. I am using EVE-hurricane.stl as an example.
    For ease of use, put it in the same folder as poly2vox.exe . And run the following command
    Code:
     poly2vox <filename> /v<largest dimensiom in blocks>
    example:
    poly2vox EVE-Hurricane.stl /v490
    Running this will output the following:

    Here you can see the dimensions, scale factor, and the time it took to convert.

    You now have a .kv6 file with voxel data! On to the next part!

    KV6toSchematic use
    This is actually the easiest part of the process, because this is a simple java program with an actual GUI.
    Put kv6toschematic.jar in the same folder as poly2vox.exe for ease of use and just double click on the .jar.
    For the best results select "Use default palette", "use wool blocks" and then simply select the file you want to convert. In this example, that would be EVE-Hurricane.kv6, click open, wait for the conversion to finish and then simply save the schematic at a location of your choosing.

    Et voilá! That's the second step done.

    SMedit setup and use
    I'll only be going over setup and basic operations needed to get your ship into SMedit and to starmade, things like mirroring fall outside of this guide and are also covered by other tutorials out there.

    The download link on the wikipage above gets you SMedit.jar. You can run this from any folder as long as you've set the starmade path in the launcher correctly. If you've installed starmade without steam you should know your install folder. If you are using steam you can go there by right-clicking on starmade in your library, clicking properties, going to the LOCAL FILES tab and clicking BROWSE LOCAL FILES.

    When you first launch SMedit.jar you'll want to put the directory/path in the launcher. This should end in ../StarMade/StarMade for SMedit to function.
    I also recommend 2 GB of RAM or more for larger operations (ships longer than 500 blocks or so)
    Be sure to click apply so your settings are saved.
    When you launch SMedit, it's quite likely that all the colour options are grey. This is normal and shouldn't matter for importing schematics (just inconvenient). You will also be looking at a standard ship from the front. It's useful to know where the axes of your ship are so click view->Axis to show them.
    The z-axis will be toward you (bright blue) (you're looking at the front of a ship), the x-axis will be to the right (bright red), the y-axis will point upward (bright green).

    We start by going to file->import->schematic and selecting the schematic you made earlier.
    The imported schematic may be facing the wrong way. You can fix this with modify->rotate.
    Pitch rotates the nose of your ship downwards, yaw rotates the front of your ship to the left (when aligned with the ship core) and roll rotates the ship clockwise along its length (anticlockwise if looking at it from the standard SMedit view, which is from the front.)
    (rotations follow the right hand rule, if that's easier to remember for you)

    Once you have your ship rotated you might want to relocate the core, since smedit puts it in the exact center of the ship and some ships have holes there. Or you might just want the core in a different location.
    The core is located at the interesction of the three axes and can be moved with modify->move where you can specify how far along each axis you want the the core to be moved.

    If you're all content with core location and the direction of the ship, you can save it as a blueprint by going to File->Save As->Blueprint.

    You should now be able to load the blueprint from inside the game.

    As small suggestion, if you want to look at the model from a different angle you can do so by clicking and dragging with the left mouse button. It can be quite a laggy thing to do, so you may want to turn off rendering for the ship entirely while you're moving about by clicking View->"Don't draw".

    After doing this a few times, the human parts of the process are actually quite quick and the conversion parts are even quicker.
    For those who made it to the bottom of this post, and don't think they'll be able to get this to work, I'll help you out: reply with a link to a model you want to use, specify the maximum dimension and I'll convert it for you. Limit 1 per person for now. More if there's not much demand.

    If anything isn't clear, please don't hesitate to ask.

    Can you convert the USS Enterprise NCC-1701-E for me please? Max dimension is 685.7m for length and 250.6m for width, Here's the links: http://www.trekmeshes.ch/meshes/psr/PAULSOVEREIGN-PSR.RAR or this link: http://www.trekmeshes.ch/meshes/download.php?Format=MAX&Filename=PAULSOVEREIGN&anticache=1421287370
    [doublepost=1480051890,1480051208][/doublepost]Can anyone here help me with a problem i'm having with SMEdit? The problem is that I can't open the program with no more than 1g of memory. If I try to add more it gives me a fatal error message and I don't know why because I have two 8gig sticks of ram in my PC...
     
    Joined
    Apr 12, 2015
    Messages
    1
    Reaction score
    1
    Hello, I was going to try using this method to import a hull from a ship, but when I went to download kv6toschematic, I noticed it was gone. I was wondering if there was someone who could provide me with a download link that works. Thanks in advance.
     
    • Like
    Reactions: Dire Venom