# Why don't the mirrors work?!

• I took an ingame mirror, like apa_mp_h_01_bath_mirror, and it seems to have all the right properties, like

Shaders
{
mirror_default.sps
{
DiffuseSampler mh_V_solidGrey_d
SpecSampler mh_V_solidWhite_d
UseTessellation 0.00000000
SpecularIntensityMult 1.00000000
}
}


Yet, when spawned in game (or via ymap), they remain just black. Do they need to be spawn with a special flag or something?!

• There's gotta be ppl who did mirrors before. Please, tell me what magic incantation I missed.

• @meimeiriver i'm not sure, never try, but i think it have something to deal with ymap or ytyp

• @meimeiriver i'm not sure, never try, but i think it have something to deal with ymap or ytyp

I have the proper ytyp entry for it. I just can't find a ymap example for it. I'm guessing it needs a special flag or something.

• Can someone at least tell me where these apartments are loaded? I can't find any frikkin' ymap with a mirror in it.

• @meimeiriver interior are in x64h if i remember well.

• @meimeiriver interior are in x64h if i remember well.

The ytyp entry is trivial, and copied (but renamed) straight from:

update\x64\dlcpacks\mpapartment\dlc.rpf\x64\levels\gta5\interiors\int_mp_h_01.rpf\

<Item type="CBaseArchetypeDef">
<lodDist value="500.00000000"/>
<flags value="0"/>
<specialAttribute value="0"/>
<bbMin x="0.00000000" y="-1.08814000" z="-0.43535000"/>
<bbMax x="0.00000000" y="1.08813900" z="0.58449610"/>
<bsCentre x="0.00000000" y="-0.00000048" z="0.07457298"/>
<hdTextureDist value="10.00000000"/>
<name>apa_mp_h_01_bath_mirror_ymap</name>
<textureDictionary>apa_mp_h_01_int_txd_ymap</textureDictionary>
<clipDictionary/>
<drawableDictionary/>
<physicsDictionary/>
<assetType>ASSET_TYPE_DRAWABLE</assetType>
<assetName>apa_mp_h_01_bath_mirror_ymap</assetName>
<extensions/>
</Item>


The problem is not the ytyp map entry, though, but finding a ymap in which it is being used, so I know what flags it needs. Same for Franklin's fancy interior (or any one with a mirror in it): I can't find the ymap, anywhere, where these props are being used. Sometimes I think I found one, but that's just a parent MLO loader, with just a single entry, like

<Item type="CMloInstanceDef">
<archetypeName>apa_v_mp_h_01</archetypeName>


It's maddening. All I need is 1 single ymap that uses such a mirror.

• @meimeiriver <Item type="CEntityDef">
<archetypeName>v_24_bdrm_mesh_mirror</archetypeName>
<flags value="1572866"/>
<guid value="1443294585"/>
<position x="-3.72130200" y="-0.49122800" z="1.62318700"/>
<rotation x="0.00000000" y="0.00000000" z="0.00000000" w="1.00000000"/>
<scaleXY value="1.00000000"/>
<scaleZ value="1.00000000"/>
<parentIndex value="-1"/>
<lodDist value="100.00000000"/>
<childLodDist value="0.00000000"/>
<lodLevel>LODTYPES_DEPTH_ORPHANHD</lodLevel>
<numChildren value="0"/>
<priorityLevel>PRI_REQUIRED</priorityLevel>
<extensions/>
<ambientOcclusionMultiplier value="255"/>
<artificialAmbientOcclusion value="255"/>
<tintValue value="0"/>
</Item>

It seems there is multiple ytyp entry for mirror but no idea what this one do

• It seems there is multiple ytyp entry for mirror but no idea what this one do

Damn, I had high hopes for this one. But, alas, still black. Can't believe it; I use the exact same ytyp entry for it, and the exact same ymap one. So, why dafuq isn't it doing its mirror thing?!

Still, already very grateful to you for finding the ymap. Where did you find it?!? Been looking all over the place, but could locate nada.

• @Shaezbreizh No, seriously, please tell me, where is that ymap from?!

• @meimeiriver wasn't ymap but inside a ytyp file. as I said you there is different kind of entry, idk what this one do thought.
it was in x64h > interior > v_24 ( franklyn ytyp )

there is also an other block related to mirror

    <Item>
<roomFrom value="8"/>
<roomTo value="1"/>
<flags value="0"/>
<mirrorPriority value="0"/>
<opacity value="0"/>
<audioOcclusion value="0"/>
<corners content="vector3_array">
2.47014500	-4.94866100	-0.20964710
2.47014500	-4.94866100	3.85547500
2.47014500	-1.51167200	3.85547500
2.47014500	-1.51167200	-0.20964710
</corners>
<attachedObjects/>
</Item>

• wasn't ymap but inside a ytyp file. as I said you there is different kind of entry, idk what this one do thought.

Oooh, I see now! It's a ymap inside a ytyp, as it were! (In one of those MILO containers!). Can't believe I missed that (I stopped at the first instance of the mirror in question I found) Thank you!! Going to examine this more thoroughly!

• it was in x64h > interior > v_24 ( franklyn ytyp )

LOL. Now I also realize why I could never find those ymaps referenced in the MILO ymaps: duh, they're inside the ytyp files, embedded! Like I said, I always stopped looking for, say, v_24_bdrm_mesh_mirror, after the first instance I found in the ytyp file, figuring it would never be defined twice. Little did I know there's an entire embedded extra ymap in it!

You've already been a great help!

• there is also an other block related to mirror
<Item>
<roomFrom value="8"/>
<roomTo value="1"/>
<flags value="0"/>
<mirrorPriority value="0"/>
<opacity value="0"/>
<audioOcclusion value="0"/>
<corners content="vector3_array">
2.47014500 -4.94866100 -0.20964710
2.47014500 -4.94866100 3.85547500
2.47014500 -1.51167200 3.85547500
2.47014500 -1.51167200 -0.20964710
</corners>
<attachedObjects/>
</Item>

This could very well be the key to unlock this mystery! Gotta figure out what those room definitions are; but I feel we're getting close!

• @meimeiriver idk it's inside a <room> block
I guess it's related to what you see out of this room but not sure i'm not really prop in ytyp

• @meimeiriver idk it's inside a <room> block
I guess it's related to what you see out of this room but not sure i'm not really prop in ytyp

Yes, there's a <rooms> section. Only thing really relevant in there, I think, are the coordinates. I'm guessing, consequently, the 'corners' of the mirror definitions are themselves relative to the coordinates of the room they're supposed to be in.

• I'm guessing, consequently, the 'corners' of the mirror definitions are themselves relative to the coordinates of the room they're supposed to be in.

Or, with a bit of luck, those corner coordinates aren't related to the mirrors at all. In the process of preparing a first test, right now.

• @Shaezbreizh Pardon my ramblings, but it would seem the bounding box values for the room correspond with the corners for the mirror. So, I'm thinking the corners are the size of the 3D space the mirror will reflect. Like I said, first test coming up real soon.

• Still black. Guess I'm not really understanding the roomFrom/roomTo thing properly yet. Or the guid, for that matter.

• @Shaezbreizh Well, those corner coordinates definitely relate to the mirrors: when I changed the numbers to something else, the mirrors in Franklin's home became black too.

"vector3_array" appears to consist of 4 vectors, most likely defining the to-be-mirrored area. Gotta figure out what is relative to what exactly; but it's already safe to say we (more specifically you) essentially figured out how the mirrors work. This is already a great leap forward.

Kinda need to get some sleep right now. Tomorrow I will investigate further. The RoomFrom/RoomTo thingy, for instances, still baffles me too, as I can understand the function of the "vector3_array", but don't get what's with the whole portal from one room to another business (really, where is my portal gun when I need it?!).

• @Shaezbreizh Hmm, tougher than I thought. When I change those corner coordinates, all it seems to affect is what I can see outside the rooms (aka, outside of the building, looking thru the windows).

Now I'm wondering whether those coordinates even relate to the mirrors at all; especially since there are coordinate sets for rooms with no mirror in them, even. Sigh.

• Talking to myself again, it would seem, LOL, but at least I established we have the right flags, and it's the position that counts; in this case, if I move the bedroom mirror 5 meters up, it becomes black as well; ergo, it's not the flags, and must be position, and nothing else.

So, back to those coordinates. I'm beginning to get an inkling about the whole MLO sytem. For instance, a ymap inside a CMloArchetypeDef container is not just a ymap, but has all relative coordinates, like:

    <Item type="CEntityDef">
<archetypeName>v_24_bdrm_mesh_rugs</archetypeName>
<flags value="1572866"/>
<guid value="318770311"/>
<position x="-2.76615600" y="-1.99458800" z="0.00365500"/>


Those coordinates are relative to the root MLO placement, it seems (all zeroes):

<Item type="CMloArchetypeDef">
<lodDist value="20.00000000"/>
<flags value="0"/>
<specialAttribute value="0"/>
<bbMin x="0.00000000" y="0.00000000" z="0.00000000"/>
<bbMax x="0.00000000" y="0.00000000" z="0.00000000"/>
<bsCentre x="0.00000000" y="0.00000000" z="0.00000000"/>


The zeroes aren't worrisome, and likely indicate the coordinates are gotten from the process doing the MLO placement (aka, the process instantiating the entire build). What this means, I suspect, is that you could probably position any of these MLO builds anywhere, and all objects within will neatly move along with it. This opens great possibilities. Like I could finally take one of them fancy Eclipse tower apartments, and move them to a prettier location (3 Alta Street leaps to mind, for example).

So, I may not be able to figure out the how to do the mirrors, LOL, but I'm learning a heck of a lot in the process. And I found the MLO files for the 60-car garages too. So, who knows, I may surprise you all one day.

• @meimeiriver can't really help more sorry

• @meimeiriver wasn't ymap but inside a ytyp file. as I said you there is different kind of entry, idk what this one do thought.
it was in x64h > interior > v_24 ( franklyn ytyp )

there is also an other block related to mirror

    <Item>
<roomFrom value="8"/>
<roomTo value="1"/>
<flags value="0"/>
<mirrorPriority value="0"/>
<opacity value="0"/>
<audioOcclusion value="0"/>
<corners content="vector3_array">
2.47014500	-4.94866100	-0.20964710
2.47014500	-4.94866100	3.85547500
2.47014500	-1.51167200	3.85547500
2.47014500	-1.51167200	-0.20964710
</corners>
<attachedObjects/>
</Item>


So, anyone, how do these vector3 functions works?! There I was thinking these were just regular cartesian coordinates, but math ppl got their hands on it, and had to make things hopelessly complex and convoluted.

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.