- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Meshing >
- Glass
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Meshing >
- Glass
Posts: 683
Thanks: 59411 in 42 Posts
; 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.....
Posts: 2,832
Thanks: 6613 in 20 Posts
; decompiled with S3ModlD V0.20 - by Wesley Howe |
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.
Posts: 683
Thanks: 59411 in 42 Posts
Posts: 2,932
Thanks: 15574 in 28 Posts
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
Posts: 2,832
Thanks: 6613 in 20 Posts
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.
Posts: 2,932
Thanks: 15574 in 28 Posts
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.
Posts: 2,932
Thanks: 15574 in 28 Posts
OM
Posts: 683
Thanks: 59411 in 42 Posts
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
Posts: 2,932
Thanks: 15574 in 28 Posts
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
Posts: 2,832
Thanks: 6613 in 20 Posts
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.
Posts: 2,932
Thanks: 15574 in 28 Posts
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.
Posts: 2,832
Thanks: 6613 in 20 Posts
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.
Posts: 683
Thanks: 59411 in 42 Posts
I would guess using single color images should tint the glass. |
I tried, but nope. It's something else.
Posts: 2,932
Thanks: 15574 in 28 Posts
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
Posts: 2,832
Thanks: 6613 in 20 Posts
Here is a line from OM's glass shader:
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:
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.
Posts: 683
Thanks: 59411 in 42 Posts
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)
Posts: 44
Now, could you write in details how to do this beautiful thing? It would be so nice...
anouschka
Posts: 2,932
Thanks: 15574 in 28 Posts
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
Posts: 2,932
Thanks: 15574 in 28 Posts
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.
Posts: 2,832
Thanks: 6613 in 20 Posts
If you like to say what you think, be sure you know which to do first.
Posts: 44
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.
Posts: 2,932
Thanks: 15574 in 28 Posts
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
Posts: 291
Thanks: 11531 in 41 Posts
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...
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
Posts: 291
Thanks: 11531 in 41 Posts
PS : They were cloned on the small topiary sculpture, which apears to have more placement options than the cowplant sculpture.
Who Posted
|