You may know that the Sims 2 uses cubemaps to add a reflective effect to certain objects/materials. The details of this are explained in Part 2 of Pixelhate’s ‘Exploring the TXMT’ series.
This document also explains how to make a custom one... but the result is not functional, at least in my all-EPs, all-SPs game. Fortunately, there’s an easy fix:
‘EnvCubes’ are not regular texture images. They contain six different “blocks”/subtextures, one for each side of the cubemap. Thus creating a custom EnvCube involves extracting and renaming one of Maxis’, and replacing the various subtextures.
(Unlike SpecularMasks, these don’t mind the DXT1/3/5 formats. Error messages may appear if you import a texture bigger than the existing ones, though. In that case, commit and close the ressource, save the package, and open the ressource again.)
So TL;DR, I made a bunch!
I also made a test object for ease of visualization. Here, it demonstrates Maxis’ “reflectioncubetemplate-envcube” texture with the material’s “stdMatEnvCubeLockedToCamera” parameter set to zero and one respectively. More on that later.
The materials in the following pictures generally have an“stdMatEnvCubeCoef“ parameter of 0.5, 0.5, 0.5; its base texture is flat black.
My first creations: extra recolours of the texture used by most of the game’s metallic cubemaps. The top ball shows Maxis’ “reflectiongold” envcube as a point of comparison.
The middle row contains “MetallicRed”, “MetallicPurple”, “MetallicBlue” and “MetallicGreen”.
The bottom row contains “RoseGold”, “MetallicBrown” and “Gunmetal”.
I’ve also made variations of Maxis’ “reflectionsparking” cubemap (visible left), often used for glass and plastic. The middle texture is “HighContrastSparkling”; the one on the right is “SparseHighlights”.
The same custom envcube, previewed on the urn sculpture. Probably not their best look, tbh.
Now for something quite cool:
With specific textures and the “stdMatEnvCubeLockedToCamera” parameter set to 1, we can achieve a rimlit and/or holographic effect! Here are “RainbowFresnel”, “HoloFresnel” and “Fresnel”.
The spheres don’t really do this effect justice. So here is a demonstration of their “cool holo fabric” potential, gif included. Hopefully no one beats me to making a holo skirt haha.
(+ my two reflectionsparking edits on the sides. )
I’ve also fixed up Pixelhate’s own custom envcube, though their texture turned out not to be ideal.
-
My test object and all the pictured recolours can be downloaded here on SimFileShare.
The tester is found under Deco/Misc for 1$. The actual envcube textures are found in its various recolour files, but are only referenced by the recolours of other objects. This means that if you delete “EnvcubeTester_recHoloFresnel”, “HnMManequinLongDress_RecHoloEnvCubeLocked“ won’t be able to find the texture it’s supposed to use.
And here is a zip containing these envcubes as individual TXTR ressources ready to be imported into SimPe, as well as a package file containing all of them.
Again, Pixelhate’s documentation explains how to actually use these custom envcubes for your own CC. My last package file can be used as a “pseudo texture repository” as described in their guide.
-
And a few last minute tips for creators:
The projected envcube is additively added to the object’s main texture and shading. Its brightness is also dependant on the ambiant lighting, being much duller inside. This means that a dark envcube texture likely won’t have much effect.
Maxis’ cubemap projection is weird. Some of the textures don’t have the orientation you’d expect. I’d recommend extracting the subtextures from “reflectioncubetemplate” and testing out your envcube on my test object if you’re strugging with that.
Making a ‘rimlit’ cubemap only involves creating three textures: ‘back’, ‘front’, and a gradient between those that will be reused by all sides. See my ‘fresnel’ envcubes as a reference.
When using such a ‘rimlit’ envcube, don’t forget to set the “stdMatEnvCubeLockedToCamera” parameter in the material to 1. It won’t look too good otherwise :p
Custom EnvCubes can also be used for clothing and other CaS items with the “SimStandardMaterial”. However, they are a bit pricklier: “##0x1C050000!” has to be added before the texture name in the “stdMatEnvCubeTextureName” parameter. It won’t work if this extra string is not present.