Replies: 21 (Who?), Viewed: 8746 times.
Mad Poster
Original Poster
#1 Old 26th Sep 2006 at 1:57 PM Last edited by niol : 2nd Jun 2009 at 6:33 AM.
Default modding - roof - material shader modded at the roof top texture definition
lol... just got crazy enough to mod the material shader (Let's forget that I'm a lunatic nervous wonk!) and it seems pretty stable in my base game copy... Just wonder if that works in others... So, this's a testing and not a release yet. Use only one mod at a time.

Added:
After comparing the roof shaders from EP0-TS2, EP2-NL, EP3-OFB, EP4-Pets,
There're only 2 versions of this shader out of the compared.
Version 1: EP0-TS2, EP2-NL, (assumedly) EP1-UNI
Version 2: EP3-OFB, EP4-Pets
I've not got EP5-SS's, so we'll see.

Copyright:
1. No redistribution of this mod outside of MTS2.
2. For lot-sharing with this mod, please link back to the original thread just in case of any updated infos and any reported unforeseen problem(s).
3. Maxis is creditted for its shader. Thanks for them.
4. Pandorasims is banned to use or host all my creations or provided infos
5. Except Pandora sims, everyone else is welcome to study, improve and refine it, and release their owns.

Installation:
Just dump the package into the downloads folder.

Compatibility:
Both versions of the original shaders or the bright and light roof mod are all compatible down to the base game and up to EP4-Pets. EP5-SS is unknown yet.
Thanks to bluetexasbonnie's feedback from that I can know it doesn't crash OFB.

The rules of the game:
This is a global mod. All default colours are affected and lightened from (0.4,0.385,0.38) to (1,1,1,0), so while using this mod and wanting the default ones or previously made customs to show up right, do the ratio math for the colourational changes accordingly. May prepare two sets for those without a roof shader mod.

Note:
I have altered the highlight before, but it doesn't look as good while a "mutation" at the roof top diffusion coefficients is sufficient. I'm unsure if transparent roof is possible, so feel free to try it out.

I was wrong to think that the roof high-light had such power to affect the look that much. But it happened to have the same value as the roof top.
http://www.modthesims2.com/showpost...79&postcount=64
http://www.modthesims2.com/showpost...13&postcount=66


Added:
transparency (with the suffix "-trans") and reflection map (with the suffix "-reflect" or "ag") are possible. Use only one mod at a time.
However, it can be challenging to do the roof recolouring for them to show up right or it's necessary to alter some more settings for them work out nicely.
Remember, these two mods are underdeveloped.



Just some chosen feedbacks from here :
Quote:
Originally Posted by nengi65
A global mod offered with some premade roofs would be awesome for those wintery neighbourhoods...and if one gets tired of winter one can simply remove it...

Quote:
Originally Posted by bluetexasbonnie
There is a small problem with the octagonal roofs from OFB. In the build mode they have some undefined areas along the ridges. These disappear in live mode and in camera mode. Roof looks fine from neighborhood. Overall, the roof mod looks fine.

Here is a picture of several rooves in build mode. You can see the problem on the octagonal ones. Though not pictured, the conic rooves are fine too.



I'll remove that Creator Feedback Forum thread once I've got the reply to my quest, and move the reply here.

The bright light roof mod is out here



For the roof shader sources: the wiki has them.
http://www.sims2wiki.info/wiki.php?...Talk:ShaderRoof


Related thread linkage for roof-products modding:

lot files
http://www.sims2wiki.info/wiki.php?title=ROOF
http://www.sims2wiki.info/wiki.php?title=3ARY
http://www.sims2wiki.info/wiki.php?title=WGRA

attic wall
Modding InfoCenter - Partitions: walls, fences, fence arches
http://www.modthesims2.com/showthread.php?t=106473

shaders
http://www.sims2wiki.info/wiki.php?...Talk:ShaderRoof
http://www.sims2wiki.info/wiki.php?...Talk:ShaderWall
http://www.sims2wiki.info/wiki.php?...lk:ShaderWallPS

threads
Mod the Sims 2 > Modding and Creation > Sims 2 Creation > Modding Discussion > Research & Development
Roofs > Roofs - Engine-Generated Geometry (Maxis Roofs)
http://www.modthesims.info/showthread.php?t=318988
Mod the Sims 2 > Modding and Creation > Sims 2 Creation > Modding Discussion > Research & Development > modding - roof - material shader modded at the roof top texture definition
http://www.modthesims2.com/showthread.php?t=192699
Mod the Sims 2 > Social > Social Groups > Moo Tools > Roof Pitch Adjuster
http://www.modthesims.info/showthread.php?t=328329
Mod The Sims > Modding and Creation > Sims 2 Creation > Modding Discussion > How Do I Change The Defoult Roof Colors?
http://www.modthesims.info/showthread.php?t=225532

tutorials
Recolouring Roofs with Object Workshop (NEW Tutorial)
http://www.modthesims.info/showthread.php?t=103082
Screenshots
Attached Images
 
Download - please read all instructions before downloading any files!
File Type: rar Moi_iroof-shader-modded-trans.rar (1.0 KB, 102 downloads)
File Type: rar Moi_bild_roof_grey-trans.rar (63.0 KB, 88 downloads)
File Type: rar Moi_iroof-shader-modded-trans-reflect.rar (1.1 KB, 99 downloads)
File Type: rar Moi_shaderRoof_ColourationFull.rar (4.2 KB, 46 downloads) - View custom content
4 users say thanks for this. (Who?)
Advertisement
Forum Resident
#2 Old 26th Sep 2006 at 2:30 PM
Your mod seems to give some different new possibilities for recolours in build mode. Thanks for taking the time to analyse that! I'll try it in my game and see how it works.
hexameter
Scholar
#3 Old 26th Sep 2006 at 6:09 PM
this is awesome Niol, thank you for sharing this wonderful discovery Now we can make a snowy looking roof.
xo

Rhondalatte's Custom CAS screens: http://blackpearlsims.com/ (formerly known as Reflex forum)

DeesElegantDecor - Beautiful furnishings:
http://games.groups.yahoo.com/group/DeesElegantDecor/
Top Secret Researcher
#4 Old 3rd Oct 2006 at 2:52 PM
Here are some pics of a collection of roof styles with and without the mod.

With





Without




The 'blue' only shows up in the build mode. It is not present in live or camera mode. So if someone really likes the mod, this is no reason not to use it. This does not show up where it really matters.

Intellectually, it is rather interesting that the graphics presentation/management is different in build and the other modes.
Mad Poster
Original Poster
#5 Old 3rd Oct 2006 at 4:52 PM Last edited by niol : 3rd Oct 2006 at 5:04 PM.
bluetexasbonnie,



A jar of virtual literal flowers that will blossom in the colour(s) of your like...

Thanks...
One horse disagreer of the Apocalypse
#6 Old 29th Oct 2007 at 2:34 PM
What we need is a way to make some roofs solid and some roofs invisible. We can do it with floors, so why can't we do it with roofs? Are they completly different graphically?

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Mad Poster
Original Poster
#7 Old 30th Oct 2007 at 4:21 AM
Inge,

Yes, you're right.

The floor tiles are based on grid layers while the roof is separate from it. In the partition thread, roof by the roof tool is yet another roof walls extend to.
Quote:
VerticalSpan. Accepted values are: "floorToFloor", "floorToRoof", "fixedHeight", "floorToFloorBasedCeiling".


odding InfoCenter - Partitions: walls, fences, fence arches
http://www.modthesims2.com/showthread.php?t=106473
One horse disagreer of the Apocalypse
#8 Old 30th Oct 2007 at 9:40 AM
Anyway, I made a roof shader for BV that allows the roof texture to have an alpha channel. The "blend" mode was not a good idea because the back of the roof would end up looking in front of the front of the roof - you know what I mean? A common problem with blend mode. So I just left it as an alpha test - you can cut out a piece.

Trouble is this still won't help for the skylights because the pattern repeats all over the roof, so you would have to have a skylight all over it.

What I thought might be useful however is to use an invisible roof all over the house - which would deal with the weather issue, and then to make from rugs roof sections for the cosmetic effect. Then the skylight can be made in the same fashion but it would become a light source in the daytime.

Do you want to see my shader?

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Mad Poster
Original Poster
#9 Old 30th Oct 2007 at 1:16 PM Last edited by niol : 30th Oct 2007 at 1:53 PM.
so, you see why I gave up on that.. :D

But a null roof shader is ringing in my ears for customly made roofs. Good idea...


Anyway, a custom skylight should have a windowsill mesh for the whole window frame.

Then, it comes the tricky part, the glass should be mapped for each side once. The external side of the glass will have material layer higher than the roofTop but lower than the snow, so it's gonna use layer=1.
As for the inner side of the glass, It's gonna be the same layer, layer 0.

This is to avoid the front with a higher layer gets drawn at the back of the roof.

However, if a roof mask can be made by means of a different combination of alpha-blending as in the wallmask case. It may work better.


As for the rug-approach as in BB's in the Ranchies, I think that'll work.
May + the spot light into the cres and probably reuse the streetlight shrine to simulate the scene.
One horse disagreer of the Apocalypse
#10 Old 30th Oct 2007 at 1:53 PM
Perhaps the roof could take a mask - I think masking is defined in the shader isn't it? But I am not so sure something can be made to "snap to roof" in the way that windows snap to the wall, so how will the roof recognise that it needs to apply the mask for that object? Hmm where are those roof decor objects that came with Seasons? (was it Seasons?). Perhaps they use a flag we don't have labelled in PJSE yet.

I replied to the thread in the ranch with what I think is a better idea.
Download - please read all instructions before downloading any files!
File Type: zip ijRoofShaderBV.zip (4.6 KB, 18 downloads) - View custom content

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Mad Poster
Original Poster
#11 Old 30th Oct 2007 at 1:56 PM
probably make the skylight as those roof objects, but the resultant may not work in the base game.

After all, in this case, the skylight can be just some objects with preset heights to place on roof level.

lol, just revised my last post and added the wiki link at the end of the 1st post for various versions of this shader....
One horse disagreer of the Apocalypse
#12 Old 30th Oct 2007 at 1:57 PM
I revised my last post too :P

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Mad Poster
Original Poster
#13 Old 30th Oct 2007 at 2:01 PM Last edited by niol : 30th Oct 2007 at 2:08 PM.
checking your shader sources... and added the wiki link at the end of the 1st post for various versions of the roof shader.

so, you just turn off only the blend mode in your version?

WEll, make it a ceiling light then... ?
One horse disagreer of the Apocalypse
#14 Old 30th Oct 2007 at 2:31 PM
Yes, the blend mode needs to be off or the two sides bleed through each other. Silly rendering gets that wrong.

I think there is a better future for skylights than being ceiling lights, I think we can make them proper windows...

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Mad Poster
Original Poster
#15 Old 30th Oct 2007 at 5:21 PM
I've been thinking of what you can mean by rug-based roof. Although I know you refer to echo's rug as the base for all game compatibility, but I'm wondering the possibility with Maxis rugs and floor grid layers.

If as you say to use the invisible roof shader, then, just use floor tiles and maxis rugs to accomplish the such alternative. Maxis rugs appear to reuse the floor grid layer, they can get deformed along with the floor. maxis rug + windows.
One horse disagreer of the Apocalypse
#16 Old 31st Oct 2007 at 8:17 PM
No I wasn't thinking of Echo's rug just clone a normal one. It's going to be too much hassle for the player I think to make a whole roof out of panels, just so they can use a roof light. And the idea of the object blocking a gap in the roof didn't work out, the snow still appeared on the floor under the gap *as well as* on the blocker object!

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Mad Poster
Original Poster
#17 Old 1st Nov 2007 at 4:52 AM Last edited by niol : 1st Nov 2007 at 6:39 AM.
sorry, my false assumption for the rug base.
Nah, sorry for my poor massage, I didn't want to mean you might use panel to build the whole roof but just the skylight object.

Probably, a layer of invisible floor tile can avoid the snow being on the floor, but the snow may be on the invisible floor.. :D

If the object mesh won't go with the floor elevation, but it is at least thick enough to cover up for a certain roof angle range?
One horse disagreer of the Apocalypse
#18 Old 1st Nov 2007 at 1:53 PM
I did make the object really enormous to make sure it covered the roof hole, but the game would not accept it was covering the hole.

The idea of the invisible floor below catching the snow did work, but like you say, then there was snow weirdly hanging over the room in a square.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Mad Poster
Original Poster
#19 Old 2nd Nov 2007 at 8:27 AM Last edited by niol : 2nd Nov 2007 at 10:56 AM.
Quote:
Originally Posted by Inge Jones
I did make the object really enormous to make sure it covered the roof hole, but the game would not accept it was covering the hole.

The idea of the invisible floor below catching the snow did work, but like you say, then there was snow weirdly hanging over the room in a square.


I think there should be no gap or a hole at all, and let the skylight to merge with the roof to create the illusion done by the skylight mask-up that means the skylight has to be drawn over the roof graphically. I think just keep the skylight frame as the same layer as the roof, and that's already sufficient.

What may be really challenging here is how the glass does its transparency. A special material to overwrite the roof is necessary to create the illusion as in a wallmask case though this can be a "roof-mask" case. So, it can take some works on analysing the wallmask and roof materials in order to make a "roof-mask" material to do the same art. Also, how wallmask functions in terms of its file structure and its values will become the key to design the glass part. So, windows as the object base sounds more promising to me.

Of course, if the glass overlapping the roof can already create a transparency we'd like to see, much less work. :D

But, if there can be a graphically-nullifying roof container specifically defined for the roof. The skylight gap can probably be covered by a roof piece at the upper level, in which the roof is graphically silenced by the roof container. This only works when the graphical effect solely counts on the a 2D occupancy. Gonna have it tested out to know this answer and more. But if the room would be considered not closed, an invisible floor layer can close it while the graphical has already been taken care of. So, just a couple of tests to do
I'm gonna try to finish my update on the neighbourhood mods first and clear up my room more before this. Too many things to at the moment. :D
One horse disagreer of the Apocalypse
#20 Old 4th Nov 2007 at 8:26 PM
I have spent a lot of time playing with roofs today, and I noticed they *do* have masks enabled. Everywhere that a roof is above another roof, the lower roof is masked out for those tiles.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Mad Poster
Original Poster
#21 Old 5th Nov 2007 at 1:16 AM
maybe just like the Mansard roof...
I'm testing on roofs for shrunk lots, but my roof won't poke through to the trimmed regions.

So, the masking should be vertical in shape vertically counted by the floor grid?
One horse disagreer of the Apocalypse
#22 Old 5th Nov 2007 at 8:13 AM Last edited by Inge Jones : 5th Nov 2007 at 3:37 PM.
Quote:
Originally Posted by niol
So, the masking should be vertical in shape vertically counted by the floor grid?


Horizontal, I would have said. Dead on the gridlines - it ignores any overhang. It's obviously that way so that it will line up with the walls in a dormer roof, or in a lower room if you have roofs on different levels.

Added a few hours later to save double posting: I have just noticed something bizarre - semi-transparent floors don't get snow on them if there is an object standing on them! This has certainly made the idea of a skylight cloned from a lamp feasible, as compared to a mask-out in the roof - at least for those situations where there is enough headroom in the room to create an invisible ceiling. I have made one out of a two-tile lamp (it has to be two tiles wide with the non-masking method) and I should be able to move the light joints down to light up both the above-ceiling space and the room itself which of course would be on the level below.

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