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!
Administrator of Loverat's Tea and Underpants
#51 Old 13th Jan 2005 at 6:47 PM
Numenor,

"On the other hand, if we set the stdMatAlphaBlendMode to blend, the game seems not to apply the Alpha channel to the texture, but applies the general blending factors (set in the MATD itself) to the whole texture."

What???? :D

stdMatAlphaTestEnabled=1 has confused me a lot. How different objects will and won't take transparency or different types of transparency has confused me a lot.

Eeek.
RG
Advertisement
Administrator of Loverat's Tea and Underpants
#52 Old 13th Jan 2005 at 6:53 PM
stdMatAlphaTestEnabled=1 doesn't seem to work if the blend mode is "none". It has to be 0 in that case. If you want to use binary alpha (no shades of grey), then blend mode would be "blend" and stdMatAlphaTestEnabled would be 0.

That is what I *think* I know. Does it sound true?

RG
The ModFather
retired moderator
Original Poster
#53 Old 13th Jan 2005 at 9:51 PM
The first thing I have tried with the door was to load an alpha mask into the texture ("grey" alpha, not simple binary) and set the Alpha mode to blend and something strange happened: Looking from inside the house, I could only see the inner face of the outer side of the door (can't explain better, I fear); the inner side of the door was completely transparent.

I guess that either we haven't understood enough all the parameters of the MATD (and of course we haven't...), or those parameters are applied in a different way for different objects.
I only know that *for this door* the blend mode must be set to "none".
I'm attaching the package.

But I'm sure you are right for other objects; so we have "just" to discover why it happens
Attached files:
File Type: zip  Numenor(MTS2)_OldYankeeDoor_Glass2.zip (116.7 KB, 45 downloads) - View custom content
Lab Assistant
#54 Old 13th Jan 2005 at 10:20 PM
That is exactly what I meant Numenor about being able to see the frame blending from the other side!

I tried doing the doors your way...leaving the blend mode at "none" & changing the "stdMatAlphaTestEnabled" to 1. I found out that only shades of grey #808080 or darker on the alpha gave me the transparency effect. Anything lighter was opaque. See here:



The one on the left is set to #959595 while the one on the right is #808080. What was your grey shade for your door?

RG...I forgot about having 2 overrides! The funny thing is I placed this new door & saved the game. When I went back in, it was still there & I tried it on a diagonal wall as well. Do I need to do the second override for something else? And if I do, where do I get it from?

-B
Administrator of Loverat's Tea and Underpants
#55 Old 13th Jan 2005 at 10:22 PM
The normals are bing inverted... it's the same thing that happens on the cheap shower. I can't understand it at all. It's just something I've seen on other 3D models. It's like you're looking at the object inside out, sort of. Hard to describe.

When you set the blend mode to "none" though, you only have the binary transparency, correct? I have never been able to get full transparency with that setting (which is where I came to a dead end with the floor tiles as well).

RG
Administrator of Loverat's Tea and Underpants
#56 Old 13th Jan 2005 at 10:24 PM
I'm not sure. Maybe not all the doors need 2 overrides? They do have different GUIDs. I was just basing it on the clone I made of the other door that you sent me, which had 2 overrides for each color of each part.

RG
Administrator of Loverat's Tea and Underpants
#57 Old 13th Jan 2005 at 10:31 PM
Numenor,

Have we informed Quaxi yet of the error in the way the MATDs are being built? For the links to the TXTR, it's leaving the hash off. We've determined before that this makes retextures unstable, and I'm concerned that a lot of people are making a lot of recolors this way.

RG
One horse disagreer of the Apocalypse
#58 Old 13th Jan 2005 at 10:38 PM
I think Quaxi is still on holiday?
The ModFather
retired moderator
Original Poster
#59 Old 14th Jan 2005 at 5:28 AM
HoneyB, my alpha had a gray at 0x65/65/65.
So, there's a threshold at 0x80.... So, RG and I were both right, after all: the transparency is set by the texture's alpha channel, but *it's* a binary alpha, not a shaded one...
This means that the glass part of the door actually... it's a hole! We can't add color, brightness or (that's bad) reflectivity to it.
This explains why in the original doors the glass part always have a separate mesh and subset: in this way a "real" transparency can be applied over the whole mesh, in blend mode.
Administrator of Loverat's Tea and Underpants
#60 Old 14th Jan 2005 at 5:47 AM
numenor, how did you find the threashhold? and is there a chance we can change it?

It's strange because this affects only some parts of some objects.

RG
The ModFather
retired moderator
Original Poster
#61 Old 14th Jan 2005 at 5:58 AM
HoneyB has found that threshold... Haven't I understood well her post?
Any value more "white" then 0x80/80/80 makes the texture look solid, while any lower level makes it look fully transparent.
Administrator of Loverat's Tea and Underpants
#62 Old 14th Jan 2005 at 6:45 AM
Nope you unserstood it right. I missed it.

Now that's using blend mode = "none" and we can change that threashhold. That's the one I was talking about before. We normally see stdMatAlphaRefValue=127 ... when we change that, we change the threshhold. But I misunderstood it before, I think. Now I believe it has no effect if blend mode = "blend".

Did you try "additiveblend"? it makes the object look like the ghosts. :D

RG
The ModFather
retired moderator
Original Poster
#63 Old 14th Jan 2005 at 10:00 AM
Quote: Originally posted by RGiles
We normally see stdMatAlphaRefValue=127 ... when we change that, we change the threshhold. But I misunderstood it before, I think. Now I believe it has no effect if blend mode = "blend".

Did you try "additiveblend"? it makes the object look like the ghosts. :D

RG


Yes, my tests lead to the same conclusion about the stdMatAlphaRefValue being the threshold value for the Alpha channel.

I haven't tried the additiveblend mode, yet. Seems interesting but... what use can we do with it? Maybe it *was* created to render the ghosts, after all...!

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.
Administrator of Loverat's Tea and Underpants
#64 Old 14th Jan 2005 at 10:02 AM
It may very well have no use but the ghosts... well, lightbulbs would work. Funky disco decoratives, maybe. But it's not terribly useful.

RG
Test Subject
#65 Old 14th Jan 2005 at 5:09 PM
Additive looks like an object does when it is not placeable - like if you try to place a painting anywhere besides a wall. I compared an addititve object with one that was unplaceable and they looked the same. Just an observation.
The ModFather
retired moderator
Original Poster
#66 Old 14th Jan 2005 at 5:53 PM Last edited by numenor : 14th Jan 2005 at 5:57 PM.
And the additiveblend mode seems like when you hover the pointer over an object while in Design mode (the objects "lits up" and become transparent).
Maybe these alpha modes were actually created as "service" modes to be used only in the UI...
But I trust the great inventive of our modders/recolourers

EDIT:
I was almost forgetting again: RG, what a little cute Avatar! Finally... I coudn't stand any more your lacking of an avatar: now I can spot your posts much easier! :D
The ModFather
retired moderator
Original Poster
#67 Old 27th Jan 2005 at 5:50 PM Last edited by numenor : 27th Jan 2005 at 5:54 PM.
Well, it's time to say something more about the MATD...

Relations between Alpha Channel and Blend Mode

As you know, the Alpha Channel embedded into the texture tweaks the transparency of the texture itself: the more "black" the Alpha is, the more transparent the texture will look.

But the texture itself is affected by the stdMatDiffCoeff and the stdMatEmissiveCoef MATD values.
Actually, the texture act like an "Alpha" image, regarding those values: the more "white" the texture is, the more visible will be the effect of the "Diff" and "Emissive" coefficients.

To make it clear, let's take a look at the attached images: the first depict a test texture, and the second is the associated alpha channel; when combined, the texture will look like in picture 3.
Let's apply this texture to a window.
If we set the DiffCoeff to 1,0,1 (purple) and the EmissiveCoeff to 1,1,1 (white), we'll have the result depicted in picture 4.
As you can see, on the right of the window the glass is fully transparent (because the Alpha channel is plain black); on the left site there is no transparency at all, and the effects of the MATD coefficients are visible.
In particular, going from the upper to the lower part, the MATD coefficients show more and more their effect, as the colour of the texture goes from black to white.
In picture 5 there is the same glass, but with the Alpha channel stripped off; it shows clearly how the MATD coefficients modify the appearance of the glass: no effect at all in the upper part (texture black) and full effect in the lower part (texture white).
Screenshots

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
#68 Old 28th Jan 2005 at 2:20 PM
Ok, since all input is welcome...here is a little from someone with the lowest level of knowledge. However, my problem was with the shiny things dishwasher...not with glass or transparency. I made counters and decided to add matching appliances using the same texture and adjustments. As you can see in the first pic...the trash compactor blends perfectly. I then recolor the shiny dishwasher in the same manner and get the dishwasher shown in the second pic. I did everything...darken, etc, but always got the same results. After reading this thread, I changed several values in the matd editor for the dishwasher using the compactor matd properties as a guide. (Here are the values changed: reflectivity, stdMatAlphaBlendMode, stdMatEnvCubeCoef,stdMatEnvCubeMode, stdMatSpecCoef,stdMatSpecPower) After doing this, as you can see in the third pic, the dishwasher to the far right now matches the compactor. Of course, as a beginner, I'm really not sure if changing all files was necessary, or if maybe just 1 or 2 would have done the trick. Anyway, I thought this might be of some help to someone. Thank you, numenor, for starting these types of threads, and to all of those who contribute as well. It is very helpful for beginners like me.
Screenshots
Administrator of Loverat's Tea and Underpants
#69 Old 28th Jan 2005 at 2:23 PM
Very nice work. Changing them all was probably good, because some small difference still might have been noticable.

RG
Test Subject
#70 Old 28th Jan 2005 at 2:31 PM
Thank you...now on to the elegant chef gas range...I'm having similar problems with it. Thanks again for your help.
Lab Assistant
#71 Old 4th Feb 2005 at 11:45 AM
I'm trying to make a genetic skin translucent. I've had some success so far but I can't get it to look quite right. Can anyone recommend settings which will make a skin texture translucent while keeping its current colour?

"Y'know, you guys are so unhip it's a wonder your bums don't fall off." ~Zaphod Beeblebrox
The ModFather
retired moderator
Original Poster
#72 Old 4th Feb 2005 at 3:24 PM
Try lowering the "stdMatUntexturedDiffAlpha" parameter (usually, it's the last line) to a value less that 1.
If you notice no effect, set the "stdMatAlphaBlendMode" to "blend".
Lab Assistant
#73 Old 4th Feb 2005 at 6:48 PM
Quote: Originally posted by numenor
Try lowering the "stdMatUntexturedDiffAlpha" parameter (usually, it's the last line) to a value less that 1.
If you notice no effect, set the "stdMatAlphaBlendMode" to "blend".


Unfortunately that was one of the first things I tried. It seems that 'blend' mode doesn't behave the same for skins as it does for other materials (unless there's some setting I'm missing). Using blend has the weird effect of making the parts of the body which should be hidden show through e.g. if I turn the sim sideways the foot which is furthest away - and should therefore be hidden by the closer foot - shows through, overlaid onto the closest foot. The additive mode does have better results, in that it is properly translucent, but it looks too bright for my purposes.

First pic is of 'blend' mode, the second is 'additive' mode.
Screenshots

"Y'know, you guys are so unhip it's a wonder your bums don't fall off." ~Zaphod Beeblebrox
The ModFather
retired moderator
Original Poster
#74 Old 4th Feb 2005 at 7:19 PM
I'm sorry, seems that complex textures like this behave in a different way compared to objects ones...
Forum Resident
#75 Old 17th Feb 2005 at 12:31 PM Last edited by xanathon : 17th Feb 2005 at 3:44 PM.
There's something I am misssing completely regarding transparent materials or so it seems. I was able to manage when building my objects, I even was able to include new MATD files in those and link correctly to them.
But now I try to do something with transparency and though I have read a lot of posts regarding that topic (and others, as about the RCOL chain) I wasn't able to get a submesh transparent, they all appeared flashing blue, as if I was not pointing to a valid MATD in the SHPE data.

I tried making an existing texture transparent by setting the stdMatAlphaBlendMode to blend. (Question: Do or don't I need an alphachannel for this to work? I got that never really clear) In all my tries you could always only see the texture as defined in the TXTR file or the dreaded blue flashing object.

(EDIT: I figured this one out. My problem was, that the needed alphachannel is named layer mask (ebenenmaske) in the germen version of photoshop and an alphachannel is something different. I should have thought of that, since I had a similar problem in a videoeditor. Textureeffects tweaking the MATD are now in the works... :o)

I also tried to import an existing glass, for example that from the microwave oven, and to tweak the settings and names and then to point the submesh in the SHPE file to that, but always to the same effect: flashing blue object.

Maybe Someone would be so kind as to take a look at the attached object, were I tried the latter.

After two days of pointless experimenting I am a little frustrated (okay, I caught a bad cold and so my thinking is a little impaired atm, maybe this is the cause for my dumbness :o). Maybe I am missing just a tiny bit and need to be nudged in the right direction or maybe I'm doing something basic completely wrong, I just don't know.

Any help would be highly appreciated!
Attached files:
File Type: rar  xanathon_lightglobe04.rar (205.2 KB, 48 downloads) - View custom content

happy simming,
Xanathon


Xanathon's Laboratory :: WishList

.: Do not harass me with requests via PM, you will only get ignored :.
.: Don't post my objects or objects derived from them on paysites or the exchange! :.
Page 3 of 12
Back to top