[2.1] Simple Unlit JSON material

Problems building or running the engine, queries about how to use features etc.
Post Reply
mrmclovin
Goblin
Posts: 273
Joined: Sun May 11, 2008 9:27 pm
x 3

[2.1] Simple Unlit JSON material

Post by mrmclovin » Mon Feb 12, 2018 12:07 am

Hello,

I'm fighting with Unlit materials. I'm trying to show a simple texture on a flat mesh.

Code: Select all

{
  "unlit": {
    "test_material": {
      "diffuse": {
        "value" : [1, 1, 1],
        "texture" : "10points.png"
      }
    }
  }
}
But all I get is a blank material.
Image

From the log I can see that my *.material.json file is parsed and it does not complain about a missing material name.

Is there anything wrong with my JSON definition?

(using a fresh pull from the OgreCAVE git repo tonight)
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3610
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 93
Contact:

Re: [2.1] Simple Unlit JSON material

Post by dark_sylinc » Mon Feb 12, 2018 3:33 am

I think it should be "diffuse_map0", not "diffuse".

Cheers
0 x

mrmclovin
Goblin
Posts: 273
Joined: Sun May 11, 2008 9:27 pm
x 3

Re: [2.1] Simple Unlit JSON material

Post by mrmclovin » Tue Feb 13, 2018 9:18 am

dark_sylinc wrote:
Mon Feb 12, 2018 3:33 am
I think it should be "diffuse_map0", not "diffuse".

Cheers
That was it. Thank you!

I was trying "diffuse_map0" in my classic .material script. Do JSON and classic .material not support the same attributes?
0 x

Post Reply