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.)

            method: repeat
            path: "Blocks/Terrain/wood.png"
            normalMap: "Blocks/Terrain/wood_NRM.png"
            dispMap: "Blocks/Terrain/wood_DISP.png"
            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"
            base: Wood
            base: Wood
            overlay: Wood_Crate_Trim
            blendMode: alpha
            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!


    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
    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. Thomas988

    Thomas988 Back Into Space

    • Member
    Cool stuff! Voxels are coming along very nicely. :)
    Benjamin and ColdFuseon like this.
  5. 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.
  6. 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.
  7. Benjamin

    Benjamin Lead Developer

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

    NeonSturm Back Into Space

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

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

    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. 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
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