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.

Materials Not Applying to Imported Objects

Materials Not Applying to Imported Objects

Postby gypsythief » 18 Oct 2014, 16:16

I am having trouble applying materials to imported objects. If I apply a pre-existing material from the Skyline Assets folder to an internally-generated shape, it appears just fine. If a apply it to an imported shape, the base colour of the material is applied and nothing else.

As an example:

Image

The cube on the left is an internally generated one, with the \Aurasoft\SkylineSDK\Asset Library\Materials\Ground n Floor\Grass_00.material applied, and is fine.

The center one was created in Blender, exported as Ogre XML, converted to Ogre mesh, imported to Skyline and has the same material applied.

The left one was created in Wings3d (in case there was a problem with Blender), saved as a Collada DAE and imported into Skyline, and again has the same material applied.

Any thoughts on what is going on? I've tried this many times with different file formats / projects / scenes and always get the same result.

Thanks for any help!
gypsythief
Skyline Novice
 
Posts: 4
Joined: 15 Oct 2014, 19:46

Re: Materials Not Applying to Imported Objects

Postby SolarPortal » 18 Oct 2014, 17:14

It looks like the UV data is not being stored n export from your app.
Try exporting as a .fbx.

Activate the misc mesh files filter and look for .fbx files in the asset manager, then drag them to the scene.
FBX is our latest import feature and supports 90% of models, it does not work from the RMB+import model option yet(WIP).

If there is any problems, then we will help fix them. :D
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: Materials Not Applying to Imported Objects

Postby gypsythief » 18 Oct 2014, 21:39

SolarPortal wrote:It looks like the UV data is not being stored n export from your app.


This was the problem. For Blender to export UV data, I had to specifically create a UV image map for the object in Blender (which I guess is sorta obvious when I think about it...)

The file format doesn't seem to matter too much, although I can't get bump mapping to work with any of them :(

Still, I can get objects in with textures (woohoo!), and I can live without bump mapping for now.

Thank you for your help :)
gypsythief
Skyline Novice
 
Posts: 4
Joined: 15 Oct 2014, 19:46

Re: Materials Not Applying to Imported Objects

Postby StarFire » 18 Oct 2014, 22:07

Good to hear you found the problem :)

Normal/bump mapping can be done from inside Skylines material editor. Make sure you first convert activate advanced mode on your material then you will be able to add the normal map. ;)
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Materials Not Applying to Imported Objects

Postby SolarPortal » 18 Oct 2014, 22:18

Another idea, if you are using an advanced material but normals still do not show. Then your mesh will likely need its tangents generated.
This can also be done inside skyline. "Main menu->Tools->Mesh->Generate tangents on selected entity".
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: Materials Not Applying to Imported Objects

Postby gypsythief » 23 Oct 2014, 17:45

Sorry for the long silence, I had a slight graphics card malfunction (although I'm not complaining; I'd been after a new one for a while!)

On the basis that the materials not showing was a Blender problem, and the fact that I was having the same symptoms with bump maps (i.e I could apply them to generated basic shapes but not imported shapes) I assumed that this was a Blender problem as well.

Much fiddling with options later I have managed to get things working, using the .fbx format. At the bottom of the exporter window was a little tick box for "Tangent Space". Ticking that did the trick, and my imported objects are now lovely and bumpy :D

Thanks for the help!
gypsythief
Skyline Novice
 
Posts: 4
Joined: 15 Oct 2014, 19:46

Re: Materials Not Applying to Imported Objects

Postby SolarPortal » 23 Oct 2014, 18:29

great np :P, if you have any other problems, then please ask for help.
Similarly, if you have any bugs or errors that show up. Please report them so we can fix them.
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


Return to Shaders n Materials

Who is online

Users browsing this forum: No registered users and 2 guests