Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Test Subject
Original Poster
#1 Old 12th Jan 2005 at 2:53 PM
Default How do you change the lens color of glasses?
I don't know how and I know it's possible. :confused:
Advertisement
The ModFather
retired moderator
#2 Old 13th Jan 2005 at 4: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.
Attached files:
File Type: zip  81b10089_PinkLenses.zip (3.0 KB, 536 downloads) - View custom content

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Test Subject
Original Poster
#3 Old 13th Jan 2005 at 6:48 PM
When I load the project, the values reset.
Test Subject
#4 Old 13th Jan 2005 at 7: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
Test Subject
Original Poster
#5 Old 13th Jan 2005 at 9:26 PM
Oh.....
The ModFather
retired moderator
#6 Old 13th Jan 2005 at 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.
Lab Assistant
#7 Old 14th Jan 2005 at 3:35 PM
Thank you so much for this guide.. It works :D
The ModFather
retired moderator
#8 Old 14th Jan 2005 at 3: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
Test Subject
Original Poster
#9 Old 14th Jan 2005 at 7:51 PM
I got it to work.
Test Subject
#10 Old 15th Jan 2005 at 12:48 AM
what values do you use to color the glasses black?
Test Subject
#11 Old 15th Jan 2005 at 1: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
Lab Assistant
#12 Old 15th Jan 2005 at 1:47 AM
Is it possible to do the same and make a pair that have mirror reflecting lenses?
Test Subject
#13 Old 15th Jan 2005 at 1: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
The ModFather
retired moderator
#14 Old 15th Jan 2005 at 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.
Lab Assistant
#15 Old 15th Jan 2005 at 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
Test Subject
Original Poster
#16 Old 15th Jan 2005 at 2:34 PM


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:
The ModFather
retired moderator
#17 Old 15th Jan 2005 at 2:46 PM Last edited by numenor : 15th Jan 2005 at 2:58 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.

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Test Subject
Original Poster
#18 Old 15th Jan 2005 at 4:22 PM
Hey, do you know what part of the frame texture I need to modify for those black parts?
The ModFather
retired moderator
#19 Old 15th Jan 2005 at 5: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.
Lab Assistant
#20 Old 16th Jan 2005 at 3: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
Screenshots
Field Researcher
#21 Old 17th Jan 2005 at 9: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
The ModFather
retired moderator
#22 Old 17th Jan 2005 at 7:53 PM
Saramkirk: very nice those glasses! And thank you for the link, it might be useful!
Lab Assistant
#23 Old 17th Jan 2005 at 10:34 PM
Maybe there should be a tutorial for re-coloring the glass in the Tutorials section?
Scholar
#24 Old 18th Jan 2005 at 12:18 AM Last edited by Dr Pixel : 18th Jan 2005 at 12:22 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....
Attached files:
File Type: zip  BlackSpecs.zip (3.1 KB, 153 downloads) - View custom content
Lab Assistant
#25 Old 19th Jan 2005 at 4: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.
Page 1 of 3
Back to top