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. Harag Junior Engineer

    Messages:
    913
    Setting a material to GLASS requires you to reference transparent materials definitions from TransparentMaterials.sbc via the Outwards and Inwards properties in Blender. Take a look at
    <ModSDK>/OriginalContent/Models/Cubes/large/Window1x1Face.xml and <SE>/Content/Data/TransparentMaterials.sbc.
     
    Last edited: May 30, 2016
  2. captain_chillzout Trainee Engineer

    Messages:
    9
    awesome!, got it working. you can use the stock SE option of "GlassCW" in the outwards and inwards values ( for anyone who wants that extremely dirty scratched up look.)
     
  3. Tristavius Senior Engineer

    Messages:
    1,368
    Hi Harag, quick question for you...

    I need to get a few mods up to date, and unfortunately that includes HexGlass. I say unfortunately as working with them is a nightmare - so many files and eccentricities and things that can go wrong. Not much that can be done about most if it, but I was wondering if it's possible currently using nodes etc to output more than 1 variant at a time, while swapping the clockwise/counterclockwise textures.

    Currently, after every change, I have to output three different models, one for the Clockwise version, one for the Anti-Clockwise and one for the 'Internal' (Clear on both sides). Each time this means editing the glass texture fields and changing the mesh name and it's something I frequently typo on or just generally make a mess of.

    In short, I need to at the touch of a button:

    • Output the MyGlass mesh to MyGlass.mwm with CounterClockwise/Clockwise texture applied
    • Output the MyGlass mesh to MyGlass_Inv.mwm with Clockwise/CounterClockwise texture applied
    • Output the MyGlass mesh to MyGlass_Int.mwm with Clockwise/Clockwise texture applied

    Note, on most models the CW/CCW combinations run as to the above but on some they are inverted.
     
  4. Harag Junior Engineer

    Messages:
    913
    You could use this Python script and run it in Blender from a new text data block
    Code:
    import bpy
    from space_engineers.export import ExportSettings
    from space_engineers.operators import BlockExport
    
    # this assumes the material is already set to technique "GLASS"
    mat = bpy.data.materials['MyGlassMaterial'].space_engineers
    
    passes_per_scene = {
        'Block1' : [ # scene.name
            # ccw, cw, filesuffix
            ['ccw1', 'cw2', ''],
            ['ccwA', 'cwB', '_Variant1'],
            ['ccwX', 'cwY', '_Variant2'],
        ],
        'Block2' : [
            ['ccw1', 'cw2', ''],
        ],
    }
    
    for scene in bpy.data.scenes:
        # skip scenes that don't have any passes defined above
        if not scene.name in passes_per_scene:
            continue
      
        for ccw, cw, suffix in passes_per_scene[scene.name]:
            mat.glass_material_ccw = ccw
            mat.glass_material_cw = cw
          
            settings = ExportSettings(scene)
            settings.GlassSuffix = suffix  # reference this in the export node tree as ${GlassSuffix}
          
            BlockExport(settings).export()
    Some things of note:
    1. Using a custom parameter like ${GlassSuffix} will cause the default Export scene as block button to no longer work because it won't set a value for that parameter.
    2. Running the export from a script means you won't get feedback in Blender's info window log. The output will go to Blender's console window instead.
     
    Last edited: Jun 7, 2016
  5. SlowpokeFarm Trainee Engineer

    Messages:
    14
    First of all, thank you, Harag for your that awesome tool you made for the community!

    Seconds, I didn't find any special requirements or guides for exporting LOD models with main model except for puting them in certain layer.

    LOD model was exported successfully but doesnt appear in the game.


    Here are the logs for your reference.

    The rest works just perfect - construction models, collision etc.

    I'm using an old MWMbuilder you provided here in this thread. Could this be the cause?
     
  6. Harag Junior Engineer

    Messages:
    913
    LODs currently don't work for mods.

    On a different note you should probably clean your meshes to get rid of those "Model contains degenerated triangle" warnings.
     
  7. SlowpokeFarm Trainee Engineer

    Messages:
    14
    Excuse my inexperience, but what does this warning mean, what should I clean?
     
  8. Argual Trainee Engineer

    Messages:
    2
    Hi Harag! Can i ask for your help about something? I am getting an error when i try to export my models. I set up everything as the guide instructs (or at least i believe i did) and it doesn't work. I get the following error in the Scene_Large.hkt.convert.log file:


    Command: C:\Program Files\Havok\HavokContentTools\FBXImporter.exe C:\Users\Simon Gergő\Desktop\SteelPipesMod\Models\Scene_Large.hkt.fbx C:\Users\Simon Gergő\Desktop\SteelPipesMod\Models\Scene_Large.hkt
    ------------------------------------------------------------------
    Havok - Build (20130718)
    Version 2013.1.0-r1
    Base system initialized.
    ------------------------------------------------------------------
    Havok License Keys:
    Physics_2012 : PcXs (expires PERPETUAL)
    Animation : PcXs (expires PERPETUAL)
    ------------------------------------------------------------------
    Math\hkMath.cpp(158): [0: DE404A11] Warning: Flushing denormals is required inside Havok code. Please call _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); before stepping Havok. See the "Using the Math Library" section in the User Guide for more information.

    I even tried exporting the "BlackRedCube.blend" file you uploaded, and it fails with it too. It gives me the error when i enable the Rigid Body for the collision mesh.
    I know there was an issue like this mentioned on the forum before but it was solved by reinstalling the Havok tool, which i did and still couldn't get it to work. I also noticed that the Havok License Key is for Physics_2012. I don't know if it has something to do with the error, and if it does, i don't know how to change it.
     
  9. Harag Junior Engineer

    Messages:
    913
    That's no error, it's a warning. And it is aimed at the author of the FBX importer. I just compiled the sources against the Havok 2013 SDK. I don't feel qualified to fix the warning. In any case this doesn't seem to have any detrimental effect on the conversion as far as I can tell, so just ignore the warning.

    The Physics_2012 package is part of Havok 2013. So that's fine.
     
  10. Argual Trainee Engineer

    Messages:
    2
    I moved the FBXImporter and my mod folder to C: and now it works properly! Thank you for your help!
     
  11. Harag Junior Engineer

    Messages:
    913
    To elaborate a little: FBXImporter fails when the file paths it is told to operate on contain non-ASCII characters.
     
  12. LjSpike Trainee Engineer

    Messages:
    8
    In the documentation here: http://harag-on-steam.github.io/se-blender/ theres a thing about 1 of the links being discontinued, I was wondering (as it didn't explain it to clearly there) if its still possible to make it work, and which download links I'd need to use to make it work...?
     
  13. Harag Junior Engineer

    Messages:
    913
    The callout in the docs links to this thread here on the forum. Have you checked that out as asked?
     
    • Informative Informative x 1
  14. LjSpike Trainee Engineer

    Messages:
    8
    Nah actually, I hadn't seen that thread. I'd expressly joined to get a post in on this thread :p
    Should I download beams 64-bit then?
    (Additionally, it might be best to put some step by step installation somewhere, utilizing these additional sources of havok?)
     
  15. Harag Junior Engineer

    Messages:
    913
    There already is an explicit link to the bug thread in the docs. That is the proper place to resolve the mess. I'm not at fault if people don't click it :p
     
  16. LjSpike Trainee Engineer

    Messages:
    8
    True :p
     
  17. Tilleen Trainee Engineer

    Messages:
    28
    One thing that may be worth adding to your documentation is that mount points are used for working out if a block is airtight or not.
     
  18. Harag Junior Engineer

    Messages:
    913
    I don't aim to provide a comprehensive modding guide. That should be Keen's job. ;)
     
  19. Tilleen Trainee Engineer

    Messages:
    28
    I agree that should be Keen's job, how likely is it though. :woot:

    May just a mention that they mount points are also used to workout if two blocks are airtight.

    I don't suppose you know how the <sides> key in the cubeblock.sbc work? I can guess, but once again we need some documentation. (I am not expecting you to provide it, just hoping you know if there is any.)
     
  20. Harag Junior Engineer

    Messages:
    913
    The game handles armor blocks differently than other blocks. Each side is a separate mesh that is disabled when an adjacent block hides it completely. The child elements of <Sides> decide which block side gets which mesh (the slope of a slope-block counts as one side, too).
     
    Last edited: Aug 17, 2016
  21. LjSpike Trainee Engineer

    Messages:
    8
    Well, sorry to butt back in here :p But, it doesn't look really like keen will fix this up for us, so, does this problem also prevent us manually exporting 3d models and such...
    (I really want to make a working proper ramscoops mod and stuff :p)
     
  22. FlakMagnet Senior Engineer

    Messages:
    1,551
    They seem to be able to use modelbuilder in house, and don;t seem interested in MWMBuilder. IT was flagged a few times on Xocliw's stream last night, as they had Anton on as a guest and the new models got a mention.
    The old MWMBuilder works OK, apart from the fact that it fails to generate LODs for the model. I always build them.....and just have to accept that the current version of MWMBuilder won;t generate them properly.

    Xocliw was aware of the impact on modders of having a broken toolset..... but I dont know how far that sympathy extends in terms of the people who can sort the problem out!
     
  23. Harag Junior Engineer

    Messages:
    913
    MwmBuilder includes the links to LOD models just fine. It's the engine that fails to load them.
     
  24. FlakMagnet Senior Engineer

    Messages:
    1,551
    Wow.....they know about it to. Surely a fix like that would help game optimisation no end for anyone using modded blocks.
     
  25. Tilleen Trainee Engineer

    Messages:
    28
    So is it possible to integrate other blocks into this system so that they get a consistent texturing across them? I am sort of assuming that even if I created a 1x1x1 block that used this sides feature, then because it has a different subtypeid, the internals of the program would see it as a different thing anyway and it would not map the texture correctly, and a 1x2x1 block would be right out.

    Is there anything published about the order that the sides are listed in? Since they don't seem to have a specific tag saying top, bottom... etc, I am assuming that it is positional.
     
  26. Harag Junior Engineer

    Messages:
    913
    Yes, it's possible, <BlockTopology>Cube</BlockTopology> does that. It's <CubeTopology>Box|Slope|...</CubeTopology> that decides the order of sides. Just use the LargeBlockArmor* in CubeBlocks.sbc for reference. And again, you have to have up to 6 separate .mwm files, one for each side. You are allowed to reuse the same mesh for more than one side - that's what the game does for armor cubes.
     
  27. doncdxx Apprentice Engineer

    Messages:
    411
    @Harag Thanks for your help with my problem on the other thread.
    Any chance you might consider adding a component option instead of just blocks to your blender tool?
     
  28. Harag Junior Engineer

    Messages:
    913
    What is that supposed to do?
     
  29. Tilleen Trainee Engineer

    Messages:
    28
    An idea for a feature add may be to be able to export the different sides as different .mwm's for ease of creating blocks that use sides functions? :)

    By the way after the update, has mwmbuilder started working? My version is still getting the same error, the old version works, I am now wondering if I am missing some library or other?
     
  30. Finnlad the Great Trainee Engineer

    Messages:
    2
    Sorry for a newbie question, I added on the Block Tools to blender, but I think I have a file name path problem because it won't let me set up a grid or anything. I have reset to factory settings several times, and even tried using blender 2.75 to see if it was a compatibility issue. No such luck. I am attaching an image of what I am seeing, and if you need anything more from me to help diagnose the problem I will. Thank you for your time.
    Here is the image
     
Thread Status:
This last post in this thread was made more than 31 days old.