Author Topic: .MTL file  (Read 9148 times)

2019-04-23, 18:08:26

M_SON

  • Active Users
  • **
  • Posts: 42
    • View Profile
Hi guys,
I have an object only with .mtl file and I really don't know how to make it work, I tried with user paths, import but doesn't work. How should I use this .mtl file?
Thank you!

2019-04-23, 19:04:30
Reply #1

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9299
  • Let's move this topic, shall we?
    • View Profile
    • My Models
MTL is just a text file that defines most basic parameters of object's materials. It is completely useless on its own and only make sense when there's accompanying OBJ file.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2019-04-23, 20:03:31
Reply #2

M_SON

  • Active Users
  • **
  • Posts: 42
    • View Profile
MTL is just a text file that defines most basic parameters of object's materials. It is completely useless on its own and only make sense when there's accompanying OBJ file.

but I have that object file, still doesn't work. I imported that file but useless.

2019-04-23, 20:09:22
Reply #3

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9299
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Make sure that import materials is checked in import dialog. That should import object with standard material(-s) applied and textures assigned if such exist. You can open MTL file in notepad and see what it is written there, sometimes it contains no useful information, just a software name in which it was created :]
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2019-04-23, 20:18:53
Reply #4

M_SON

  • Active Users
  • **
  • Posts: 42
    • View Profile
Make sure that import materials is checked in import dialog. That should import object with standard material(-s) applied and textures assigned if such exist. You can open MTL file in notepad and see what it is written there, sometimes it contains no useful information, just a software name in which it was created :]

It was checked import materials, this is the .mtl file in notepad, but I don't have a clue if just useless text or not


2019-04-23, 21:37:30
Reply #5

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9299
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Materials are there, so you should have an object with standard materials assigned after import. What do you get? An object without any material? Does 3ds max shows warning about missing MTL file on import?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2019-04-24, 08:35:36
Reply #6

Njen

  • Active Users
  • **
  • Posts: 557
    • View Profile
    • Cyan Eyed
That's a pretty simple material file, and you could recreate those materials in just a few minutes. In fact it's so simple, you don't even need it, as you will want to use Corona materials anyway, instead of standard Max materials. But if you did want to recreate it, there are really only a few lines you need to care about:

'Ka' is 'constant ambient', which is the ambient colour of a standard Max material (in linear float format).
'Kd' is 'constant diffuse', which is the diffuse colour of a standard Max material (in linear float format).
'Ks' is 'constant specular', which is the specular colour of a standard Max material (in linear float format).

All you need to do is find a simple calculator to convert linear float numbers into sRGB integer numbers, there are plenty online. Takes me back to my Renderman shader writing days, where I would code shader files in a text editor.

2019-04-24, 10:20:20
Reply #7

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9299
  • Let's move this topic, shall we?
    • View Profile
    • My Models
You don't even need a calculator, just use Corona colour picker.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures