Home | Download | Discussion | Help | Site Map | New Posts | Sign in

Latest Site News

MTS Summer Movie Night - posted on 13th Jun 2018 at 10:07 PM
Replies: 37 (Who?), Viewed: 19008 times.
Page 1 of 2
One horse disagreer of the Apocalypse
Original Poster
#1 Old 15th Dec 2006 at 10:45 AM
Default The alpha "blend" mode bleed
Is it my imagination, or has this recently got a whole lot worse? I have used separate subsets, which used to stop objects from one group bleeding through your part-transparent group, but now some parts are completely see through from some angles and you can see everything through them!

I have made one object, which is one colour all over, and meant to be solid, and it's solid from one view and transparent from the other even though it's symmetrical! Is there some secret in the normals? I feel as if we should investigate this more deeply as it's becoming a real nuisance

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Advertisement
Retired Duck
staff: retired moderator
#2 Old 15th Dec 2006 at 10:57 AM
The only solution I've ever found to this is no make sure that no blend subset ever visually overlaps itself (unless backface culling is off, which can sometimes reduce the problem, depending on what actually is bleeding). Makes recolourability a pain in the backside, but if you don't mind that it works swimmingly.
Instructor
DELETED POST
15th Dec 2006 at 10:59 AM
This message has been deleted by Khaibit. Reason: Echo answered while typing
One horse disagreer of the Apocalypse
Original Poster
#3 Old 15th Dec 2006 at 11:03 AM
Hmm I'll try the culling thing. Is that the "cull clockwise" thingy?

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Retired Duck
staff: retired moderator
#4 Old 15th Dec 2006 at 11:07 AM
Yup, set it to "none". It only fixes the problem occasionally though, most of the time it just adds to the rendering time.

Edit - you said that the object was supposed to be solid? Why is it set to blend?
One horse disagreer of the Apocalypse
Original Poster
#5 Old 15th Dec 2006 at 11:19 AM
See... this has to be a bug in the game. Alpha channel info is not being respected. A solid part is supposed to be solid - I could sort of forgive if a few semi-transparent bits were jumping in front of each other.

No it didn't work for me. But the weird thing is, *some parts* of the same group are not behaving that way - my lock box always appears as in front of the other parts. If you have that in the foreground, it blocks view of all the other parts. If you have it in the background, it bleeds through.

Just noticed your edit: The subset is a whole load of bits of door furniture, like letterboxes and stained glass. It's blend cos of the glass.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Retired Duck
staff: retired moderator
#6 Old 15th Dec 2006 at 11:41 AM
Are you able to change those parts of the door which are meant to be solid to point to a non-blend TXMT?
One horse disagreer of the Apocalypse
Original Poster
#7 Old 15th Dec 2006 at 11:47 AM
Well with the two recolourable subset rule, doing so would make it less convenient for recolourers. I am trying to make it highly stylable just by recolouring. The timber part of the door is recolourable itself, there is non-recolourable standard glass for if you decide to cut out the wood panels (the timber is alpha test). The 2nd recolourable set has various things like handles, letterboxes, a victorian bell or a modern knocker, plus a stained glass overlay for in case you have cutout panels in the timber subset. The point was by keeping the door decor together, the recolourer could alpha out the bell if they wanted the knocker etc.

The real reason I started this thread was to explore some subtlety of when and how it happens, because I noticed that not all the parts were behaving the same. I have an identical handle both sides of the door, in the same subset. But one of those handles is see through while the other is not. There has to be something in the mesh...

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Instructor
#8 Old 15th Dec 2006 at 12:01 PM
try breaking the offending group in to different sections, but all named the same. Then go into the debug tab, and set the opacity level of the items that are supposed to be transluscent different numbers. The larger the number the farther from center of the object. This has helped on a couple of items.

Eclectic Sims The place for your younger sims and unique animated items!
Charmed Sims Archives Gorgeous Clothing, Furnishings and more.
Two great sites ALL FREE NOW!!!
One horse disagreer of the Apocalypse
Original Poster
#9 Old 15th Dec 2006 at 12:03 PM Last edited by Inge Jones : 15th Dec 2006 at 12:18 PM.
Edit: ok I can see where, but I am not sure what you're telling me to do about breaking up the objects? Shall I put all the glass into one group and all the metal in another? Why do they have to have the same name - could I simply export them and join them up later?

So do I set the opacity level higher for the ones I want solid? At the moment it is a ridiculously high number like 4294967295

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
One horse disagreer of the Apocalypse
Original Poster
#10 Old 15th Dec 2006 at 12:32 PM
Actually I don't think that will work. The bits that are meant to be solid were already at their highest, and because the object is a door, you may be seeing it from any angle. So if I make say the lock more opaque than the hinge, another time I might be looking from the hinge side and then the lock will bleed through that.

All I know is I have a north handle and a south handle which were made by maxis. The north handle is opaque while the south handle is transparent. There is nothing different about the way they are set in SimPE, and they share a material in SimPE.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Scholar
#11 Old 15th Dec 2006 at 3:45 PM
I have a bit of experience with this, mainly because I mostly make body and hair meshes, and hair especially relies on multiple semi-transparent layers.

This problrm isn't really a "bug", I think it is just a fact of 3d game rendering in general - but either way, it has existed since the original Sims2 game.

The basic rules:

* Any semi-transparent mesh group can never be made in such a way that you would be able to look through it and see another part of the same group.
You will notice that Maxis meshes with semi-transparent parts are always things like a tabletop, microwave door window, etc - basically a flat plane, a sphere, or some other shape that will completely hide the rest of itself from any viewing angle.

* Also it is impossible to get a truly "solid" part on the same group with a semi-transparent part. Even when the alpha is all-white, it will still have that same glitch if the parts of the same mesh group ever overlap each other. So, parts that must be truly solid will have to be in a different group than any semi-transparent parts.

* Then there is the "solid-alpha" option, if it suits your object - where the alpha works only as if it were all black and white - in other words, you can use this to change the shape of a part (or make something disappear completely), but no semi-transparency at all. Not as flexible, but the advantage is that it is as easy to do as a simple, solid, part.

================================

So each semi-transparent part that will overlap another is going to have to be in a different mesh group.

The "opacity" setting in SimPE is kind of mis-named - it really doesn't affect the opacity (transparency) of the part at all, it tells the game in which order the parts are to be layered. The lowest Opacity numbered part is the one closest to the center, next lowest is the next one out (and will look OK if the first part is seen through it), and so on.

Anyway, to make it possible to recolor many such parts, you might be able to use the "slave subset" thecnique. I've never had occasion to do that, and it looks rather complicated, but it might be what you are looking for.
One horse disagreer of the Apocalypse
Original Poster
#12 Old 15th Dec 2006 at 4:16 PM
Thanks Dr Pixel. I have read in another post that you can get more colourable parts with a slave subset, but I wasn't sure how to understand that, because beds have covers that are slave subsets but I am not aware that a bed can have two colourable parts to its frame? I mean, however would it be displayed in the catalogue anyway?

I did think of some workarounds for the object I am actually creating, so I am not exactly stuck anyway, but this strange effect is niggling me and I *feel* as if there should be a way to stop it properly :D

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Mad Poster
#13 Old 17th Dec 2006 at 3:20 PM
One horse disagreer of the Apocalypse
Original Poster
#14 Old 17th Dec 2006 at 3:29 PM
What do you mean, Niol?

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Mad Poster
#15 Old 17th Dec 2006 at 3:44 PM
One horse disagreer of the Apocalypse
Original Poster
#16 Old 17th Dec 2006 at 4:01 PM
I take it that's something I should know about? Where is this discussed? On the other hand, doing that won't help other people see my objects at their best unless they also have the material shader patched

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Scholar
#17 Old 17th Dec 2006 at 6:24 PM
Quote:
Originally Posted by Inge Jones
Thanks Dr Pixel. I have read in another post that you can get more colourable parts with a slave subset, but I wasn't sure how to understand that, because beds have covers that are slave subsets but I am not aware that a bed can have two colourable parts to its frame? I mean, however would it be displayed in the catalogue anyway?


The bed/covers thing is a different technique, where two (or more) different objects can share the exact same textures (in the case of beds, one bed covers recolor will work for every bed in the game, but each bed frame uses only it's own independant recolors.)

The "slave subset" is a method where two (maybe more?) different mesh groups will share the same recolor option while still acting as independant groups - that is, they can use different material definition files, different transparency settings, etc - but they are linked together into one of the recolor options. So when you change that one color option, the materials for both these groups will change together. In other words, they act as if they were a single mesh group, they are not independantly re-colorable, the color of both will change at the same time.

For example, let's say you are making a table and you want the legs to be dull, the top shiny, and the glass transparent - but you want these all to be re-colorable.

You can do this by making the mesh with three groups - the top, the legs, and the glass insert in the top.

Then you would make two of the groups re-colorable (probably the top and the glass) and make the third (the legs) a slave of the top.

Now the user could change the color of the top - and at the same time the color of the legs would also change.

In the catalog, it would show as the usual two color options, since the "slave" group isn't really an extra color option, it is always forced to go along with the top's color option.
One horse disagreer of the Apocalypse
Original Poster
#18 Old 17th Dec 2006 at 6:37 PM
Oh that sounds ideal for what I needed! That means I can have the glass translucent while the knobs and knockers are solid and shiny. It doesn't matter that they have to change colour at the same time. I just wish there was a way to search for a two-word phrase on these forums. I've tried with quotes round, but it still searches on any word.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Instructor
#19 Old 17th Dec 2006 at 7:54 PM
Inge the Shoji Table lamp makes use of slave subsets.

Here's my notes on adding them to an object. No guarentees about comprehensiveness or completeness.
-----
Import new mesh with slave subsets
Create slave texture (If multistate item, create texture for each state)
Clone Texture
change name
click fix tgi
commit
Create Slave material Definition (if multistate item, create material definition for each state)
Clone material Definition (TXMT)
Rename (See Note below)
Click Fix TGI
Commit
Modify stdMatBaseTextureName to point to new texturename minus the _txtr
On File List modify the filename to point to new texture name minus the _txtr
on cMaterialDefinition tab modify the Description to be the filename minus the _txmt (might not need to do this??)
Create Material Override for SlaveSubset (if multistate item, create material override for each state)
Clone MMAT (If this is a multistate item clone an existing mmat for the same material state)
Click on Resource tab
Modify the Instance to be 1 higher than previous MMAT, commit.
click on plugin tab.
Modify the subsetName to be new slavesubset
Modify the name to be the new txmt name minus the _txmt
Commit.
Update Shape (SHPE)
Click on Parts Tab
Modify any subsets/txmt as needed
Click add to add an entry for the new slave subset.
Enter new subset name
Enter new material definition file minus the _txmt
Click Commit
Update the Geometric Node (GMND)
Click on Edit Blocks Tab
Add a cDataListExtension
If a cCopyRight block exists move the new cDataListExtension so it is above the CopyRight block in the list.
On the content tab, select the 0x0 initial gmnd node from the list.
click on the cObjectGraphNode
Click on Add in the Datalist extension Reference
Click on the newly added reference.
Change the index to be 1 higher than exists.
Change Enabled to be 0x01
In the blocklist, select the new unnamed cDataListExtension.
Change the name to tsDesignModeSlaveSubsets
Change the type to string and click add.
Click on the new string in the items list.
Change the name to be the master subset name
Change the string to be the slave subset name. (This can actually be a comma delimited string of multiple subset names).
Click Commit.
Select the tsDesignModeEnabled from the block list.
Verify it has 1 or 2 entries and they are the master subsets. -- These must be the subsets listed in the material overides.
If desired add the slavesubset to the tsNoShadow with a value of 0.
Save
Run Fix Integrity.
Run SceneGrapher -- check for any missing texture links. Fix as needed.


If this is an item that is multi state, ie lamp on/off, or counter dirty/clean you will
also need to modify the text lists.
STR (0x88 Material Names)
add string index for <slavesubset> for each material state (clean/dirty on/off)
Modify the matching Material Overides
set the objectStateIndex = the new index in the Material Names(0x88) string list

STR (0x87 Model - Mesh Groups)
add string index for <slavesubset>




NOTE on Material Definition Names: Sims2 looks for slave texture names in a specific format. For instance:
If you have the mesh group
countertop (master)
|__countertrim (slave)
|__decor (slave)
counterfinish

If your master material definition name is:
##0x1C050000!counternouveau-[snowstorm-12.7.2005-1516a]_countertop_copper_dirty
Then your slave material definition names would be
##0x1C050000!counternouveau-[snowstorm-12.7.2005-1516a]_counterttrim_copper_dirty
##0x1C050000!counternouveau-[snowstorm-12.7.2005-1516a]_decor_copper_dirty

Even if you create and link the files properly, but do not use this format, Sims will not find your texture.
You can see this if you check the texture logs file.


Clone MMAT (If 2nd MMAT doesn't exist)
If clone modify the Instance to be 1 higher than previous MMAT, commit.
Modify the subsetName to be new subset
Modify the name to be the new txmt name minus the _txmt
commit.

Eclectic Sims The place for your younger sims and unique animated items!
Charmed Sims Archives Gorgeous Clothing, Furnishings and more.
Two great sites ALL FREE NOW!!!
One horse disagreer of the Apocalypse
Original Poster
#20 Old 17th Dec 2006 at 8:33 PM
Thank you! I shall try that out next

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
One horse disagreer of the Apocalypse
Original Poster
#21 Old 18th Dec 2006 at 10:53 AM
Ok I have done this (it wasn't multi state anyway). I have yet to put it in the game to try it, but one thing puzzled me in your instructions. You say to make a new MMAT for the new subset, but later you say only the master subsets should be in the tsDesignModeEnabled list, and they should correspond to the ones I have MMATs for. Well obviously by then I also had a MMAT for the slave. Could you clarify that please?

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Field Researcher
#22 Old 18th Dec 2006 at 1:04 PM
Sorry for my english, I can't explain this very well, but I'll try and I hope you understand wath I mean......

Usaully when we want a trasparency we build the texture in DXT3 ( or5) format and we set in the TXMT the stdMatAlphaBlendMode in blend mode.

It's too difficult for me to explain why and the difference, but there is another way to make trasparency and they work fine with all the types of mesh, even if they have different subset: solid and trasparency.

Build your texture as usually in DXT3 format. Then in the TXMT set stdMatAlphaBlendMode to "none" and set stdMatAlphaTestEnabled to "1" ( make it enable). See the different in the game.

Hope this help you.

If you like my creations, you may consider to make a little donation to support my site and my modding activity.
MaryLou's Sims 2 World - MaryLou Sims 2 Forum (Italiano)
One horse disagreer of the Apocalypse
Original Poster
#23 Old 18th Dec 2006 at 1:13 PM
Thanks MaryLou, I am already used to using the alpha test option, the thing I was missing was knowing that I could use two different materials together on one recolour option, because in this case it was important to use the blend mode on the glass.

Anyway the door is working fine now, I just await the clarification of the MMAT confusion, but it looks like I must have guessed right anyway

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Instructor
#24 Old 18th Dec 2006 at 2:30 PM
The notes I made were around University time I think. Since then If I recall the newer expansions now don't require the MMAT to exist. So I probably never cleaned up these notes

The other thing about slavesubsets is that SimPE Object Workshop broke sometime around 0.48, such that it doesn't make recolors properly if you have more than one slave to a master. It does work fine on one slave for one master though for sure.

Eclectic Sims The place for your younger sims and unique animated items!
Charmed Sims Archives Gorgeous Clothing, Furnishings and more.
Two great sites ALL FREE NOW!!!
One horse disagreer of the Apocalypse
Original Poster
#25 Old 19th Dec 2006 at 6:30 PM
Ok, what I am finding is this: The slave subset is not changing colour with my recolours. If I don't add it to the tsdesignmodenabled, I don't get a MMAT for it in my recolour package, although I do get its TXMT and MMAT. But the colour of that part does not change with its master in the game.

If I do put it in the tsdesignmodenabled list, the part does not appear in the game at all.

I'm pretty stuck here really.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Page 1 of 2
Back to top