1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Ben - June 23 2015

Discussion in 'Developer Progress Reports' started by Benjamin, Jun 24, 2015.

  1. Benjamin

    Benjamin Lead Developer

    • Dev Leader
    Today was fun, had a big discussion with some of the team about how to structure our new texture file system, and I'm happy with what we came up with.

    There will be 3 files, and the filenames are not set in stone. (Tell me if they suck) The first is MaterialLayers.yml, which specifies specific layers of material. A material consists of a texture, normal map, displacement map, and a texturing method as well as some other stuff.

    The second file is Materials.bmat.yml, which specifies Block Materials. A Block Material can consist of 1 or 2 materials as a base and overlay, as well as a blendMode for blending between them.

    The final file is BlockMaterialMappings.yml, which will apply materials to blocks using the blocks string identifiers. (we got rid of hardcoded integer IDs.)

    Code:
    ===============================
    MaterialLayers.yml
    ===============================
    Wood:
            method: repeat
            path: "Blocks/Terrain/wood.png"
            normalMap: "Blocks/Terrain/wood_NRM.png"
            dispMap: "Blocks/Terrain/wood_DISP.png"
    Wood_Crate_Trim:
            method: connect
            path: "Blocks/Terrain/wood_crate_trim.png"
            normalMap: "Blocks/Terrain/wood_crate_trim_NRM.png"
            dispMap: "Blocks/Terrain/wood_crate_trim_DISP.png"
    
    
    ===============================
    Materials.bmat.yml
    ===============================
    Wood:
            base: Wood
    Wood_Crate:
            base: Wood
            overlay: Wood_Crate_Trim
            blendMode: alpha
    
    
    ===============================
    BlockMaterialMappings.yml
    ===============================
    Wood_Crate:
            top: Wood
            bottom: Wood
            sides: Wood_Crate_Trim
    Texture packs will contain these three files, and will allow texture artists to apply any textures to any blocks without actually modifying the block data, and it promotes re-use of materials.

    Let me know what you guys think! I spent a good portion of the day working on this as well as texturing stuff, still haven't finished transitioning our filesystem over.

    Bonus pic of ruby!

    [​IMG]

    HOPEFULLY tomorrow I'll have some normal mapping and displacement mapping to show, but that hinges on how many issues I run into with the new file structure transition.
    Benjamin, Jun 24, 2015
    Last edited by Benjamin; at Jun 24, 2015
    #1
    NeonSturm, ColdFuseon and joppiesaus like this.
  2. Gingy

    Gingy Back Into Space

    • Member
    So would I just have to have my texures and mappings named to match the id for the .yml files in order to apply them to the game?
    Benjamin and ColdFuseon like this.
  3. Danarkivus-2

    Danarkivus-2 Back Into Space

    • Member
  4. FruitGish

    FruitGish Reinvented The Wheel

    • Member
    I WANT DISPLACEMENT MAPPING!!!1111oneoneone
    Benjamin, ColdFuseon and Gingy like this.
  5. Thomas988

    Thomas988 Back Into Space

    • Member
    Cool stuff! Voxels are coming along very nicely. :)
    Benjamin and ColdFuseon like this.
  6. Sevio

    Sevio Back Into Space

    • Member
    Have you thought about how you will handle non-full blocks in this file format? This would be any block that doesn't occupy the full space of a block but only a portion of it, which would be specified by some model. A common example from Minecraft would be a torch, a fence post, door, glass pane etc.

    Minecraft resource packs are specified in JSON files these days and can do quite a bit more than just replace textures, they can change how blocks are displayed by adding extra polygons and specifying texture mappings for them. If interested, further reading here, specifically the Models page. I'm not sure what exactly is changing in 1.9, but I do know they're doing a 180 on some of their decisions that made things a headache for modders, so don't take all of what's on that page as final.
    NeonSturm, Benjamin and ColdFuseon like this.
  7. Benjamin

    Benjamin Lead Developer

    • Dev Leader
    Correct! In BlockData.yml you will be able to see all the string block IDs, you can simply use these.

    We will probably allow you to specify custom meshes in YML, JSON, and/or LUA. Meshes are specified in the BlockData.yml, and rather than using a default mesh (block, flora, ect) you could link to a file that defines the mesh. Materials will still be created the same way, but you can choose how to use those materials in your custom script/data.
    Sevio, ColdFuseon and Gingy like this.
  8. Benjamin

    Benjamin Lead Developer

    • Dev Leader
    UPDATE: Were renaming the files
    LayerProperties.yml, Textures.yml, BlockTextureMappings.yml.
    NeonSturm, Thomas988 and ColdFuseon like this.
  9. NeonSturm

    NeonSturm Back Into Space

    • Member
    I am also interested into an answer to Servio's question.

    MaterialLayers.yml
    Materials.bmat.yml -- bmat is confusing, "BlockMaterials.yml" sounds nice
    BlockMaterialMappings.yml


    I would call the parameters: "method, texture, normal, dispersion" or "pattern|patternMethod, texturePath, normalPath, dispersionPath" for consistency of the later 3 parameters.
    NeonSturm, Jun 24, 2015
    Last edited by NeonSturm; at Jun 24, 2015
    #9
  10. joppiesaus

    joppiesaus Infamous Space-Octopus

    • Member
    That wouldn't make sense, since everything is a path. Oh and you can just use / as or, not |, cuz this is not math. ;)
    joppiesaus, Jun 24, 2015
    Last edited by joppiesaus; at Jun 24, 2015
    #10
Similar Threads: June 2015
Forum Title Date
Developer Progress Reports Ben - June 25 2015 Jun 26, 2015
Developer Progress Reports Ben - June 22 2015 Jun 23, 2015
Developer Progress Reports Julien - June 21 2015 Jun 21, 2015
Developer Progress Reports Ben - June 14 2015 Jun 15, 2015
Developer Progress Reports Ben - June 12 2015 Jun 13, 2015

Share This Page