Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

SE Block Tools for Blender

Discussion in 'Modding Guides and Tools' started by Harag, Feb 6, 2015.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Eikester Apprentice Engineer

    Messages:
    423
    @Harag about Glass: you can remove the CW and CCW stuff, in fact glass dont need any parameters except the technique now, all it does it is pointing to the Transparentmaterial.sbc
    i.e. in Blender you create 2 glass materials named like GlassFront and GlassBack and assign it to the polygons, now all you need is to create a TransparentMaterial definition with the subtypeid exactly named like the Material (GlassFront, GlassBack)

    in your Model's xml
    Code:
    <Material Name="GlassFront">
    		<Parameter Name="Technique">GLASS</Parameter>
    	</Material>
    
    <Material Name="GlassBack">
    		<Parameter Name="Technique">GLASS</Parameter>
    	</Material>
    TransparentMaterials.sbc
    Code:
    <TransparentMaterial>
          <Id>
            <TypeId>TransparentMaterialDefinition</TypeId>
            <SubtypeId>GlassFront</SubtypeId>
          </Id>     
          <AlphaMistingEnable>false</AlphaMistingEnable>
          <CanBeAffectedByOtherLights>false</CanBeAffectedByOtherLights>
          <Emissivity>0</Emissivity>
          <IgnoreDepth>false</IgnoreDepth>
          <SoftParticleDistanceScale>1000</SoftParticleDistanceScale>
          <Texture>Textures\Particles\CryoChamberGlass.dds</Texture>
          <UseAtlas>false</UseAtlas>
    	  <NeedSort>true</NeedSort>
          <UVOffset>
            <X>0</X>
            <Y>0</Y>
          </UVOffset>
          <UVSize>
            <X>1</X>
            <Y>1</Y>
          </UVSize>
    	  <Color>
            <X>0.08</X>
            <Y>0.44</Y>
    		<Z>0.44</Z>
    		<W>0.256</W>
          </Color>
    	  <Reflectivity>0.396</Reflectivity>
        </TransparentMaterial>
    
    <TransparentMaterial>
          <Id>
            <TypeId>TransparentMaterialDefinition</TypeId>
            <SubtypeId>GlassBack</SubtypeId>
          </Id>     
          <AlphaMistingEnable>false</AlphaMistingEnable>
          <CanBeAffectedByOtherLights>false</CanBeAffectedByOtherLights>
          <Emissivity>0</Emissivity>
          <IgnoreDepth>false</IgnoreDepth>
          <SoftParticleDistanceScale>1000</SoftParticleDistanceScale>
          <Texture>Textures\Particles\CryoChamberGlass.dds</Texture>
          <UseAtlas>false</UseAtlas>
    	  <NeedSort>true</NeedSort>
          <UVOffset>
            <X>0</X>
            <Y>0</Y>
          </UVOffset>
          <UVSize>
            <X>1</X>
            <Y>1</Y>
          </UVSize>
    	  <Color>
            <X>0.08</X>
            <Y>0.44</Y>
    		<Z>0.44</Z>
    		<W>0.256</W>
          </Color>
    	  <Reflectivity>0.396</Reflectivity>
        </TransparentMaterial>
     
  2. TugHall Trainee Engineer

    Messages:
    11
    Thank you this helps
     
  3. Manchou Apprentice Engineer

    Messages:
    182
    Hi Harag! I need help on a purpose that make me crazy.

    On a block, i try to have an outline arround interative block part. But i can do it.
    On blender with your magic tool, i see a property named highlight in empties property but it doesn't work.
    Futhermore, the highlight part is a subpart of the block. I don't know how achieve this.
    Have any idea? Thanks !!!!!

    EDIT: I can highlight a part of the model like the frame of door. But i can't highlight the gate itself which it is in a separate blender scene because gate is a subpart. It's for a mod on Medieval engineers. Vanilla doors have highlights on gate but not on frame ... i don't know they do this! :eek:
     
    Last edited: Mar 9, 2017
  4. TugHall Trainee Engineer

    Messages:
    11
    Solved: forgot to change material in blender from normal to glass.

    I cant seam to get this transparent any ideas? it looks like glass without the ability to see through like i want. i have the same materials in blender the same name. Is it something to do with Photoshop?
    Code:
    <?xml version="1.0"?>
    <Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <TransparentMaterials>
        <TransparentMaterial>
          <Id>
            <TypeId>TransparentMaterialDefinition</TypeId>
            <SubtypeId>GlassInside1</SubtypeId>
          </Id>   
          <AlphaMistingEnable>false</AlphaMistingEnable>
    	  <AlphaSaturation>1</AlphaSaturation>
          <CanBeAffectedByOtherLights>false</CanBeAffectedByOtherLights>
          <Emissivity>0</Emissivity>
          <IgnoreDepth>false</IgnoreDepth>
    	  <Reflection>true</Reflection>
          <SoftParticleDistanceScale>1</SoftParticleDistanceScale>
          <Texture>Textures\Particles\GlassInside_cm.dds</Texture>
          <UseAtlas>false</UseAtlas>
    	  <NeedSort>true</NeedSort>
          <UVOffset>
            <X>0</X>
            <Y>0</Y>
          </UVOffset>
          <UVSize>
            <X>1</X>
            <Y>1</Y>
          </UVSize>
    	<Color>
            <X>0</X>
            <Y>0.15</Y>
    		<Z>0.4</Z>
    		<W>10</W>
          </Color>
    	  <Reflectivity>0.196</Reflectivity>
        </TransparentMaterial>
    
    	
    
    	<TransparentMaterial>
          <Id>
            <TypeId>TransparentMaterialDefinition</TypeId>
            <SubtypeId>GlassOutside1</SubtypeId>
          </Id>   
        <AlphaMistingEnable>false</AlphaMistingEnable>
    	 <AlphaSaturation>1</AlphaSaturation>
          <CanBeAffectedByOtherLights>false</CanBeAffectedByOtherLights>
          <Emissivity>0</Emissivity>
          <IgnoreDepth>false</IgnoreDepth>
    	  <Reflection>true</Reflection>
          <SoftParticleDistanceScale>1</SoftParticleDistanceScale>
          <Texture>Textures\Particles\GlassOutside_cm.dds</Texture>
          <UseAtlas>false</UseAtlas>
    	  <NeedSort>true</NeedSort>
          <UVOffset>
            <X>0</X>
            <Y>0</Y>
          </UVOffset>
          <UVSize>
            <X>1</X>
            <Y>1</Y>
          </UVSize>
    	  <Color>
            <X>0</X>
            <Y>0.15</Y>
    		<Z>0.4</Z>
    		<W>255</W>
          </Color>
    	  <Reflectivity>0.196</Reflectivity>
        </TransparentMaterial>	
      </TransparentMaterials>
    </Definitions>
    
    [​IMG]
     
    Last edited: Mar 12, 2017
  5. Dusty93 Trainee Engineer

    Messages:
    5
    i have a big problem. i try to import my armor texture since a week now and i just cant get it to work. i treid almost everything i found on google and on the forum :D

    i have the _cm _ng _add dds files and make a material than i make a UV map et voila i can see it in blender. if i try to import it in the game the texture is invisible O_o no idea what i do wrong

    the .xml is also 20 times checked but all references are correct with the fbx things

    i upload a part of the mod with all files including the blend file maybe someone can figure out the problem

    oh you have to make the mwm manually since the bonegrid and skeleton stuff is in the xml

    http://www.mediafire.com/file/mabjbl820w79j8g/Trinium+Armor+Test.rar

    if i use the old mwmbuilder textures get purple , if i use the new builder textures get invisible ^^ nice options to choose ;)

    whoever helps me to get the ***** texture on the block will get mentioned in my mod :D
     
    Last edited: Mar 13, 2017
  6. Eikester2 Trainee Engineer

    Messages:
    35
    is there any lod stuff in the xml? if yes remove it and try again. Or as a secpnd option go to the tools section of this forum and find the fixed mwmbuilder
    --- Automerge ---
    your issue might be the <W> component of the color, should be between 0 and 1 where 0 should be fully transparent and 1 fully opaque depending on the alpha of your texture (iirc they are multiplied)
     
  7. Dusty93 Trainee Engineer

    Messages:
    5
    problem solved ^^

    i used the fbx from the modsdk. thats not working you need to make a new model from scratch ^^
     
    Last edited: Mar 17, 2017
  8. Dusty93 Trainee Engineer

    Messages:
    5
    anyone worked with patterscale so far? if i deactivate it the game gets stuck in an endless loading screen -.- and with the scale i get some weird gray lines on the block surface

    any ideas?

    [​IMG]
     
  9. nubeees Trainee Engineer

    Messages:
    83
    I am not certain this is where this belongs, but has anyone had this happen?
    [​IMG]
    This is the first time I've had an error like this using Blender, and couldn't find anything helpful on it.
     
  10. RowCZ Trainee Engineer

    Messages:
    9
    Hi,
    so just simply to the problem.
    I tried to make my first model in blender with SE Tools (God bless Harag! ), I followed Shao's tutorial videos (God bless Shaostoul! ) and when I finally get to the exporting I received this error from MWM builder:

    Code:
    Running from: C:\Users\XXX\AppData\Local\Temp\tmpv5gi9uyn
    Command: C:\Users\XXX\Documents\MwmBuilder\MwmBuilder.exe /s:Content /m:TST_Small.fbx /o:.\
    : WARNING:
        Could not find Materials library folder.
    : ERROR:
        C:\Users\XXX\AppData\Local\Temp\tmpv5gi9uyn\Content\TST_Small.fbx:
        System.ArgumentOutOfRangeException: Hodnota startIndex nem…§e bět vŘtçˇ ne§ d‚lka ýetŘzce.
        N zev parametru: startIndex
          v System.String.Substring(Int32 startIndex, Int32 length)
          v MwmBuilder.MyModelBuilder.Build(String filename, String intermediateDir, String outputDir, MyModelConfiguration configuration, Byte[] havokCollisionShapes, Boolean checkOpenBoundaries, Single[] lodDistances, Boolean overrideLods, Func`2 getMaterialByRef, IMyBuildLogger logger)
          v MwmBuilder.ProgramContext.ProcessItem(ItemInfo item, String outputDir, Byte[] havokCollisionShapes, Boolean checkOpenBoundaries, Single[] lodDistances, Boolean overrideLods)
          v MwmBuilder.ProgramContext.ProcessFile(String file, String outputDir, Dictionary`2 defaultVars, Boolean exportXml, Boolean forceBuild, Boolean checkOpenBoundaries, String lodDistances, Boolean overrideLods)
          v MwmBuilder.ProgramContext.ProcessFileSafe(String file)
    That gibberish after "out of range exception" is wrong coded czech (probably caused by my windows settings) and probably means something like value of startIndex cannot be larger then string lenght.

    I received these files from exporting:
    TST_Small.hkt
    TST_Small.hkt.convert.log - just Warning: Flushing denormals is required inside Havok code.
    TST_Small.hkt.fbx
    TST_Small.hkt.filter.log - Finished in 00:00:00, 0 Errors, 0 Warnings
    TST_Small_LOD1.fbx
    TST_LOD1.mwm.log - disaster mentioned above

    So I tried absolutely simple cube with full accessories (collision, mount points, LOD, materials etc. ) with same result... so I just tried to export only a simple box without any accessories and expect that it will crash somewhere else and I will try to add more and more accessories until I get this error and find out by what it is caused.... but I received absolutely same result so it crashes immediately when it try to build an MWM file :-/

    I also moved mwm builder from the original location in Program files, I set it to start as admin and I tried to make the folder path as short as it could be (c:/A/Models/) but nothing helps ... I spent well more then just couple of hours with modeling and remodeling of my model so I don't want to just flush it and forget about it... and now I am desperate :(

    Is there anything I can try to fix it?
     
  11. Concomitant Trainee Engineer

    Messages:
    45
  12. RowCZ Trainee Engineer

    Messages:
    9
    Hi,
    well, I looked at that instructions but unfortunately there is really lack of information related to my problem (there are tons of information related to actions when you have your mwm file which is great but to early for me). I wasn't able to find any instructions about what are necessary steps for successful export to mwm file.
    There are some instructions how to setup tools but even Blender setup instructions are limited to "read the harags instructions" which I did (at least 10 times). Next information is about how to start with clean slate in blender and then ... "now you should have a mwm file"... which is my problem... I don't.
    There is only a piece of text which drives me crazy: How do I use Blender, What do I do? Your first quest is to read that blender to mwm guide! Well I definately would like to but there is not specified what guide.
    I wasn't able to instal MedievalEngineersModSDK ... simply it is not present on my steam. Of course I tried both (game and SDK) mwmbuilders for space engineers and I tried also mwmbuilder available to download via dropbox in that article which ends with "mwmbuilder has stoped working" because of unexpected exceptions etc. ... it just doesn't work for me (probably to old or incompatible even if I tried to mix it with other required files).
    I also tried both current beta versions of Space Engineers SDK but with the same result as I reported in my previous post.

    So no luck. Still stucked with nice model with probably useless textures but unable to build MWM file to continue :(
     
  13. Xanatos Trainee Engineer

    Messages:
    81
    If you haven't exported a mesh since the SDK updated, reinstall the MWMBuilder provided by Harag!
    Also, make sure you're linking to the right MWMBuilder within Blender. Just to be doubly sure, I replace every instance of the MWMBuilder with Harag's linked version, and my blocks export perfectly.
    Then make sure you reset/double-check the file location in your User Preferences within Blender.

    Beats me why Keen insist on updating the SDK with a broken MWMBuilder every week, but they do! ;)
     
    • Like Like x 1
  14. Harag Junior Engineer

    Messages:
    913
    @RowCZ your problem seems to match a bug report of mine. Like Xanatos said, using an older MwmBuilder is probably the only feasible solution. Of course it would be better if the current version wouldn't error out when optional, non-applicable parameters aren't given...

    The installation instructions for the Blender addon link to an older version of MwmBuilder.
    --- Automerge ---
    @nubeees Your's is an odd problem. Blender comes with its own version of the Python programming language runtime that should have all required files. Your's seems to be incomplete. Specifically, a library for network access is missing. I'm using that to check for updates when you click on the corresponding button in the addon preferences tab.

    Since this is a Blender -> Python problem and not a SE addon -> Blender problem I can't really give advice on how to resolve the issue.
     
    • Like Like x 2
  15. RowCZ Trainee Engineer

    Messages:
    9
    @Xanatos and @Harag You nailed it guys! I didn't noticed that link for older version of MWMbuilder in the SE Tools notes before (actually maybe I noticed that but I didn't focus on that because I didn't expect that so crucial modding tool will be still defective even after several months :? and I also saw that Harags bug report but I didn't believed that is relevant to me... it is almost half year old :eek: but probably it is)
    So yeah, now I have all models builded without crash or error. Thanks again guys! :tu:

    For everyone with similar problem I used this version (mentioned in Harag's SE Tools notes) https://forums.keenswh.com/threads/where-did-mwm-builder-go.7383981/#post-1286976851
     
    Last edited: Apr 15, 2017
    • Like Like x 1
  16. randomname Apprentice Engineer

    Messages:
    103
    Thanks to this thread, I was able to create a custom textured block! The tool chain provided really works. All other information about modding is stale garbage. hah hah the part that tripped me up was the fact you have to SAVE the blend file before you can export. Also I had used the mwmbuilder from space engineers. It doesn't work. Ugh those are truly some beginner errors! The mwmbuilder on the forums here works as well as the one linked to in the documentation. Thanks harag, for the excellent documentation.
     
    • Like Like x 1
  17. Xanatos Trainee Engineer

    Messages:
    81
    Nice work guys! :)
     
  18. starmindfr Apprentice Engineer

    Messages:
    173
    Hello all

    This seems very intersting tool!

    My goal is to make an "electric fence" , this will be very basic, 2 horizontal tubes and 2 vertical + one led indicator.

    Difficult part for me is the area for "damages" i see this "Empty" feature but could not figure how to add here some electric damages front / rear object, could you help me on that ?

    thanks in advance :)
     
  19. RowCZ Trainee Engineer

    Messages:
    9
    I am not yet so skilled with mods but I am not sure If you can add some "make damage" zone just like that to any block you want but you probably can use a "hack" like define this fence block as thruster block or maybe better welder block (damage only to players) which can distribute some damage, there should be possible to set the are of effect, damage power and also to avoid of regular welding or thrusting effect there should be posible to also set the efficiency of main effect.
    But I hope someone more experienced will help you.

    I am for example interested if you can make a condition for funcionality only in atmosphere for another block then thrusters. :) But it is a fresh idea of mine I didn't dig for some information yet.
     
  20. starmindfr Apprentice Engineer

    Messages:
    173
    Sadly I also have this index out of range issue I will try like you to go for all exe with the fix
    --- Automerge ---
    Hello About empties - like detector_terminal_1 do we have a list of all terms to use ? I want to add a flame / damage effect instead of terminal and not sure of full steps to follow
     
    Last edited: Apr 27, 2017
  21. nubeees Trainee Engineer

    Messages:
    83
    Late response on my part:

    Alright, thanks for the explanation.
    I'll attempt a reinstall of blender. This is not the only addon which has been acting up, likely due to similar issues.
     
  22. doncdxx Apprentice Engineer

    Messages:
    404
    I've been trying to make a new thruster that uses the variable animation speed feature of atmospheric thrusters but I don't seem to be capable of changing the animation of the subpart from just spinning. It's my first time trying to make an animated block, so I'm not sure if I'm doing it wrong or if it's just a limitation to the game.

    Is there anything special I need to do to animate?
     
  23. starmindfr Apprentice Engineer

    Messages:
    173
    Is Collision still working with this ? I tried to follow all rules of the doc and i only get either a default collision or a basic line collision centered inside block but no way to have anything on frame 2 interactinf ? i add the values of rigidbody as seen on screenshot and applied "object transformation" but not sure wich transform to choose

    Edit : i try with Control + A when in Layout 2 and select the 3 types, but no effet in game i see my 3 objets moved to center of cube and with wrong orientation ... anything i should do ?
     
    Last edited: May 4, 2017
  24. Tilleen Trainee Engineer

    Messages:
    28
    After extensive testing, and before I found this post, I have just found that if the material definition does not match the TransparentMaterial definition then it will still use the value in Outwards to match to the definition. It took me forever to work out why I could not change the reflectivity of a "Glass" Material.
     
  25. Kham Apprentice Engineer

    Messages:
    477
    @Harag is there a way to import the materials.xml file from the SDK to auto correct pathing for materials assigned in Blender? Having to go through them one by one is quite tedious.
     
    Last edited: Aug 15, 2017
    • Like Like x 1
  26. Kham Apprentice Engineer

    Messages:
    477
    Any tips on what to do when Blender fails to import an FBX file?

    I'm trying to import the vanilla door (non sliding version) from the SDK and it's a 15Mb file for some reason, Blender just locked up and didn't end up importing it. I know it can sometimes take a minute or two so I left it well alone for literally over an hour and nothing.
     
  27. AViegarien Trainee Engineer

    Messages:
    7
    I'm not sure if it's just a fluke, but I was using the Steam version of blender and an update came out. After setting everything back up and some hair tearing out, I managed to get a model to export without errors. However when I load it up in game the model was MASSIVE it was only 5x3x2 small blocks but it was the size of many large blocks (it blotted out the sun!).

    I quickly installed the previous version of blender (thank crap all my settings were retained) loaded up the exact same blend file, exported, and like magic everything was fine.

    I can try again with a different model to see if that happens with that or see if there's some settings I missed but I would have no clue what would cause such a scaling issue.
    --- Automerge ---
    @Kham don't know if you found answers, but I'll toss in a trick I use for importing from the SDK. When I import the FBX files from the SDK one of the first things I do is use the "Materials Utils Specials" plugin. I don't think it's enabled by default so make sure it's enabled in your user settings, default key combo to use it is shift Q. From there I select the model, shift Q, Clean Slots -> Clean Material Slots. This should get rid of all those materials that aren't used on the model. As for linking the textures, all the models from Keen seem to be linked to their in house non-DDS formatted textures (I could be wrong about that but I think the errors show some other file format), so you'll have to remap the ones that are used by the model manually. It took me a bit of trial and error to find the right textures but some are labeled fairly well.
     
  28. Kham Apprentice Engineer

    Messages:
    477
    Yeah I actually already use that plugin, it's very handy. Especially when importing FBX files from the devkit haha. I ended up adding to Harag's plugin to let me use an external material xml so I didn't have to fill in the nodes for each material each time. Much faster.

    As for the model I couldn't import, I ended up converting it to an obj file and then back to fbx so it lost the extra million un-used materials and thus was much smaller so the plugin could handle importing it. Down side is is did lose it's empties, but at least I could add them back in easily enough. :)
     
  29. LordChicken Trainee Engineer

    Messages:
    53
    @Kham Could you explain how you did this with examples? I would love to add that ability as well. :)
     
  30. Kham Apprentice Engineer

    Messages:
    477
    I've got it on my GitHub page (put in a pull request, but I think Harag is MIA just now). You can grab it there if you want to try it out.
    I've included a zip for easy install as a couple of people I sent it to had issues with just replacing the edited files.
    Once it's installed, you'll find an option in the plugins user preferences to link to an external XML file (you can make your own or link to the materials.xml included with the SDK). Then all you need to do is name and assign your materials as normal and, provided you have those materials listed in your XML file, you no longer need to add the texture nodes in Blender, it'll just use the paths from your XML on export.

    My GitHub fork also includes the option to use Decal as a technique for materials as I was getting annoyed having to manually edit the files and rerun them through mwmbuilder.
    Working on a couple of other small QoL changes for it too such as removing .001 etc from names on export so you can have multiple scenes which make use of highlights or subparts without them conflicting on export. That's taking a bit longer to implement.
     
Thread Status:
This last post in this thread was made more than 31 days old.