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!
Quick Reply
Search this Thread
Forum Resident
#26 Old 10th Oct 2009 at 10:33 PM
Okay here is a mtlsrc from a window for comparison with the one Wes posted.

Code:
; decompiled with S3ModlD V0.20 - by Wesley Howe
MATD 0103
MtlName 0x920790DF
ShaderName GlassForPortals
MTNF 6
Diffuse 1 4 1.000000000000 1.000000000000 1.000000000000 1.000000000000
Shininess 1 1 20.000000000000
Specular 1 3 0.500000000000 0.500000000000 0.500000000000
FresnelOffset 1 1 1.000000000000
UVScales 1 3 0.000027790735 0.000000000000 0.000000000000
Transparency 1 1 1.000000000000


Maybe it's the "diffuse" line.
Wonder what FresnelOffset could be.....
Advertisement
Alchemist
#27 Old 11th Oct 2009 at 12:23 AM
Quote:
; decompiled with S3ModlD V0.20 - by Wesley Howe

Quote:
UVScales 1 3 0.000027790735 0.000000000000 0.000000000000

Version 1.00, the current, will fix the UVScales issue for you. The best values is the 0.000030518 (1/32767). V1.00 changes that automatically.

If you like to say what you think, be sure you know which to do first.
Forum Resident
#28 Old 11th Oct 2009 at 12:24 AM
Ah yes sorry, I know, I used the older one
Alchemist
#29 Old 11th Oct 2009 at 2:29 AM
I will post any experiments with the cube LemonCandy.

Wes...sigh...the only time you talk to me is when I'm going completely wrong...it makes a girl just want to have one mistake after another...lol.

OM
Alchemist
#30 Old 11th Oct 2009 at 2:38 AM
Girl gone wrong... where have I heard that before?

When she was good, she was very, very good... and when she was bad, she was marvelous.

If you like to say what you think, be sure you know which to do first.
Alchemist
#31 Old 11th Oct 2009 at 3:13 AM Last edited by orangemittens : 11th Oct 2009 at 6:09 PM. Reason: adding progress
Well...as long as you think me going wrong is marvelous we're off to a great start. It's a good bet I'll do so at some point no matter what I'm doing.

I think you always being right is marvelous so perhaps that seconds a great start. There are few things in the world that can beat a man who knows his way around the issue in question...one who arrives with the perfect quote as well?...well what can I say except "I do declare Mr. Howe"...remainder of sentence deleted before typed.

On a more thread-topic oriented note I have the glass data from the little daffodil vase:

; decompiled with S3ModlD V1.00 - by Wesley Howe
MATD 0103
MtlName 0x920790DF
ShaderName GlassForObjectsTranslucent
MTNF 12
UVScales 1 3 0.000030518509 0.000000000000 0.000000000000
EdgeDarkening 1 1 0.000000000000
NormalUVScale 1 2 1.000000000000 1.000000000000
RefractionDistortionScale 1 1 0.000000000000
NormalMapScale 1 1 1.000000000000
Shininess 1 1 20.000000000000
DiffuseUVScale 1 2 1.000000000000 1.000000000000
Specular 1 3 0.500000000000 0.500000000000 0.500000000000
SpecularUVScale 1 2 1.000000000000 1.000000000000
Diffuse 1 4 0.321782201529 0.321782201529 0.321782201529 0.141975298524
FresnelOffset 1 1 0.500000000000
Transparency 1 1 1.000000000000

I guess the question of the day (at least regarding glass) is which of these lines, if any, determines the color?

OM

I made two more cubes each with changes in the code to try to see what all these lines alter.

The first cube...the one on the left is just the plain car glass. The second one I changed the Specular to match that of the daffodil vase glass...it didn't seem to alter anything really. The third one I altered only the fresneloffset thing...that one I altered to match the same line in the fishbowl glass (which uses the same slider as the car glass). This had more of an effect although it is subtle and difficult to describe. It shows up best outdoors. This change also made the bottom ripple when you move around the object...as if two faces were smacked up against one another too closely. In any case, neither of these two fields alone seems to control color...my cube is the same foggy greyish color in both new versions.







Alchemist
#32 Old 11th Oct 2009 at 7:05 PM
One more try...this time I changed only the Diffuse and I changed it to match the settings of the fishbowl. This really changed things...it lightened the cube so much you can barely see it. I don't know if the fog tint went away because it is so transparent now or if this is an actual color change. The pic shows the fishbowl color for comparison.



OM
Forum Resident
#33 Old 11th Oct 2009 at 7:22 PM
Interesting experiment, thank you for the info.
So it looks like the diffuse controls the darkness of the glass, between values of 0 and 1 where 0 is darkgreyish and 1 is transparent.
The specular must be the reflectivity, but it won't show up well here because the difference between 0.500000000000 and 0.495049506426 is not much.
The FresnelOffset is mindboggling, I think it's kinda cool, it sounds like something scientific :D
Alchemist
#34 Old 11th Oct 2009 at 8:08 PM
From Wiki for what it's worth:

A Fresnel lens (pronounced /freɪˈnɛl/ fray-NELL) is a type of lens developed by French physicist Augustin-Jean Fresnel for lighthouses; a similar design had previously been proposed by Buffon and Condorcet as a way to make large burning lenses.

The design enables the construction of lenses of large aperture and short focal length without the weight and volume of material that would be required in conventional lens design. Compared to earlier lenses, the Fresnel lens is much thinner, thus passing more light and allowing lighthouses to be visible over much longer distances.

Maybe the FresnelOffset makes more light or less light pass through the object?

OM
Alchemist
#35 Old 12th Oct 2009 at 12:22 AM
Diffuse is the light that an object is illuminated with that comes from all angles... the light that sort of bounces around the room and keeps the shadow side of an object from being entirely black.

Here is a page explaning the fresnel effect. It has pictures, as the technical explanation is difficult, the effect simple:
http://www.robinwood.com/Catalog/Te...tionIndex1.html

If you like to say what you think, be sure you know which to do first.
Alchemist
#36 Old 12th Oct 2009 at 12:53 AM Last edited by orangemittens : 12th Oct 2009 at 1:04 AM.
Ouch...that page hurt Wes. About the only thing on it I understood was the part about Sweet Tea My brain is still trying to recover from all the rest.

What I would still like to know and am no more closer to finding out is whether it's going to be possible to change the color of glass in Sims 3. I would like to make some things with seafoam green glass but so far I can't guess how to do it.

I hope that if you answer it isn't with another punishing link. I prefer your quotes.

OM

Edited to add: Took another look at the page. "The "glancing angle" is the angle from the camera where the fresnel effects (an increase in reflection and decrease in transparency) begin to take effect"...so the Fresnel thing is sort of what is going to determine how much light passes through as opposed to bouncing off an object right?

I've always had a different idea about what a glancing angle is but I guess scientist types have a different focus...lol.

This part though, "Without going into a lot of math, the Brewster Angle for a material in air is just about the ArcTan of the Refraction Index. So, to figure it out, just use your Scientific Calculator, make sure you are working in degrees, enter the RI, and tap the ArcTan (tan -1) button..." shwew...if I'm going to figure something like that out I'm going to have to borrow someone's Scientific Calculator...mine is fresh out of calculator mathingy-jingies.
Alchemist
#37 Old 12th Oct 2009 at 3:42 AM
I chose the page because it had pictures. The only trouble is, it also had the thousand words to go with it.

I don't have a definitive answer, but when you look at the glass stereo, you can see the texture image has influenced the color of the glass. I would guess using single color images should tint the glass.

If you like to say what you think, be sure you know which to do first.
Forum Resident
#38 Old 12th Oct 2009 at 8:07 PM
Quote: Originally posted by WesHowe
I would guess using single color images should tint the glass.

I tried, but nope. It's something else.
Alchemist
#39 Old 13th Oct 2009 at 1:35 AM
Thanks for trying it and saving me from going through it LC (I hope an abbreviation is ok?)

When I look at the stereo pic it seems the same smoky grey that the cube was when I used the exact same code.

It would be quite sad if we can't have beautifully colored glass in Sims 3...but I don't see an object in the game that is both glass and colored except for the faux glass used on things like the perfume bottles.

I was very much hoping to come home today and create pale pink glass perfume bottles.

OM
Alchemist
#40 Old 13th Oct 2009 at 6:23 AM
I have been busy working on other Sims3 stuff, and just don't have the time to fool with this much... although it is the kind of thing I like to do... tweak something and see what happens.

Here is a line from OM's glass shader:
Quote:
Diffuse 1 4 0.321782201529 0.321782201529 0.321782201529 0.141975298524

Diffuse is the light that comes from everywhere, and is the color you see before any direct lighting is applied... so it is pretty much the base color. I am pretty sure that this is an RGBA float representation, so the first number is the amount of Red, with 1.0 corresponding to 255. Similarly with Green and Blue, and the final number is the Alpha value.

You will note that the Red, Green and Blue values are the same, about 0.32*255 each, or 82, 82, 82 with an Alpha value of 36. I would believe that twiddling this
line to be:
Quote:
Diffuse 1 4 1.0 0.0 0.0 0.141975298524

Will give you a red glass, about the same greyscale value but all Red. Note that the numbers do not need to be put back in with any trailing zeroes, they will get in there on their own.

Of course, making colors other than pure red is a matter of putting some other RGBA values... increasing the alpha should make the item less transparent. I think that mirrors the previous findings, but the tests that were done before probably had all three of the color values the same, which will always be gray (or grey if you're from across the pond).

Similarly with Specular values (although there is no alpha for that). You have to change the overall mix between the RGB values to get a color, and the sum of the three will be a relative brightness level (I am not sure this is linear on a computer screen, it is not on a TV screen).

<* Wes *>

If you like to say what you think, be sure you know which to do first.
Forum Resident
#41 Old 13th Oct 2009 at 10:01 AM Last edited by lemoncandy : 13th Oct 2009 at 10:53 AM.
Oh of course! It's RGB values, why didn't I think of that? Thank you Wes, you're a genius (as always) Now we can cook up any kind of glass color for our objects Just need to learn what number means what number o_O
I'm never sure how to spell gray/grey btw (I'm from Hungary)..

EDIT: Wheeeheee!!!
(values are: Diffuse 1 4 0.08627 0.68235 0.45098 0.183950597048)
Test Subject
#42 Old 13th Oct 2009 at 11:12 AM
Bravo!!! Bravissimo!
Now, could you write in details how to do this beautiful thing? It would be so nice...

anouschka
Alchemist
#43 Old 13th Oct 2009 at 11:40 AM
Subtly pink perfumes:



I would like to pump up the intensity of the color...perhaps with the fresneloffset? Or by turning down the diffuse? This object was made using the daffodil glass and changing the RGB to 1, .75, and .79.

I got ballpark numbers for where to go with the values from this color chart here and doing the simple math to convert to Sims 3 type numbers:

http://cloford.com/resources/colours/500col.htm

I don't think we need to rebuild the entire wheel on the tinkering with color score...the numbers for named colors are out there.

Thank you once again Wes...this is perfect

Anouschka, unless LC beats me to it I can create a very easy tutorial with pics for this move...it is so much easier than creating glass in Sims 2 was. Using this to create objects that look good is going to be another story...lol.

OM
Alchemist
#44 Old 13th Oct 2009 at 12:05 PM Last edited by orangemittens : 13th Oct 2009 at 1:12 PM.
Sorry for the double post. But I wanted to show that taking numbers from that chart I posted allows you to adjust to the exact right shade you want.

I wanted a more intense pink, so I moved further down the chart and selected a less subtle one. Changed the numbers and got something more like what I wanted:



Numbers set at R: 1 G: .078 B: .57 and alpha with .14 changed to .20

A much more visible pink resulted.

OM

Edited to add: Of course to have objects with a mix of glass and solid parts it appears we will have to use clones of objects that already have these two groups built in right? We aren't going to be able to add glass parts to things that don't already have them unless we want the entire object to be glass.
Alchemist
#45 Old 13th Oct 2009 at 1:18 PM
Yes, you will need a two group object, three if you want glass, metal and plastic.

If you like to say what you think, be sure you know which to do first.
Test Subject
#46 Old 13th Oct 2009 at 1:20 PM
Bravissimo to you too!!
it's very beautiful these transparent pink bottles.
I wish learn it too, and it'd better with a tut when you've time. Anyway you have to check if someone else dosn't do it yet, in order to not wasting time.

keep learning and creating.
Alchemist
#47 Old 13th Oct 2009 at 1:30 PM
I have started writing a tutorial Anouschka...I just need to take pictures for it.

Wes, most things have two groups but one of those groups is the shadow. So the objects we would need in order to have glass/solid parts would be three group objects...right? Objects like the coffee table with glass in it already?...or am I mistaken? Even if we could exploit the shadow group utilizing it for a glass group would leave our item sans shadow wouldn't it?

OM
Field Researcher
#48 Old 13th Oct 2009 at 2:48 PM
I am confused about wether we need to change the material definition in all the MLOD and the MODL...
I changed it on the first MLOD on my horse, and I had the same result as OM at first : the horse was invisible, but I saw it's shadow...
Inventor
#49 Old 13th Oct 2009 at 3:10 PM
Shht Hazuitokage, Orangemittens is going to make a tutorial for us about it. Patience, please, those things take time, especially the pictures!
Maybe you can write down for us, what you did to change the slots/ placements for your objects?
It sure will be interesting to know what you found, to be able to place more birds on a surface?
You know, while you are waiting? Please
Field Researcher
#50 Old 13th Oct 2009 at 3:27 PM
lol, Cocomama, I actually didn't succed, which is why I didn't speak about it further ^^. I'm currently trying to reclone those object on the same one as the horse, elephant and giraffes, so they have more placement options. That's the only way i can think of, for the moment.

PS : They were cloned on the small topiary sculpture, which apears to have more placement options than the cowplant sculpture.
Page 2 of 3
Back to top