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.

  1. LordChicken Trainee Engineer

    Messages:
    53
    @Kham Awesome, thank you!
     
  2. Silverwing Trainee Engineer

    Messages:
    39
    I saw the exact same thing. Glad I found this post as I thought maybe I had done something wrong with me setup. Good tip on the Materials plug-in, I didn't know about that.
     
  3. LordChicken Trainee Engineer

    Messages:
    53
    Does anyone know how to add additional LOD models with this tool? I've been poking around the source, but I am not familiar with Python enough to know what I am doing.
     
  4. Pumba Trainee Engineer

    Messages:
    3
    Greetings Harag. Can you help me please. I was using your tools successfuly before but now get error when trying to export scene.
    [​IMG]
    [​IMG]
    Materails set correct. Folders checked. There is space in hard drive. I've checked twice everything but still get error. Can you help please?
    With best regards, Pumba.
     
    Last edited: Oct 31, 2017
  5. Pumba Trainee Engineer

    Messages:
    3
    Lord, there is link to tutorial. http://harag-on-steam.github.io/se-blender/
    In short - layers from 6 to 8 are LODs

    6 - LOD 1
    7 - LOD 2
    8 - LOD 3

    It is not very clear what you mean by ADITTIONAL. There are 4 LODs now:
    0 - your model on layer 1
    1 - model on layer 6
    2 - model on layer 7
    3 - modelon layer 8

    LOD 3 used when distance to object is big so i dont see sence to make it more complex then cube.
     
    Last edited: Oct 31, 2017
  6. Inferi Apprentice Engineer

    Messages:
    138
    So I am back again from a long pause and everytime I get back I also have some trouble :)

    Now my problem is that my mods come out extremly large. If I change the rescale factor of the "MwmBuilder Settings" to 0.01, the model comes out the right size. However, the collision is still extremly large and I have no clue how to fix?
    Anyone know how?

    "second question, if anyone have a answer" :)
    Why do I have to change the rescale factor nowdays? Nothing is changed from last time I made mods in Blender "what I know of"?
     
  7. Kham Apprentice Engineer

    Messages:
    475
    Something changed in Blender with the 2.79 update which broke scaling, not sure what is causing it yet but you can revert to Blender 2.78x and it will stop happening. If you're using the Steam version, in your library you can go to properties, betas, and select 2.78 from the drop down to revert.
     
    • Like Like x 1
  8. Inferi Apprentice Engineer

    Messages:
    138


    Thanks for the answer. I will be doing that :)
     
  9. LordChicken Trainee Engineer

    Messages:
    53
    Pumba, yes I am familiar with the guide and how to use this add on. I mean ADDITIONAL, as in more then what is currently available.

    Say I have a mesh with a fairly large poly count and I'd like to have 8 LODs instead of the default 4 as an example, or 3 if you do not count the hero mesh as LOD0.

    I know I can use the mwm builder directly or use the SDK, which stops at 6 LODs if memory servers. I am asking if anyone knows how to add additional layer inputs to the LOD node of this Blender add on. Since that node is created through a python script, the answer to adding additional inputs is more then likely in that script. Hence my comment.
     
  10. Digi Senior Engineer

    Messages:
    2,372
    You can customize the export in the node editor, see https://harag-on-steam.github.io/se-blender/#customizing-the-export
    There you can have layers set up as you want them.
    You can also do them across scenes but that's kinda tricky, you're probably better off doing separate .blend files, one for LODs, one for construction models and one for construction LODs :woot:
     
    • Like Like x 1
  11. LordChicken Trainee Engineer

    Messages:
    53
    Oh man, I feel like a big douchey idiot.

    I didn't realize when I was playing with it the additional nodes that they auto add more slots up to 10 for the MwmBuilder LOD and the Block Definition construction phases. It didn't even occur to me until I was digging through the code and saw:
    Code:
    for i in range(1,11):
    	self.inputs.new(LodInputSocket.bl_idname, "LOD %d" % (i))
    
    and
    Code:
    for i in range(1,11):
    	inputs.new(MwmFileSocket.bl_idname, "Constr. Phase %d" % (i))
    
    I thought "wait a minute... a for loop, why?" Well.... here are the results of actually adding nodes to these nodes.

    Mwm Builder Node
    [​IMG]

    Block Definitions Node
    [​IMG]

    so... praise Harag!
     
  12. DarkWolfModding Apprentice Engineer

    Messages:
    117
    Any plans on updating to Blender 2.80 it would be great with the new collection system
     
  13. Balmung Senior Engineer

    Messages:
    1,946
    Harag was last here end 2017 and the last update for his plugin was near 3 years ago, so it didn't look good for an update from him.

    But so far it is not that important, works well with Blender 2.79.
     
  14. AbeAlpha Trainee Engineer

    Messages:
    17
  15. Kham Apprentice Engineer

    Messages:
    475
    Does anybody have any idea how to get texture tiling working with Blender? I'm trying to get a texture to repeat across a surface and in Blender it looks fine and it's doing it correctly as I adjust the settings, but every time I load the model up in game it's just got a hideously stretched texture and it's driving me mad trying to figure out why.

    Edit:Nvm, after hours of banging my head against a wall last night, I realised as soon as I got in to bed that I'd forgotten to increase the scale of the UV map.... Sometimes a break is a good thing haha.
     
    Last edited: Apr 11, 2019
  16. Balmung Senior Engineer

    Messages:
    1,946
    I made an updated SE Plugin:

    Download: space_engineers_technique_update.zip (81KB)

    - added DECAL_CUTOUT, DECAL_NOPREMULT and ALPHA_MASK_SINGLE_SIDED to the Selection on the materials tab.

    - added to use the correct Technique if you use materials from the materials.xml (SEModSDK).


    Before this update: if you used materials from the materials.xml the SE Plugin send them all as MESH to the mwmbuilder, even when this materials was an Alpha Mask material in any form.

    DECAL_CUTOUT works like ALPHA_MASK, but it have the Decal behavior, means you need a mesh behind it to see it. SE use since the "DLC Update" this for 4 of 5 Decal materials in materials.xml. So it was time to add them to the SE Plugin. It also fix that shiny area problem what normally should be complete transparent on the "Decals" materials in materials.xml.

    DECAL_NOPREMULT is a 3rd Methode for Decals, it has a better transition from full to null opaque and is useful if you work more with half transparency etc like DECAL.

    ALPHA_MASK_SINGLE_SIDED is what it sounds like, normal ALPHA_MASK materials are visible from both side of a plane mesh, this one not on the back side. Beside that it is identically.

    Because they could be useful I added them beside DECAL_CUTOUT
     
  17. Kham Apprentice Engineer

    Messages:
    475
    @Balmung Nice one man. I kept meaning to go back and add in fetching the technique from the xml after adding the function for getting texture paths but kept forgetting about it until I was in the middle of exporting things. Looking at the files I see you've also changed scaling to account for the changes in v2.79 of Blender. I had actually forgotten that was the reason I'd rolled back to 2.78 of Blender.
     
  18. Balmung Senior Engineer

    Messages:
    1,946
    A new update:

    Download: space_engineers_technique_collision_update.zip (81kb)

    - add "Auto Technique" as default - if you use a material from materials.xml it add from there the correct technique, if you use a other from the drop down menu you overwrite the technique. If you create a own material and you have it on "Auto Technique" it will set it to "Normal Material"/MESH, so like before for a MESH Material you didn't need to change this setting

    - add Blender Versions Check, if you use < 2.79 it use collision box scaling 1.0 if you use 2.79+ it use 0.1 - so you never must think about that whatever your used Blender version is.

    The first one because I was not complete happy that it always read the technique out of the materials.xml, if you use a material there, because sometime you want to use a other technique on this material list. And beside that... i like options. ;)

    The second one is something that i build in more spontaneously. You never must think about that again, if you use for some reasons Blender 2.78 and 2.79.

    --- Automerge ---

    And a alpha, because it needs more testing if all works as it should.

    Download: space_engineers_v0.9.0_alpha4.zip (61kb)

    Cleanup, Support for actual MWMBuilder, new features on materials etc.

    - removed DX9 stuff
    - removed other old stuff
    - optimize material options
    - only show whats needed
    - add autocomplete textures: if you leave NG, ADD or Alphamap fields under material tree empty, on export it looks for existing matching filenames and add the missing one or let it empty.
    - add checkboxs on texture materials, if unchecked no texture file at all is saved into the xml for mwmbuilder
    - changed behavior if you use a material from materials.xml and set up a other texture on the material. It overwrites the texture file from materials.xml, so you could mix a material from materials.xml with own files.
    - add at the plugin settings a second path for mwmbuilder... one for the old version one for the actual version
    - add to the Scene export a checkbox if you want to use the old or the actual mwmbuilder (default is the actual one)

    Alpha 4 Update: SE Plugin for Blender now works with <MaterialRef>. You could now use your own material XML files.

    - changed the material xml setting from file to folder
    - add a button to create a junction folder structure for mwmbuilder to find the material xmls
    - add a button to directly install the SE Mod SDK from Steam (the Install Dialog from Steam will pop up)
    - add a button to switch to the Tools tab in the Steam library
    - add a advanced settings section to the settings with actual one setting: you could add extra arguments for mwmbuilder
     
    Last edited: Apr 26, 2019
  19. Balmung Senior Engineer

    Messages:
    1,946
  20. Kham Apprentice Engineer

    Messages:
    475
    @Balmung I think you may have a bug with something to do with scaling of models or your blender version check. I decided to test it out since I'm still using Blender 2.78c and when I load up the game my block looks like it's been scaled to about 0.01 or lower. Didn't even see it at first it was so small.

    Edit: I just merged in the technique changes to my personal setup though and those work well without all the scaling changes. Should make life just a little bit easier because I inevitably forget to set Decal material technique before my first exports.
     
    Last edited: Apr 27, 2019
  21. Balmung Senior Engineer

    Messages:
    1,946
    Ok, thanks for the report, i will look into it. Already saw that there are some rescale numbers in the plugin.

    The plugin as it is right now is made for Blender 2.79x and there are some known scaling problem between 2.78 and 2.79. I already fixed the collision box size but don't know this issue are also on other things too. I will fix them like i do on the collision box scaling: I check the blender version and use the needed number. Beside that i will build into the new Advanced Settings area in the plugin settings all scaling Numbers, so if needed they can changed there too.
     
  22. Kham Apprentice Engineer

    Messages:
    475
    I did a bit more testing and it looks like the collision models are also scaling down in 2.78, I was able to resolve that by adjusting the blender version check in export.py to
    Code:
    if bpy.app.version <= (2, 78, 0):
    This only fixes the collision part though obviously and I haven't tested to make sure 2.79 still uses the second set of options. If it wasn't for the fact I use Blender for numerous games and only one of them has all their tools updated for 2.79 I'd just update Blender, but I kind of need to keep 2.78 for now.
     
  23. Balmung Senior Engineer

    Messages:
    1,946
    Strange that < (2, 79, 0) didn't work as expected, but good to know, will use that change than too in the next version. But I don't know if I had the time before Monday.
     
  24. Kham Apprentice Engineer

    Messages:
    475
    I was also able to track down where the normal model scaling issue was coming from in 2.78, it's in nodes.py

    I added a version check there too so this starting on line 725
    Code:
    class MwmExportProperties(bpy.types.PropertyGroup):
    	rescale_factor = bpy.props.FloatProperty(name="Rescale Factor", min=0.001, max=1000, soft_min=0.01, soft_max=10, default=0.01,
    		description="Instructs MwmBuilder to rescale everything by the given factor. Exporting a character seems to require a value 0.01. The armature must have the same scale.")
    	rotation_y = bpy.props.FloatProperty(name="Rotation Y", min=-1000, max=1000, soft_min=-360, soft_max=360, default=0,
    		description="Instructs MwmBuilder to rotate everything around the Y-axis. Exporting a character seems to require a value of 180°")
    
    changed to this
    Code:
    class MwmExportProperties(bpy.types.PropertyGroup):
    	if bpy.app.version <= (2, 78, 0):
    		rescale_factor = bpy.props.FloatProperty(name="Rescale Factor", min=0.001, max=1000, soft_min=0.01, soft_max=10, default=1,
    			description="Instructs MwmBuilder to rescale everything by the given factor. Exporting a character seems to require a value 0.01. The armature must have the same scale.")
    		rotation_y = bpy.props.FloatProperty(name="Rotation Y", min=-1000, max=1000, soft_min=-360, soft_max=360, default=0,
    			description="Instructs MwmBuilder to rotate everything around the Y-axis. Exporting a character seems to require a value of 180°")
    	else:
    		rescale_factor = bpy.props.FloatProperty(name="Rescale Factor", min=0.001, max=1000, soft_min=0.01, soft_max=10, default=0.01,
    			description="Instructs MwmBuilder to rescale everything by the given factor. Exporting a character seems to require a value 0.01. The armature must have the same scale.")
    		rotation_y = bpy.props.FloatProperty(name="Rotation Y", min=-1000, max=1000, soft_min=-360, soft_max=360, default=0,
    			description="Instructs MwmBuilder to rotate everything around the Y-axis. Exporting a character seems to require a value of 180°")
    It seems to have resolved the issues I ran in to with my normal models being scaled down. Would require testing with 2.79 to ensure it doesn't cause problems there too. There may yet be other issues with the cross compatibility though of course which I just haven't noticed yet haha.
     
  25. Balmung Senior Engineer

    Messages:
    1,946
    As long the 2.79 not use the lines for 2.78 there should be no problem.
     
  26. Kham Apprentice Engineer

    Messages:
    475
    I will also understand if you don't want to worry about backwards compatibility btw. I realise it can be a pain and I can manually merge in most of the changes you may make to the code with my version until I can get my plugins for other games updated to support 2.79 as well. I'd say most people using Blender just for SE will be safe to update to 2.79 now since you've fixed it's scaling issues for that version.
     
  27. Balmung Senior Engineer

    Messages:
    1,946
    No, i will definitely have backward compatibility in it. There are some modders that have Problems to run 2.79 on their computers so the need to use 2.78. I not want to hinder anyone on modding only because they need to use 2.78.

    Alpha 5 is online: https://github.com/Hotohori/se-blender/releases/tag/0.9.0

    - fixed compatibility with Blender 2.78 - materialref materials are now checked if they really exits before they where added to the xml for mwmbuilder
    - add <!--material X can't be found--> line to the xml file if a material could be a materials lib material. That happens when the material is not found in the lib, is on Auto Technique and have no textures set up or they are unchecked.
    - <!--material has no...--> appears only if material need this one, so no longer this lines on Glass or Alphamask on MESH
     
    Last edited: Apr 28, 2019
  28. Balmung Senior Engineer

    Messages:
    1,946
    V0.9.1 RC2 is out: https://github.com/Hotohori/se-blender/releases

    - Added support for Eikester's Custom MwmBuilder.
    - Add a extra Path field for LODs on Scene properties for Eikester's Custom MwmBuilder.
    - Added Auto search for Actual MwmBuilder and Material Lib path on Steam typical paths.
    - Added new Updater.
    - Changed the old "Game Directory" field to "Converted SE Textures" at the "Advanced Options" area at the Addon settings.

    You could get Eikester's Custom/fixed MwmBuilder here: https://forum.keenswh.com/threads/mwmbuilder-fixes.7391806/
     
  29. UFOslava Trainee Engineer

    Messages:
    1
    Bump.
    Any plans for moving the plugin up to Blender 2.8?
    The new viewport looks great, with lots of workflow improvements. It's a shame it's unsupported.