Welcome to Dawn of Eternity

In order to download and play the game you need to sign up for an account and activate it, it's free. Once you have an active account you will be able to see the download page at the top of the forum.

Sign Up

How to create a preset

Discussion in 'Help & Documentation' started by Myz, Apr 24, 2015.

Thread Status:
Not open for further replies.
  1. Myz

    Myz Administrator
    Staff Member

    Joined:
    Nov 1, 2014
    Messages:
    345
    Likes Received:
    46
    In-Game Name:
    Myz
    This topic is going to cover the basics of creating and applying a preset to one of your characters. I'm going to assume you already understand how to use an image editor that can handle layers.

    Things you will need:
    When you've got that you can go to step one.


    References
    I will not go into depth about Ogre material files, I'm just going to cover the basics of what you need to know. You can refer to to the Ogre manual if you want to do more advanced stuff.

    Material Passes.
    You'll find information about lighting, blending and depth here.

    Texture Units.
    You'll find information about what you can do with a texture_unit here, for when you want to learn things like how to create spinning or rotating textures.
     
    • Like Like x 5
    • Winner Winner x 1
    • Useful Useful x 1
  2. Myz

    Myz Administrator
    Staff Member

    Joined:
    Nov 1, 2014
    Messages:
    345
    Likes Received:
    46
    In-Game Name:
    Myz
    1. Creating and applying a basic preset

    First thing we need is a character to put the preset on. I'm just going to create a Canine called Test for this tutorial.

    1.jpg

    Now quit the game and go to your my_content folder in your game folder and then into the presets folder. You should find a file called template.material, right click that file and copy it.

    Now right click again in your presets folder and paste, name the new file yourusername_yourcharname.material.
    In my case it's going to be called myz_test.material, since I named my character Test and my username is Myz.

    If you're going to make multiple presets you can create a subfolder in your presets folder and put your material and images there.


    Now open the file you've created with your text editor and you should see this:
    Code:
    material username_character
    {
       receive_shadows on
       technique
       {
         pass
         {
           ambient 0.95 0.95 0.95 1
           diffuse 0.6 0.6 0.6 1
           specular 0.1 0.1 0.1 1
    
           texture_unit
           {
             texture username_character.png
           }
         }
       }
    }
    
    Now we need to edit this a bit to work with our username and character name. The first line says:
    material username_character
    In my case it needs to be changed into this:
    material myz_test
    It's important that it's all in lowercase, if you have spaces in your name they need to be replaced with "-"

    Then we need to go down to the texture_unit and do the same thing with the image name:
    texture username_character.png
    should be:
    texture myz_test.png

    That's all the material editing we need to do for now. Your material should look like this now(well the parts that say myz_test should be different):
    Code:
    material myz_test
    {
       receive_shadows on
       technique
       {
         pass
         {
           ambient 0.95 0.95 0.95 1
           diffuse 0.6 0.6 0.6 1
           specular 0.1 0.1 0.1 1
    
           texture_unit
           {
             texture myz_test.png
           }
         }
       }
    }
    

    Now we need to create the myz_test.png image. Go to the my_content folder and then into the UV folder and since I made a canine I'm going to open the CanineUV.png with GIMP.

    2.jpg

    Now just create a new layer and start creating your preset.
    3.jpg

    Perfect, best preset ever made. Now save the image to the preset folder with the name you put in the material file, in my case this was myz_test.png. That should be it, the preset will be on your character in the game so just start and check.

    4.jpg


    It's working, but we could add some fur to it to make it less boring. You could add fur directly to your texture but then it would be hard to edit it further, and maybe you want to use the same fur for multiple presets. So let's just add another texture_unit and put the fur on top of your first texture.

    I'm not going to create my own fur, I'm just going to use one of those that comes with the game. You can find them in the media\materials\textures\player\fur folder, I'm going to use fur0.png for my preset.

    So all I need to do is add this to my material:
    Code:
          texture_unit
           {
             texture fur0.png
           }
    
    My material now looks like this:
    Code:
    material myz_test
    {
       receive_shadows on
       technique
       {
         pass
         {
           ambient 0.95 0.95 0.95 1
           diffuse 0.6 0.6 0.6 1
           specular 0.1 0.1 0.1 1
          
           texture_unit
           {
             texture myz_test.png
           }
           texture_unit
           {
             texture fur0.png
           }
         }
       }
    }
    
    5.jpg

    Done.
     
    #2 Myz, Apr 24, 2015
    Last edited: Apr 26, 2015
    • Useful Useful x 2
    • Like Like x 1
  3. Myz

    Myz Administrator
    Staff Member

    Joined:
    Nov 1, 2014
    Messages:
    345
    Likes Received:
    46
    In-Game Name:
    Myz
    2. Adding asymmetrical eyes to your preset.

    If you want to make one of your eyes different to the other you need to create another texture using the same UV as you did for the other one then add another material to your material file.

    To change the right eye you add this:
    Code:
    material myz_test/eyer
    {
       receive_shadows off
       technique
       {
         pass
         {
           ambient 0.95 0.95 0.95 1
           diffuse 0.6 0.6 0.6 1
           specular 0.1 0.1 0.1 1
           texture_unit
           {
             texture myz_test_right.png
           }
         }
       }
    }
    
    This would add myz_test_right.png to the right eye for my character called test from the previous tutorial. To make it go on the left eye you simply change the
    Code:
    material myz_test/eyer
    
    to be
    Code:
    material myz_test/eyel
    

    So the complete material file for my test character with the right eye changed would look like this now:
    Code:
    material myz_test
    {
       receive_shadows on
       technique
       {
         pass
         {
           ambient 0.95 0.95 0.95 1
           diffuse 0.6 0.6 0.6 1
           specular 0.1 0.1 0.1 1
        
           texture_unit
           {
             texture myz_test.png
           }
           texture_unit
           {
             texture fur0.png
           }
         }
       }
    }
    
    material myz_test/eyer
    {
       receive_shadows off
       technique
       {
         pass
         {
           ambient 0.95 0.95 0.95 1
           diffuse 0.6 0.6 0.6 1
           specular 0.1 0.1 0.1 1
           texture_unit
           {
             texture myz_test_right.png
           }
         }
       }
    }
    
     
    • Like Like x 1
  4. Myz

    Myz Administrator
    Staff Member

    Joined:
    Nov 1, 2014
    Messages:
    345
    Likes Received:
    46
    In-Game Name:
    Myz
    3. Adding Mane/Tuft textures.
    Works exactly like eyes. Don't have the UVs for this stuff, need to gather them up sometime, so have fun guessing.

    Mane:
    Code:
    material myz_test/mane
    {
       receive_shadows off
       technique
       {
         pass
         {
           ambient 0.95 0.95 0.95 1
           diffuse 0.6 0.6 0.6 1
           specular 0.1 0.1 0.1 1
           texture_unit
           {
             texture myz_test_mane.png
           }
         }
       }
    }
    
    Tuft:
    Code:
    material myz_test/tuft
    {
       receive_shadows off
       technique
       {
         pass
         {
           ambient 0.95 0.95 0.95 1
           diffuse 0.6 0.6 0.6 1
           specular 0.1 0.1 0.1 1
           texture_unit
           {
             texture myz_test_tuft.png
           }
         }
       }
    }
    
     
    • Like Like x 1
    • Informative Informative x 1
  5. Myz

    Myz Administrator
    Staff Member

    Joined:
    Nov 1, 2014
    Messages:
    345
    Likes Received:
    46
    In-Game Name:
    Myz
    4. Sharing your preset.
    In order for your friends to be able to see your preset you will have to give it to them. Go into the folder where you've made your preset and mark all the files for the preset you want to share.

    1.jpg


    Right click the marked files and select Send to and Compressed folder.

    2.jpg

    You should now have a zip file containing your preset.

    3.jpg

    Right now you have two versions of the same preset in your preset folder, a zipped one and the normal one. To prevent conflics when you edit your preset in the future you should move one of them out of the preset folder.

    4.jpg


    Now you just need to send the zip file to your friends and tell them to put it in their my_content/presets folder and they will be able to see your preset.
     
  6. Myz

    Myz Administrator
    Staff Member

    Joined:
    Nov 1, 2014
    Messages:
    345
    Likes Received:
    46
    In-Game Name:
    Myz
    5. Lighting values explained

    So I'll try to give a really basic explanation of what the ambient, specular, diffuse and emissive values mean. I'll use the values that come from the template file(except for the emissive since it doesn't have one for it). You'll find more info the Ogre docs at http://www.ogre3d.org/docs/manual/manual_16.html


    Ambient is how much of the maps ambient light your character will receive, ambient light is the light that's always available in the map, even during night, so this value should be pretty high.
    Code:
    ambient 0.95 0.95 0.95 1
    
    So what does the numbers mean? You only need to care about the first 3, it's how much of each colour of the light your char will receive. Red, Green, Blue.
    The range is 0-1 so it basically means 0 = 0 and 1 = 255, or if you prefer percent 0 = 0% and 1 = 100%.




    Diffuse
    is how much of the light your char will accept from light sources(sun being the main one). So if you want your character to be dark even when the sun is up you set these values low.
    Code:
    diffuse 0.6 0.6 0.6 1
    
    The numbers work the same as they do for the ambient one.




    Specular is how much light you will "reflect", this can be used to make yourself appear to be shiny. So if you're for example making a metal preset you might want to mess around with these values and set them high.
    Code:
    specular 1 1 1 128
    
    The first 3 numbers work the same as they do for the ambient one, but the fourth one basically decides how shiny you will be, value can be 0-???, the docs say values between 1 and 128 works best, but it can go higher.



    Emissive, this makes you provide your own light, so if you want to appear to be glowing in dark areas you can set this to 1 1 1 1.
    Code:
    emissive 1 1 1 1
    
    The numbers work the same as they do for the ambient one.
     
    • Like Like x 1
    • Useful Useful x 1
  7. Myz

    Myz Administrator
    Staff Member

    Joined:
    Nov 1, 2014
    Messages:
    345
    Likes Received:
    46
    In-Game Name:
    Myz
    6. Item presets

    So you got an item that you like but it doesn't really fit into your presets theme? Here is how you can include your own version of an item in your preset.

    I'm going to be editing my White Wings on my Test character, this is what it looks before I do anything to the wings.

    1.jpg

    First thing you need to do is get the item code and mesh name for the item. Go to your character list at http://dawn-of-eternity.com/community/pages/view-user/ and then to your character, if you have the item you want equipped you should see it in the item list.
    Click on the item and you should see something like this:
    2.jpg

    Now for the material, it needs your username, character name and item code
    material username_character/item/itemcode

    So in my case the material is going to look like this:
    Code:
    material myz_test/item/wings2
    {
       receive_shadows on
       technique
       {
         pass
         {
           ambient 0.95 0.95 0.95 1
           diffuse 0.6 0.6 0.6 1
           specular 0.1 0.1 0.1 1
    
           texture_unit
           {
             texture myz_test_wings2.png
           }
         }
       }
    }
    
    I'll add it to the material I have from the previous tutorial so the full material file looks like this now:
    Code:
    material myz_test
    {
       receive_shadows on
       technique
       {
         pass
         {
           ambient 0.95 0.95 0.95 1
           diffuse 0.6 0.6 0.6 1
           specular 0.1 0.1 0.1 1
    
           texture_unit
           {
             texture myz_test.png
           }
         }
       }
    }
    
    material myz_test/item/wings2
    {
       receive_shadows on
       technique
       {
         pass
         {
           ambient 0.95 0.95 0.95 1
           diffuse 0.6 0.6 0.6 1
           specular 0.1 0.1 0.1 1
           texture_unit
           {
             texture myz_test_wings2.png
           }
         }
       }
    }
    
    Now we need to find the texture we need to edit. Get the mesh name from the item page, in my case it's wings2 so I'll just go to the game/media/items folder and search for wings2, right click the mesh file and hit Open File Location.
    You should be able to find the texture you need in the folder you're brought to.
    3.jpg

    In my case it's wings2wht.png so I right click that, copy it and paste it into my preset folder. Then I rename it to myz_test_wings2.png because that's what I put in my material file.

    Now you just need to edit the image to suit your needs and then check it out in-game.

    4.jpg

    Perfection.
     
    • Like Like x 1
    • Useful Useful x 1
Thread Status:
Not open for further replies.

Share This Page