Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
How to import obj with mtl materials propertly

okeoke
Registered User
Quote
2022-07-08 15:54:04

Hi,

Could you please tell if anyone knows the way to use obj with mtl material, i.e. no real image texture in the coppercube?

Probably, there is a way to generate a png palette from mtl somehow and use it as a texture? I guess, it should be possible somehow - at least, MagicaVoxel exports png palette along with obj and mtl. If add this palette as a node material the model looks textured in Coppercube.


just_in_case
Moderator
Quote
2022-07-08 17:44:20

sinply convert it to .dae and it wll be imported with vertex colors and with materials.... and I thunk that's what you are talking about.. if you want to use color pallete for your games. I can create a shader for you so that you can define the pallete index and that color from the pallete will be applied as a texture to the model...
Actually I did had created something like this in the past when I was trying to create the palllete swapping ( color swapping ) shader.....

I can create it again... once it will be created I will put it on neophyte.cf


okeoke
Registered User
Quote
2022-07-08 17:45:40

Ok, I figured out the workaround.

mtl file contains multiple materials imformation. Each of them has Kd property which I believe to be the base RGB color.

The idea is to create a 1x1px image with that color for each material. Then add these PNGs as material using irrEdit properties.

At least it works for the model I tested it with.

I've made a simple node js app which does that automatically. Please let me know if someone needs it - I'll add a readme and upload it somewhere.


okeoke
Registered User
Quote
2022-07-08 17:47:08

Thank you just_in_case.
Please only do that if only you have time:) - I've found a workaround which works for me.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact