PDA

View Full Version : How do you change the lens color of glasses?


donaldrack
12th Jan 2005, 02:53 PM
I don't know how and I know it's possible. :confused:

Numenor
13th Jan 2005, 04:26 PM
In order to change the color of the glass, you have to alter some parameters in the MATD, using SimPE. Take a look at the attached package (my intention was to create pink lenses, but actually they are red... :)).

To do the same do the following:

1) Open BodyShop, create parts, new project; export the glasses you want to recolour.
2) Reimport the glasses without changing anything: in Bodyshop you'll see a cloned copy of the original glasses.
3) Close BodyShop.
4) Into the SavedSim folder, find the newly created package and open it with SimPE.
5) You'll find many Material Definition files (MATD); some of them are related to the glass, other to the frame. You can spot the ones related to the glass because they *don't have* a texture (the texture is referenced in the "File List" tab).
6) In every MATD related to the glass, find the field "stdMatDiffCoef" and alter its values in order to change the class color. The syntax for the stdMatDiffCoef values is "Red_value,Green_valu,Blue_value" (each of them ranges from 0 to 1). For my reddish glass I've used the values 0.3,0.1,0.1.
7) Commit and save.

donaldrack
13th Jan 2005, 06:48 PM
When I load the project, the values reset.

XionValentine
13th Jan 2005, 07:11 PM
he said load the project straight away, then IMPORT it into the game without editing, and edit the package file in the SavedSims folder, not the project folder

donaldrack
13th Jan 2005, 09:26 PM
Oh.....

Numenor
13th Jan 2005, 10:01 PM
Exactly. I'm sorry if it seems difficult, but actually it's difficult... :)
Many experienced recolourers still don't know how to recolour glass and/or textureless objects.

elau
14th Jan 2005, 03:35 PM
Thank you so much for this guide.. It works :D

Numenor
14th Jan 2005, 03:40 PM
I'm glad to know, because... to tell the truth I haven't tested my glasses in-game (I only checked that they would show up in BodyShop). :p

donaldrack
14th Jan 2005, 07:51 PM
I got it to work.

mtgbass
15th Jan 2005, 12:48 AM
what values do you use to color the glasses black?

mtgbass
15th Jan 2005, 01:14 AM
I think I figured it out change stdMatalphablendmode from blend to none then change all the values of diffcoef to the same number 1 being the lightest and 0 beeng the darkest
it's hard to see through the lenses I don't know how to fix this

FoxieRoxieNYC
15th Jan 2005, 01:47 AM
Is it possible to do the same and make a pair that have mirror reflecting lenses?

mtgbass
15th Jan 2005, 01:55 AM
I'm not Sure, I think if you apply some of the properties from the mirrors to the lenses it might work but I really have no idea

Numenor
15th Jan 2005, 10:01 AM
MTGBASS:
Leave the alphamode to blend. I've PMed you with the suggestions to have "black" glasses. Maybe you should post here my message (I've lost it...).

FOXIE: I'm not sure if glasses can have a "mirror" surface (or at least I don't know how to do this).
In the MATD there is the "Reflectivity" parameter that changes the ability to reflect the ambience light (makes the object "glossy"). Try and experiment with it; I *think* that lower values mean more reflectivity.

FoxieRoxieNYC
15th Jan 2005, 11:22 AM
hmm yah I saw that value in the MATD, I'll check it out. I suspect though that there are some other values that need to be changed as well, I guess I'll play around and see what happens. I tried changing the reflectivity with that round/flat triangle topped night stand, but I upped it to 2.0 (it was originally .50 or something, I didnt see a change in the object, but the higher integer could be why. I'll play around and see what happens.

Thanks guys
grr

donaldrack
15th Jan 2005, 02:34 PM
http://www.maximumeyewear.com/productfolder/aviator-sunglasses/wildboyz-sunglasses/wildboyz.jpg

I'm trying to make those...

Bodyshop has something like those but the lenses are greenish. I want to make them dark tint, like a really dark brown, almost black. I also want to make them less transparent. Can you help me? I'm not sure how to get that color with the numbers. :bow:

Numenor
15th Jan 2005, 02:46 PM
You have to alter the stdMatDiffCoeff values in the MATD in order to have the right tint. To know the correct values corresponding to the colour you want, open any painting program and open its palette manager; choose the colour you like and look at the RGB values: e.g. if you choose a light red colour, the RGB will be something like 255, 127, 127.
Divide each value by 255 and you'll have the correct value for the MATD (in this case: 1,0.5,0.5).
For your case, a value of 0.39,0.19,0 should be fine.

In order to change the transparency, you have to lower the value in the stdMatUntexturedDiffAlpha field (usually, it's the last line in the MATD): the accepted values are from 1 (totally solid) to 0 (totally transparent = *invisible*).

And please, anybody: unless you have *personal* matters to discuss with me, post your questions on the forum; it's not a good thing to use PM for questions that may interest other users as well.

donaldrack
15th Jan 2005, 04:22 PM
Hey, do you know what part of the frame texture I need to modify for those black parts?

Numenor
15th Jan 2005, 05:57 PM
Donaldrack, I thought we were talking about the *glass* parts... I know nothing about the frame.
Anyway, I think that the frame has only one 3d mesh (not divided in subsets) and a very small texture spread all over it. In other words, I think it's not possible to recolour in black only the plastic terminations of the frame.

saramkirk
16th Jan 2005, 03:47 AM
numenor, I want to thank you for writing that tutorial! I was finally able to create some cute kids glasses.

If anyone wants to know the values for these, they are:

Yellow: 1,0.8,0
Green-yellow: 0.6,0.8,0.2
Magenta: 0.5,0,0.5

I used this page to find common RGB values, rather than use a paint program to look them up, which is rather time consuming: http://kb.indiana.edu/data/aetf.help

fireflies
17th Jan 2005, 09:52 AM
saramkirk, thank you for the tip on the yellow' i was stuck and thought i needed another number which made them mess up everytime :)

Numenor
17th Jan 2005, 07:53 PM
Saramkirk: very nice those glasses! :) And thank you for the link, it might be useful!

Syera
17th Jan 2005, 10:34 PM
Maybe there should be a tutorial for re-coloring the glass in the Tutorials section?

Dr Pixel
18th Jan 2005, 12:18 AM
I made some black ones by setting these

stdMatDiffCoef: 0,0,0 (the colour)

stdMatSpecCoef: 1.00,1.00,1.00 (this seems to be the reflectivity - not as in mirroring, but how much the light glances back off the lens)

stdMatAlphaMultiplier: 2.000000 (it comes at 1.000000, which is quite transparent grey - 2.000000 is pure black, in between would be semi-transparent)

I also set reflectivity: 1 - it didn't seem to do much, but I was able to see a slight reflection of BodyShop's red background at certain angles, maybe with a better video card it would make a difference.

I've attached them in case anyone wants to look at them as an example, or for furthur experiments. Feel free to do what you like with these.


I tried to get a mirror effect - but all I could come up with was a white/grey colour.

I think looking at the MATD from one of the in-game mirrors would be the way to go, but I don't know how to find that....

FoxieRoxieNYC
19th Jan 2005, 04:50 AM
Yah thanks dr. pixel... I cant seem to get the mirror thing to work even in the least bit, I wanted to add mirror textures to several other things, it's just not working, so I need to nix it for now, lol.

DigitalReality
19th Jan 2005, 07:10 AM
To those who don't know already....

MATDs are Shaders for different Materials (Material Descriptions)

A shader is a programmatic way to represent surface qualities like shininess, reflectivity, color, transparency, translucency, etc.

Specularity (Spec): Defines the "shininess" of the object.
Reflectivity: Defines how well the surroundings are reflected off of the material.
Transparency (alpha): How visible (transparent) the object is.
and so on.

Many of these options allow for a color too, like what color the specular highlights are, or what color the reflection will look like. Hope that helps.

DigitalReality
19th Jan 2005, 07:11 AM
Oh and diff is diffuse, or the spread of light on the surface of the object.

Numenor
19th Jan 2005, 08:14 AM
Thank you, DigitalReality, I was wandering what "spec" stood for... Now I know! :)
So, the specularity should be the ability to reflect the ambience light, while the reflectivity is the ability to reflect the sorrounding objects. Right?

Dr.Pixel: The "Reflectivity" parameter it's a strange setting... I've noticed that the most reflecting game objects have lower levels of Reflectivity (0.1, 0.05...).
And the stdMatAlphaMultiplier is a global multiplier that affect all the other parameters at the same time.

Syera: You are looking for a tutorial? Well, this thread is a tutorial, more or less :)

Dr Pixel
22nd Jan 2005, 04:17 PM
OK, I tried various settings of Reflectivity, but couldn't get a true mirroring.

But, I did stumble on this, which I call "simulated" mirrored glasses.

What I did was set

stdMatSpecCoef: 20,20,20

for all the ....lens elements in the MATD

This makes the glasses highly reflective, and they flash when the Sim turns their head as real mirrored glasses would.

NOTE: This only works for me if I have the Lighting in the game options set to Medium or High, if set to low the glasses always look like the plain version.

Anyway, I have included a .zip with a reflecting black pair, and a reflecting silver-grey pair. Feel free to experiment with these, maybe you could get real reflections working.

Drakron
22nd Jan 2005, 05:17 PM
Well I found a mirror and it have a MATD line that says.

stdMatEnvCubeMode:Reflection

So I decided to experiment with it but it does not work (even after I copy MATD values of a mirror) , I suspect the reflectivity is set on the mesh itself and I guess the best we can do is what Dr. Pixel already done.

KrAwLinG
22nd Jan 2005, 05:41 PM
OK, I tried various settings of Reflectivity, but couldn't get a true mirroring.

But, I did stumble on this, which I call "simulated" mirrored glasses.

What I did was set

stdMatSpecCoef: 20,20,20

for all the ....lens elements in the MATD

This makes the glasses highly reflective, and they flash when the Sim turns their head as real mirrored glasses would.

NOTE: This only works for me if I have the Lighting in the game options set to Medium or High, if set to low the glasses always look like the plain version.

Anyway, I have included a .zip with a reflecting black pair, and a reflecting silver-grey pair. Feel free to experiment with these, maybe you could get real reflections working.

OMFG Thank You Dude!
its great :D

FoxieRoxieNYC
23rd Jan 2005, 08:21 PM
oooh thank you thank you Dr. Pixel you rock, I'm going to work on some mirrored ones. I wonder if I can apply this to other objects as well... Gosh I swear btw objects and clothes and actual gameplay my free time is CONSUMED by Sims!

madbrit
29th Jan 2005, 12:03 AM
excellent work...any chance of green round male glasses...i still havent mastered SimPe (learning) but was working on a sim who needed them....
any help would be much appreciated

Icee07
27th Feb 2005, 01:29 AM
Well im trying to make the lens color 255, 140, 0 (dark orange) but im not very good with math.. can someone help me out with this?? :bump:

VcrewReigns8o8
4th Mar 2005, 09:24 AM
Well im trying to make the lens color 255, 140, 0 (dark orange) but im not very good with math.. can someone help me out with this?? :bump:

here....

1,0.5,0

IgnorantBliss
4th Mar 2005, 03:09 PM
Thanks for the tips, I just made my first recolors of glasses based on this tutorial :).

Mabelline
29th Apr 2005, 05:03 AM
Thx! Can we change the shape of glasses and the color of lens at the same time? How? Any tutorial?

I want several new sunglasses in my game . Anyone would like to make sunglasses for me? I will post the pictures here if you take my request.

gorre9090
30th Jun 2005, 11:41 PM
helppp i dont get this at all

IgnorantBliss
9th Jul 2005, 01:40 PM
This topic should really be turned into a tutorial, there is so much important information in it :).

morten8035
5th Jun 2006, 03:37 PM
In order to change the color of the glass, you have to alter some parameters in the MATD, using SimPE. Take a look at the attached package (my intention was to create pink lenses, but actually they are red... :)).

To do the same do the following:

1) Open BodyShop, create parts, new project; export the glasses you want to recolour.
2) Reimport the glasses without changing anything: in Bodyshop you'll see a cloned copy of the original glasses.
3) Close BodyShop.
4) Into the SavedSim folder, find the newly created package and open it with SimPE.
5) You'll find many Material Definition files (MATD); some of them are related to the glass, other to the frame. You can spot the ones related to the glass because they *don't have* a texture (the texture is referenced in the "File List" tab).
6) In every MATD related to the glass, find the field "stdMatDiffCoef" and alter its values in order to change the class color. The syntax for the stdMatDiffCoef values is "Red_value,Green_valu,Blue_value" (each of them ranges from 0 to 1). For my reddish glass I've used the values 0.3,0.1,0.1.
7) Commit and save.

it don't worked at me :(

it is a picture tutorial here at MTS2?

IgnorantBliss
5th Jun 2006, 05:05 PM
Did you edit the correct package file, morten8035? You have to make sure to edit the one in the Saved Sims folder, not the one in the Projects folder.

dmdvt
21st Jun 2006, 02:38 PM
In order to change the color of the glass, you have to alter some parameters in the MATD, using SimPE. Take a look at the attached package (my intention was to create pink lenses, but actually they are red... :)).

To do the same do the following:

1) Open BodyShop, create parts, new project; export the glasses you want to recolour.
2) Reimport the glasses without changing anything: in Bodyshop you'll see a cloned copy of the original glasses.
3) Close BodyShop.
4) Into the SavedSim folder, find the newly created package and open it with SimPE.
5) You'll find many Material Definition files (MATD); some of them are related to the glass, other to the frame. You can spot the ones related to the glass because they *don't have* a texture (the texture is referenced in the "File List" tab).
6) In every MATD related to the glass, find the field "stdMatDiffCoef" and alter its values in order to change the class color. The syntax for the stdMatDiffCoef values is "Red_value,Green_valu,Blue_value" (each of them ranges from 0 to 1). For my reddish glass I've used the values 0.3,0.1,0.1.
7) Commit and save.


Thank you for all the help.

With the new verison of SimPE when you find the "stdMatDiffCoef" field there is a drop down box for the colors. There is no need to know color values.

:up: Thanks again.

squall117
10th Jul 2006, 12:10 AM
Thaks a lot Numenor you're the best.
And right now it doesn't seem so hard... I just hope this doesn't change when I get there :D

IgnorantBliss
10th Jul 2006, 04:38 AM
With the new verison of SimPE when you find the "stdMatDiffCoef" field there is a drop down box for the colors. There is no need to know color values.

Just clarifying that the dropdown box will show up in the categorized properties tab, while the properties tab is the same as before :).

morten8035
13th Jul 2006, 08:49 PM
I did it :D
can som say codes other colors at glasses? (The numbers)

IgnorantBliss
14th Jul 2006, 04:42 AM
morten8035, if you go to the Categorized Properties tab in Material Definition and click on the line you want to edit, with the arrow in the end you get to choose the color from a pallet directly, no need to memorize codes.

morten8035
14th Jul 2006, 10:24 AM
I do not see any arrow :(
Have you a picture?
Edit: found it, thanks :D :

Playcokacola
12th Sep 2006, 07:45 PM
what is simsPE and how do you get it?

IgnorantBliss
13th Sep 2006, 04:08 AM
SimPE (http://sims.ambertation.de/) is a tool you can do a lot of things with, including creating objects or editing your sims.

LadyDess
9th Jan 2007, 08:26 PM
Was so easy to do it, so simple thanks to the explanation in this thread, I could never figure it out by myself lol

Here's a pic of my 1st recolor: violet-blue glasses :giggler: , you guys are the best
http://www3.hddweb.com/78660/VioletGlasses3.jpg

tipsygypsy
29th Mar 2007, 03:54 PM
Yayyyyy! I just wanted to say thank you for this tutorial. I finally get to play with the EA glasses frames I actually LIKE. I hate sunglasses on my Sims, so to have the chance to make recolors of these with clear lenses is great.


http://i151.photobucket.com/albums/s140/simgypsy/newglasses.jpg

NixNivis
17th Apr 2007, 06:59 PM
Thank you SO much for this tutorial! Now I can finally do something about those ridiculous pink and green lenses that ruin glasses that would be quite nice otherwise. :D

kaja8
1st May 2007, 06:21 AM
Numenor, thank you very much for this tutorial, my glasses with lens recolor now looks more better than an ordinary frame recolors!

MohicanTunes
11th May 2007, 11:04 PM
Thanks Numenor. I really needed this for my annoying GG Allin sim :)

coltraz
3rd Jun 2007, 02:05 AM
Is there anywhere I can learn to change the SHAPE of glasses?

Mimsy
29th Sep 2007, 01:57 AM
This is probably getting a little too complex for me, but I'm gonna ask it anyway; is there a way to put an image on a pair of glasses, kind of like holographic sunglasses you'd see in joke shops? Judging from what I've heard, I'm gonna assume not, but I thought I'd go ahead and put the question out there.

benofdoom
5th Nov 2007, 01:47 AM
Exactly. I'm sorry if it seems difficult, but actually it's difficult... :)
Many experienced recolourers still don't know how to recolour glass and/or textureless objects.
this was werry easy to mee now how do i poast my glasses on this website

moitjuh
5th Jan 2008, 09:04 PM
THANK U :!: :!: :!: :!: :!: :!: :!:
I like it!! :king: It's great! :mod: !!

cocoabutter669
4th Apr 2008, 09:54 PM
good tutorial, very easy to follow... and yay, it works LOL

talenzz
23rd Apr 2008, 01:20 PM
I love this tutorial, very helpful !

Dani12095
15th Apr 2009, 05:33 PM
Wow thanks a TON! That was actually easy for me to follow!
Great Tutorial!

Akati
27th May 2009, 11:50 AM
Thanks a lot, Numenor for this great explication.
It needed some time until the glasses were like I want them, but now, my sims can wear my self-made glasses with the coloured glasses.
Thanks :up:

OrangeHotaru
13th Jul 2009, 11:54 PM
Wow, I wish i had had this a few days ago when I was trying for hours just to make some tea-shades.

I succeeded, but I'm still having some trouble. Tea-shades are circular sunglasses such as John Lennon or Ozzie Osbourne style. I succeeded in changing the lenses, and I tried to make custom frames as well. (Gold and silver) I thought they turned out fine until I realized that the frames for adult and elder men were not gold and silver but bright yellow and white. After comparing, I noticed that in SimPE the Material Definitions for the women's and males child and younger were different from the adult and elder males'. In particular, women and boys had something called alphaRefValue that adult men did not have.

Teen males did not have alphaRefValue and their frames were the correct color. However, when teen males wear the glasses, the glasses morph and scew with the face so they are horribly misshapen.

Then I realized that I can't find the actual file for the original round glasses for men (because that is what mine are based on) and I'm wondering if I somehow deleted the original file, but I don't know how or when I could have done that.

Sorry for really long post and no screenshots. I hope I made sense. Advice?

mattphipps68
7th Jun 2010, 12:55 PM
http://www.maximumeyewear.com/productfolder/aviator-sunglasses/wildboyz-sunglasses/wildboyz.jpg

I'm trying to make those...

Bodyshop has something like those but the lenses are greenish. I want to make them dark tint, like a really dark brown, almost black. I also want to make them less transparent. Can you help me? I'm not sure how to get that color with the numbers. :bow:

I actually did some fiddling with the male aviator glasses with clear lenses to attempt the exact same thing. Take a look at what I did in SimPe :deal: and test them in game to see if you like the tweaks.

**cheers

postscript:

just remember that the changes have to be made to the MATD properties for <b>all</b>age levels. I changed the frames AND the lenses in the same sitting and therefore had to edit the properties in 6 MATD files (lenses in 3 ages + frames in 3 ages). Oi vey what a headache. :rolleyes:

oogabooga708106
21st Jun 2011, 10:18 PM
I cannot put into words how grateful I am for this! I've never used SimPE in my life and was still able to follow this tutorial and in turn was able to create a recolor. Thank you! ^^

telefen
15th Oct 2011, 12:35 AM
I garra say Numenor this is one great tutorial. I just made the coolest dark purple recolors of those maxis round glasses. They really look Hippie. Thanks for sharing your knowledge. Keep up the good work. Ariva derci. Grazzi multo.

Thijs
27th Nov 2011, 10:32 AM
Hmm I can't seem to get this to work..
I think I did everything the way you should do it.
I only changed the 'empty files' (where it's not filing the colour of the sunglasses itself for example, so not the glasses ofcourse)
the colours should be right because I used the drop down menu box thingy, and if I check again in SimPE they are all changed in the way I want them. but if I check bodyshop again they're still the same old..

Did I do something wrong or forgot a step?

BloomsBase
28th Nov 2011, 08:59 PM
Hmm I can't seem to get this to work..
I think I did everything the way you should do it.
I only changed the 'empty files' (where it's not filing the colour of the sunglasses itself for example, so not the glasses ofcourse)
the colours should be right because I used the drop down menu box thingy, and if I check again in SimPE they are all changed in the way I want them. but if I check bodyshop again they're still the same old..

Did I do something wrong or forgot a step?
Reclone them with bodyshop, check if the new clone is fixed.

mattphipps68
5th Feb 2012, 08:40 PM
This is probably getting a little too complex for me, but I'm gonna ask it anyway; is there a way to put an image on a pair of glasses, kind of like holographic sunglasses you'd see in joke shops? Judging from what I've heard, I'm gonna assume not, but I thought I'd go ahead and put the question out there.

I had to think about this for a while before I even "attempted" to answer.

I "think" you would have to either alter the existing alpha layer of the mesh or create a new one that you could recolor however you like. If I'm not mistaken, it should work in the same manner as a recolor of a clothing piece.

I've only done a few simple RC's of Maxis objects for my own use, so I'm not absolutely certain if holographics are possible.

fakepeeps7
6th Feb 2012, 03:45 AM
I had to think about this for a while before I even "attempted" to answer.

I "think" you would have to either alter the existing alpha layer of the mesh or create a new one that you could recolor however you like. If I'm not mistaken, it should work in the same manner as a recolor of a clothing piece.

I've only done a few simple RC's of Maxis objects for my own use, so I'm not absolutely certain if holographics are possible.

It's probably possible to put an image on glasses lenses if you change some settings in SimPE. But holographic images? Probably not.

I doubt it's that pressing an issue anyway, since the post you're responding to is over 4 years old... :) I'd like to see someone try this, though. It could have amusing results.

mattphipps68
6th Feb 2012, 01:48 PM
It's probably possible to put an image on glasses lenses if you change some settings in SimPE. But holographic images? Probably not.

I doubt it's that pressing an issue anyway, since the post you're responding to is over 4 years old... :) I'd like to see someone try this, though. It could have amusing results.

True enough - it is a very old post, but people still ask questions like this and I try to be as helpful as my limited knowledge permits.

I'm actually quite suprised that anyone even looks at this thread any more considering its age.

chokolady
19th Nov 2012, 03:53 PM
i can't seem to be able to change the black sims default to blue lenses, so frustrating, it seems I do it right... but no