cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

How to assing .mtl file color

hjarvela
4-Participant

How to assing .mtl file color

Hi,

 

I have would like to assign a spesific photolux color (adv-steel) for my .mtl file but the color won't show up in the model.

Here is the file that I'm trying to use

 

ND_RelParSet_K01 = {

Name = BFACJ

PARAMETERS =
{
  Name = PTC_MATERIAL_DESCRIPTION
  Type = String
  Default = 'BFACJ'
  Access = Full
},
{
  Name = TEMPERATURE
  Type = Real
  Default = 0.000000e+00 C
  Access = Full
},
{
  Name = PTC_INITIAL_BEND_Y_FACTOR
  Type = Real
  Default = 5.000000e-01
  Access = Full
},
{
  Name = PTC_BEND_TABLE
  Type = String
  Default = ''
  Access = Full
},
{
  Name = PTC_MATERIAL_TYPE
  Type = Integer
  Default = 9
  Access = Locked
},
{
  Name = PTC_FAILURE_CRITERION_TYPE
  Type = String
  Default = 'NONE'
  Access = Locked
},
{
  Name = PTC_FATIGUE_TYPE
  Type = String
  Default = 'NONE'
  Access = Locked
},
{
  Name = PTC_MATERIAL_SUB_TYPE
  Type = String
  Default = 'LINEAR'
  Access = Locked
},
{
  Name = PTC_MASS_DENSITY
  Type = Real
  Default = 0.285 lb/in^3
  Access = Full
},
{
  Name = PTC_POISSON_RATIO
  Type = Real
  Default = 3.300000e-01
  Access = Full
},
{
  Name = PTC_YOUNG_MODULUS
  Type = Real
  Default = 1.010000e+07 psi
  Access = Full
},
{
  Name = PTC_THERMAL_EXPANSION_COEF
  Type = Real
  Default = 1.310000e-05 /F
  Access = Full
},
{
  Name = PTC_DEFAULT_APPEARANCE
  Type = String
  Default = 'adv-steel'
  Access = Full
},
{
  Name = PTC_APPEARANCE_1
  Type = String
  Default = 'adv-steel'
  Access = Full
}

}

ACCEPTED SOLUTION

Accepted Solutions

Hi,

 

I followed below mentioned steps.

 

  • start CR3 M120
  • open heinopalikka.prt
  • remove all materials from the model
  • save model
  • exit CR3 M120

 

  • I do not have PRO_MATERIAL_DIR option defined in config.pro
  • CR3 M120 installation directory ... E:\PTC\Creo3_M120
  • I created bfacj.mtl file in E:\PTC\Creo3_M120\Creo 3.0\M120\Common Files\text\materials-library directory ... I copied its contents from your original post
  • I modified global.dmt file in E:\PTC\Creo3_M120\Creo 3.0\M120\Common Files\graphic-library\appearances directory ... I added adv-steel color at the end of file (55 lines copied from your global.dmt file)

 

 

  • start CR3 M120
  • open heinopalikka.prt
  • add and assign bfacj material
  • finished

adv-steel.png

 


Martin Hanák

View solution in original post

10 REPLIES 10

Hi,

 

insert the definition of adv-steel color into global.dmt file and ... you are done.


Martin Hanák
hjarvela
4-Participant
(To:MartinHanak)

I did exactly what you said but it's not working...

Hi,

 

please put into zip file your Creo part and global.dmt file and upload zip file using Browse button. I will check your data.


Martin Hanák
hjarvela
4-Participant
(To:MartinHanak)

 

Hi,

 

I followed below mentioned steps.

 

  • start CR3 M120
  • open heinopalikka.prt
  • remove all materials from the model
  • save model
  • exit CR3 M120

 

  • I do not have PRO_MATERIAL_DIR option defined in config.pro
  • CR3 M120 installation directory ... E:\PTC\Creo3_M120
  • I created bfacj.mtl file in E:\PTC\Creo3_M120\Creo 3.0\M120\Common Files\text\materials-library directory ... I copied its contents from your original post
  • I modified global.dmt file in E:\PTC\Creo3_M120\Creo 3.0\M120\Common Files\graphic-library\appearances directory ... I added adv-steel color at the end of file (55 lines copied from your global.dmt file)

 

 

  • start CR3 M120
  • open heinopalikka.prt
  • add and assign bfacj material
  • finished

adv-steel.png

 


Martin Hanák
hjarvela
4-Participant
(To:MartinHanak)

AWESOME!

My problem is solved.

I think that the problem occured beacuse I had not created bfacj.mtl file in E:\PTC\Creo3_M120\Creo 3.0\M120\Common Files\text\materials-library directory. Now all the colors are correct. This saved my day!

 

Thanks Martin! 

Hi Martin,

 

I know this is from over a year ago, but I am having trouble with the solution in this post.

I edited the .mtl file to include the  PTC_DEFAULT_APPEARANCE. I used one of the appearances that was already defined in our global.dmt.

 

It worked at first as I was assigning the material to new parts. But the next day when I started a new session, the appearance was overwritten to be white. When I go into the properties of the material and go to the appearance tab, the default appearance somehow got overwritten to be white.

 

So for example. There was a ptc_gold appearance in the golabl.dmt. I edited our .mtl file for our gold material so that the default appearance would be ptc_gold. So at first when I assign gold, the parts would be yellow. But the next day the parts would be white.

 

No idea why they are becoming white.

I am planning on creating a new community post for this problem.

BenLoosli
23-Emerald II
(To:otcunanan)

What version and build? You are the second person today to say there is an issues with assigning colors in the material files. It may be a bug in the build of Creo.

Creo 3.0, M110.

Won't make the change to Creo 4.0 for a few months.

 

Thanks

Hi,

 

I tested assigning .mtl file color inCreo 3.0, M110 with success.

 

In my E:\PTC\Creo3_M110\Creo 3.0\M110\Common Files\graphic-library\appearances\global.dmt file there is gold_ptc color. No ptc_gold color is present.

 

I attached bronze_mh.mtl file I used during testing.

 

If I changed color name in bronze_mh.mtl file to non-existing color name (I edited file in Notepad++), created new part and assigned material ... I get white colored model.


Martin Hanák
Announcements


Top Tags