As the venture in the realm of Shaders and materials you may encounter the odd obstacle. Please post your shader issue for the community to help.

One Material for different Models/Meshes?

One Material for different Models/Meshes?

Postby nomis3D » 06 Mar 2015, 10:23

Hi,
i like to make some of my models ready for Skyline Asset Store.
But i have a problem with the materials.
I have a model with LODs. But every LOD has his own Material.
But this is not necessary. Because the LODs uses all the same Textures.
How i can apply a single Material to all of my LODs?
I tried to Drag and Drop them but it gets an Texture error...
Thanks for your help!
nomis3D
Skyline Novice
 
Posts: 4
Joined: 02 Feb 2015, 20:43
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer
Skill: Great creative
Skill: Animator

Re: One Material for different Models/Meshes?

Postby SolarPortal » 06 Mar 2015, 10:44

There is a way, but it is a little complex compared to the rest of skyline and the mesh editing controls have not yet been implemented fully.

However try using this set of instructions:

  • Open explorer and locate your .mesh files on your hard drive.
  • Open another explorer which is in the "Win32_Release" Directory of skyline.
  • Now drag the first .mesh onto the "Ogre XML Converter.exe"
  • This will convert the "MyMesh.mesh" format into a "MyMesh.mesh.xml" readable format in the same folder.
  • Open the file and look for <submesh material="YourMaterialName".
  • Change the "YourMaterialName" to a new material name <submesh material="NewMatName" or a name of a material you already have in the resource list.
  • Find all occurrences of "material" and change them to the desired names.
  • Save the .xml file.
  • Drag the .mesh.xml file back onto the "Ogre XML Converter.exe" and it will convert it back into the .mesh file (Always make sure to back your original .mesh up).
  • Reload skyline and load the mesh, it should be referencing the new material name.
  • Do the same steps across all lod meshes and you should be good to go

We are planning on making this a lot easier and building it into the mesh editor itself. :D

Let us know how it goes.
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: One Material for different Models/Meshes?

Postby nomis3D » 06 Mar 2015, 10:56

Thanks! i will test it later. Will give you feedback.
nomis3D
Skyline Novice
 
Posts: 4
Joined: 02 Feb 2015, 20:43
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer
Skill: Great creative
Skill: Animator


Return to Shaders n Materials

Who is online

Users browsing this forum: No registered users and 3 guests

cron