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.

Example: Adding new model

Discussion in 'Modding Guides and Tools' started by Ondrej.Petrzilka, Nov 1, 2013.

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

    Messages:
    17
    Sounds like a perfect way to do it! Garrys Mod had something very similiar. When you joined a modded server, you'd get all of the 3rd party files upon joining. It was a simple, seamless experience and worked great!

    I would think that you guys could think of a simple solution to this, but I would guess instead of adding new modded blocks into CubeBlocks.sbc, it'd make sense to have each mod have its own sbc file specifying the models it uses. So like 'PHXWeaponPack.sbc' for example. That would save the CubeBlocks.sbc file being overwritten every time a new mod is loaded with custom models.

    I can't wait for this though! :-D
     
  2. GeneralApathy Apprentice Engineer

    Messages:
    273
    Yes, yes, yes!
     
  3. Bort Trainee Engineer

    Messages:
    75
    Thank you, that sounds good. I forgot that there are also options within privately owned Valve game servers, too, within the server's config file, where the server owner or an administrator can set up certain things required by all the players joining that server to be downloaded from a separate server. I've actually modded a game (Empires) and put the required, changed, files on the download server and used the config file so anyone that joined would automatically download our modifications. So that is very possible too. The downfall with that is that

    1. it may take forever to download depending on the size of the mod. I don't think there is a file compression thing available for this through or on steam game servers. I could be wrong. It would also be up to the user/player if they wanted to wait for a long download or not.
    2. ...security risks. Which...should be left to the individual players to decide whether they want to join that server and download the modifications and take that risk or not. Which is how it is anyway.
    I was just curious as to how you(the devs of Space Engineers) were considering doing it. It would be nice to have all options available, which it seems that's what's being considered. Thanks for answering!
     
  4. RastionSigne Trainee Engineer

    Messages:
    5
    Yes! Official mod support built into the core game would be amazing. IMO that is where Minecraft is most lacking, they continuously focus on content but the community can generate way more content if a stable API of sorts is put into place.
     
  5. Sims_doc Junior Engineer

    Messages:
    876
    Just sorta curious anyone know if the developers allow users extracting models? because i want to use the current models as reference so i can make a few custom turrets and a better control chair, passenger chair.
     
  6. Bort Trainee Engineer

    Messages:
    75
    They are obviously in support of player creativity. I would just do it. If they have a problem with it they'll let you know. Everything is in the Terms of Service. If you're that concerned, read the TOS in full and make sure what you're doing is ok. If the TOS doesn't say you can't...you can.
    It's also safe to assume any model you can open, you can use as reference or even edit it. Keep in mind, of course, if you edit a current model it may not work very well when they release multiplayer.
     
  7. Sims_doc Junior Engineer

    Messages:
    876
    Thanks for the update, sadly someone told me about the pre extracted stuff recently and i've been using that for reference instead.
     
  8. xMoneyShadow Apprentice Engineer

    Messages:
    150
    ***READ***



    After the new update today, you WILL
    need to change the blockposition from

    Code:
    <X>7</X>
    <Y>2</Y>
    TO

    Code:
    [SIZE=3]<X>8</X>[/SIZE]
    [SIZE=3]<Y>2</Y>
    THE MOTOR IS NOW IN THE PLACE OF 7,2![/SIZE]
     
  9. camsedin Trainee Engineer

    Messages:
    79
    Block position is not needed. it just goes into what ever block slot is free.
     
  10. ripptide Trainee Engineer

    Messages:
    74
    Thanks for the info camsedin, thought I was losing it when adding some blocks. Do you know if you can set placement (in order to keep blocks grouped) or is that section of CubeBlocks.sbc no longer used?
     
  11. flintread Trainee Engineer

    Messages:
    10
    I have found that you can export from lightwave with this method save your lwo. file then open deep exploration save as fbx. from deep exploration and you will not suffer from lightwaves strange habit of making strange smoothing artifacts and your smoothing data and uv map will import intact :D happy lightwaving another 3d application user base enters the fray!
     
  12. Sims_doc Junior Engineer

    Messages:
    876
    Would someone please create a video tutorial on this subject so it can be attach to the thread ASAP.

    [Edit] Also because i wouldn't mind doing this myself quickily without having to contact another person and wait a week for a few models to be ported while he does a dozen in the meantime..
     
  13. Rareden Trainee Engineer

    Messages:
    12
    My game crashes on startup if i modify the cubeblocks.sbc with a custom block
    Code:
      <Definition>
          <Id>
            <TypeId>HalfBlock</TypeId>
            <SubtypeId>SmallHalfBlock</SubtypeId>
          </Id>
          <DisplayName>SmallHalfBlock</DisplayName>
          <Icon>Textures\GUI\Icons\cubes\square_box</Icon>
          <CubeSize>small</CubeSize>
          <BlockTopology>cube</BlockTopology>
          <Size>
            <X>1</X>
            <Y>1</Y>
            <Z>0.5</Z>
          </Size>
          <ModelOffset>
            <X>0</X>
            <Y>0</Y>
            <Z>0</Z>
          </ModelOffset>
          <CubeDefinition>
            <CubeTopology>Box</CubeTopology>
            <Sides>
              <Side Model="Models\Cubes\small\armor\small_half_squareFront" PatternWidth="4" PatternHeight="2" />
              <Side Model="Models\Cubes\small\armor\small_half_squareFront" PatternWidth="4" PatternHeight="2" />
              <Side Model="Models\Cubes\small\armor\small_half_squareFront" PatternWidth="4" PatternHeight="2" />
              <Side Model="Models\Cubes\small\armor\small_half_squareFront" PatternWidth="4" PatternHeight="2" />
              <Side Model="Models\Cubes\small\armor\small_half_square" PatternWidth="2" PatternHeight="1" />
              <Side Model="Models\Cubes\small\armor\small_half_square" PatternWidth="2" PatternHeight="1" />
            </Sides>
          </CubeDefinition>
          <Components>
            <Component Subtype="SteelPlate" Count="10" />
          </Components>
          <CriticalComponent Subtype="SteelPlate" Index="0" />
          <MountPoints>
            <MountPoint Side="Front" StartX="0" StartY="0" EndX="1" EndY="1" />
            <MountPoint Side="Back" StartX="0" StartY="0" EndX="1" EndY="1" />
            <MountPoint Side="Left" StartX="0" StartY="0" EndX="1" EndY="1" />
            <MountPoint Side="Right" StartX="0" StartY="0" EndX="1" EndY="1" />
            <MountPoint Side="Bottom" StartX="0" StartY="0" EndX="0.5" EndY="0.5" />
            <MountPoint Side="Top" StartX="0" StartY="0" EndX="0.5" EndY="0.5" />
          </MountPoints>
          <Variants>
            <Variant Color="Red" Suffix="_red" />
            <Variant Color="Yellow" Suffix="_yellow" />
            <Variant Color="Blue" Suffix="_blue" />
            <Variant Color="Green" Suffix="_green" />
            <Variant Color="Black" Suffix="_black" />
            <Variant Color="White" Suffix="_white" />
          </Variants>
          <PhysicsOption>Box</PhysicsOption>
          <BuildProgressModels />
          <BlockPairName>HalfBlock</BlockPairName>
          <ExcludedAreaForCamera />
          <CenterOffset xsi:nil="true" />
        </Definition>
    
     
  14. darth_biomech Senior Engineer

    Messages:
    1,550
    I just don't get it. Textures are in right places, name of materials is identical in both FBX and XML, but I still get black model ingame.

    Code:
    <?xml version="1.0"?>
    <Model Name="Default">
      <BoneGridSize d2p1:nil="true" xmlns:D2p1="http://www.w3.org/2001/XMLSchema-instance" />
      <Parameter Name="Centered">false</Parameter>
      <Parameter Name="RescaleFactor">1000.00</Parameter>
      <Parameter Name="RescaleToLengthInMeters">false</Parameter>
      <Parameter Name="SpecularPower">10</Parameter>
      <Parameter Name="SpecularShininess">0.8</Parameter>
      <Material Name="01 - Default">
        <Parameter Name="SpecularIntensity">0</Parameter>
        <Parameter Name="SpecularPower">2</Parameter>
        <Parameter Name="DiffuseColorX">255</Parameter>
        <Parameter Name="DiffuseColorY">255</Parameter>
        <Parameter Name="DiffuseColorZ">255</Parameter>
        <Parameter Name="Texture">Textures\Models\Cubes\large_hydrophonic_de.dds</Parameter>
        <Parameter Name="NormalTexture" />
      </Material>
    </Model>
     
  15. nanobot Trainee Engineer

    Messages:
    5
    You need to add a _ns (normal/spec) texture.
    RGB channel for normal and alpha channel for the specular.

    place in the same location as the diffuse texture,
    then fill in the normal map parameter in your model .xml (before generating your .mwm file)

    In your case change:
    Code:
    <Parameter Name="Texture">Textures\Models\Cubes\large_hydrophonic_de.dds</Parameter>
        <Parameter Name="NormalTexture" />
    
    to:
    
    Code:
    <Parameter Name="Texture">Textures\Models\Cubes\large_hydrophonic_de.dds</Parameter>
        <Parameter Name="NormalTexture">Textures\Models\Cubes\yourNSTextureNameGoesHere.dds</Parameter>
    
    Code:
    Supposedly you can leave the NormalTexture parameter as you have it (with no file location) if you save your ns file with the same name, but with
    a _ns instead of _de, and if they are located in the same folder. But I haven't actually tested this. Note that if you do use my placeholder below you
    will have to either change the parameter as I said above to the correct name, or just rename the texture to (using the above example) :
    Code:
    large_hydrophonic_ns.dds
    If you don't know how to make a normal/spec texture feel free to use my placeholder ns file below.
    https://drive.google.com/#folders/0B-TYi_kAL4s2UUgwazF1OHFkdXc

    I would just post the texture here but most image boards won't let you upload .dds files.
    Let me know if you, or anyone else, has problems downloading it from google Docs.
     
  16. darth_biomech Senior Engineer

    Messages:
    1,550
    Yeah, thanks, but it is not the case. I found my problem anyway, and it was that I turned off texture in material to bake lightning in, and forgot to turn it back on afterwards. But missing normalmap instead messing up with model smoothgroups, so even blank one is required.
     
  17. EctoSage Trainee Engineer

    Messages:
    82
    Does this still work? Because for the life of me I cannot get any new objects to show up in the object selection screen.

    ***Edit: Got it all to work... after so many damn hours of fiddling with all this coding nosense. . . Except teh Collision Mesh... For some reason the collision on my object is showing up as a large Cube.


    ----------XML File---------------------------------------
    <?xml version="1.0"?>
    <Model Name="CryoPod">
    <BoneGridSize d2p1:nil="true" xmlns:D2p1="http://www.w3.org/2001/XMLSchema-instance" />
    <Parameter Name="Centered">false</Parameter>
    <Parameter Name="RescaleFactor">0.01</Parameter>
    <Parameter Name="RescaleToLengthInMeters">false</Parameter>
    <Parameter Name="SpecularPower">10</Parameter>
    <Parameter Name="SpecularShininess">0.8</Parameter>
    <Material Name="CryoPod_M">
    <Parameter Name="SpecularIntensity">0</Parameter>
    <Parameter Name="SpecularPower">2</Parameter>
    <Parameter Name="DiffuseColorX">255</Parameter>
    <Parameter Name="DiffuseColorY">255</Parameter>
    <Parameter Name="DiffuseColorZ">255</Parameter>
    <Parameter Name="Texture">Textures\Models\CryoPod_de.dds</Parameter>
    <Parameter Name="NormalTexture">Textures\Models\CryoPod_ns.dds</Parameter>
    </Material>
    </Model>

    ----------CubeBlocks File Snippit------------------------
    <div> &lt;Definition>
    &lt;Id>
    &lt;TypeId>CubeBlock&lt;/TypeId>
    &lt;SubtypeId>CryoPod&lt;/SubtypeId>
    &lt;/Id>
    &lt;DisplayName>CryoPod&lt;/DisplayName>
    &lt;Icon>Textures\GUI\Icons\Cubes\CryoPodIcon&lt;/Icon>
    &lt;CubeSize>Large&lt;/CubeSize>
    &lt;BlockTopology>TriangleMesh&lt;/BlockTopology>
    &lt;Size>
    &lt;X>1&lt;/X>
    &lt;Y>1&lt;/Y>
    &lt;Z>1&lt;/Z>
    &lt;/Size>
    &lt;ModelOffset>
    &lt;X>0&lt;/X>
    &lt;Y>0&lt;/Y>
    &lt;Z>0&lt;/Z>
    &lt;/ModelOffset>
    &lt;Model>Models\CryoPod&lt;/Model>
    &lt;Components>
    &lt;Component Subtype="Construction" Count="8" />
    &lt;Component Subtype="InteriorPlate" Count="12" />
    &lt;Component Subtype="SmallTube" Count="4" />
    &lt;/Components>
    &lt;CriticalComponent Subtype="Construction" Index="0" />
    &lt;MountPoints>
    &lt;MountPoint Side="Top" StartX="0" StartY="0.8" EndX="1" EndY="1" />
    &lt;MountPoint Side="Bottom" StartX="0" StartY="0" EndX="1" EndY="0.2" />
    &lt;MountPoint Side="Left" StartX="0" StartY="0" EndX="0.2" EndY="1" />
    &lt;MountPoint Side="Right" StartX="0.8" StartY="0" EndX="1" EndY="1" />
    &lt;/MountPoints>
    &lt;PhysicsOption>Box&lt;/PhysicsOption>
    &lt;BuildProgressModels />
    &lt;BlockPairName>CryoPod&lt;/BlockPairName>
    &lt;ExcludedAreaForCamera />
    &lt;CenterOffset xsi:nil="true" />
    &lt;/Definition>
    </div>
     
  18. johncage Trainee Engineer

    Messages:
    56
    http://facepunch.com/showthread.php?t=1366028&p=44051257&viewfull=1#post44051257

    this needs to happen asap
     
  19. Balmung Senior Engineer

    Messages:
    1,945
    Short Description how to make your own Custom Block Survival Mode ready:

    I use the Large Gatling Turret as Example


    1. You need the finished Model and for every Build Step you want an extra Model (+ Textures).

    At our Example that would be:

    GatlingTurret.mwm &lt;- the complete Model

    GatlingTurretConstruction_1.mwm &lt;- 1. Build Step
    GatlingTurretConstruction_2.mwm &lt;- 2. Build Step
    GatlingTurretConstruction_3.mwm &lt;- 3. Build Step

    2. The "CubeBlocks.sbc" File:
    Code:
        &lt;Definition>
          &lt;Id>
            &lt;TypeId>LargeGatlingTurret&lt;/TypeId>
            &lt;SubtypeId />
          &lt;/Id>
          &lt;DisplayName>GatlingTurret&lt;/DisplayName>
          &lt;Icon>Textures\GUI\Icons\Cubes\gatling_turret&lt;/Icon>
          &lt;CubeSize>Large&lt;/CubeSize>
          &lt;BlockTopology>TriangleMesh&lt;/BlockTopology>
          &lt;Size x="3" y="3" z="3" />
          &lt;ModelOffset x="0" y="0" z="0" />
          [I]&lt;Model>Models\Cubes\Large\GatlingTurret&lt;/Model>[/I]
          [COLOR= #0000ff][B]&lt;Components>[/B][/COLOR]
    [COLOR= #003366][B]        &lt;Component Subtype="SteelPlate"[/COLOR] [COLOR= #008000]Count="5"[/COLOR] />[/B]
    [COLOR= #003366][B]        &lt;Component Subtype="Construction" Count="25" />[/B][/COLOR]
    [COLOR= #003366][B]        &lt;Component Subtype="SmallTube" Count="6" />[/B][/COLOR]
    [COLOR= #003366][B]        &lt;Component Subtype="LargeTube" Count="1" />[/B][/COLOR]
    [COLOR= #003366][B]        &lt;Component Subtype="Motor" Count="8" />[/B][/COLOR]
    [COLOR= #003366][B]        &lt;Component Subtype="Computer" Count="10" />[/B][/COLOR]
    [COLOR= #003366][B]        &lt;Component Subtype="Construction" Count="5" />[/B][/COLOR]
    [COLOR= #003366][B]        &lt;Component Subtype="SteelPlate" Count="15" />[/B][/COLOR]
    [B]      [COLOR= #0000ff]&lt;/Components>[/COLOR][/B]
          [B][COLOR= #993300]&lt;CriticalComponent Subtype="Computer" Index="0" />[/COLOR][/B]
          &lt;MountPoints>
            &lt;MountPoint Side="Bottom" StartX="1" StartY="1" EndX="2" EndY="2" />
          &lt;/MountPoints>
    [B]      [COLOR= #0000ff]&lt;BuildProgressModels>[/COLOR][/B]
    [COLOR= #003366][B]        &lt;Model BuildPercentUpperBound="0.33"[/COLOR] [COLOR= #008000]File="Models\Cubes\Large\GatlingTurretConstruction_1"[/COLOR] />[/B]
    [COLOR= #003366][B]        &lt;Model BuildPercentUpperBound="0.66" File="Models\Cubes\Large\GatlingTurretConstruction_2" />[/B][/COLOR]
    [COLOR= #003366][B]        &lt;Model BuildPercentUpperBound="1.00" File="Models\Cubes\Large\GatlingTurretConstruction_3" />[/B][/COLOR]
          [B][COLOR= #0000ff]&lt;/BuildProgressModels>[/COLOR][/B]
          &lt;BlockPairName>GatlingTurret&lt;/BlockPairName>
          &lt;MirroringY>Z&lt;/MirroringY>
          &lt;MirroringZ>Y&lt;/MirroringZ>
          &lt;EdgeType>Light&lt;/EdgeType>
          [B][COLOR= #993300]&lt;BuildTimeSeconds>30&lt;/BuildTimeSeconds>[/COLOR][/B]
        &lt;/Definition>
    The new &lt;Components>&lt;/Components> Area have the Data what you need on Components to build this Block.

    This Data's are in this Area:

    -The Order in which the Components are used/needed (1. Line = 1. Component / Last Line = Last Component)
    -The Type of the Component (Subtype="&lt;Component Type>")
    -The Number of this Component (Count="&lt;Number>")


    After this Area there is a &lt;CriticalComponent> Flag, this mark where the 100% Place is, the thin red Line on the Construction Window, when this Component is build the Block is ready for use and the normal Model of the Block is used. For our Example means this, that the Gatling Turret can be used when the Computer Components are build into the Block. If you have for example three "SteelPlate" Component Entries and you want that the last one is the Critical one, then you must set Index to 2 (Index="2"), the Number of the Entry -1.


    The new &lt;BuildProgressModels>&lt;/BuildProgressModels> Area have the Data when which Construction Model of your Block should be used.

    -Up to which percent the Model should be used (BuildPercentUpperBound="&lt;Number>") 0.00 = 0% / 1.00 = 100% from &lt;CriticalComponent>
    -The Path and Filename without the ".mwm" Extension of the Construction Models


    At the End is a &lt;BuildTimeSeconds> Flag, that should be the Time you need to build the Block, but I'm a bit confused. I stop the Time to build the Gatling Turret up an get 40 Seconds, but there stand 30 Seconds.


    On some other Blocks there are a "&lt;DisassembleRatio>2.5&lt;/DisassembleRatio>" Flag directly after the last Flag above. I'm not sure what exactly that is but for me it sounds it is the Ratio how much faster you can disassemble a Block than assemble it, depending on &lt;BuildTimeSeconds>.


    Note: some Things I have tested to get sure that I'm right, but I didn't made a Custom Block to check all of this, but as far I could see there is no reason you can't made this.
     
  20. darth_biomech Senior Engineer

    Messages:
    1,550
    As may some of you know that last update broke mods, Devs changed file format for models and it's now causes game to crash when trying to load old model. I found out why. Devs lifted restrictions about collision meshes. Custom ones is now possible!
    [​IMG]
     
  21. TheKotU Apprentice Engineer

    Messages:
    211
    That's good to know that they lifted that, hoping to get updates from mod authors so i can update my Mod List
     
  22. Fus Apprentice Engineer

    Messages:
    247
    Any chance of telling us what changed?

    None of my models load, but I can make a new "box" and get that in game.
    I don't want to have to make completely new models if I don't have to, so what changed ?
     
  23. darth_biomech Senior Engineer

    Messages:
    1,550
    You just need to recompile your fbx into mwm again, that's all.
     
  24. kolt16 Trainee Engineer

    Messages:
    25
    I have a problem with maya 2014 models, if I assign any material to my model I get a crash in game.

    crash log: (let me know if you need the whole log file)

    Importing asset Models\Cubes\Large\Gratefloor, ...
    Exception occured: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Length cannot be less than zero.



    The only reference I found is on Se-Modz, but no answer is given there, at least not yet, if I get one I'll post it both ways, so the next unfortunate who runs into this will have something to find.

    I did run a bunch of test on this. Model complexity and material type, and export options seem to be irrelevant (tested with original models and combinations)

    My best guess at the moment is that it has to do with uv mapping, but how or why I have no idea. If anyone ran into this before please let me know what the hack to do about it..



    Edit:
    Solved, I'm an idiot :D

    Anyway if this happens the reason is you defined the texture wrong in the xml file for the mwm conversion. Should have checked for it sooner, I just assumed from something that .dds is added by default, it isn't.. :D
     
  25. Denesta Trainee Engineer

    Messages:
    55
    I don't suppose there is anyway through some kind of plugin to do collision in Blender is there? I really want to make my own models for this but I can't afford Maya or 3DsMax.
     
  26. KC8DEE Apprentice Engineer

    Messages:
    117
    if you are in school or a student you can get Maya for free
     
  27. Denesta Trainee Engineer

    Messages:
    55
    I am past the student stage. That's why I was hoping there was an alternative.
     
  28. Embershard Senior Engineer

    Messages:
    1,686
    Yeah, there is a free alternative. Let me find it and I'll edit this post with the download link. Don't use it myself, but one of the modders in the community does, so it works.
     
  29. Shaostoul Senior Engineer

    Messages:
    2,608
    You could always find a modder who has access to Maya to build it, if you wanted to go that route.
     
  30. Embershard Senior Engineer

    Messages:
    1,686
    Here you go Denesta, took a bit to find it.

    http://www.moddb.com/downloads/autodesk-softimage-mod-tool-75
     
Thread Status:
This last post in this thread was made more than 31 days old.