More Awesome Than You!

TS2: Burnination => The Podium => Topic started by: Menaceman on 2009 January 27, 18:09:12



Title: Broken M&G Window
Post by: Menaceman on 2009 January 27, 18:09:12
So, looks like another borked item from M&G. I dunno if anyone has spotted this already but I found it yesterday after trying to use the window for the first time.
It appears as though the whole texture is partly translucent when viewed from certain angles and the window cutout is slightly out of line when viewed from the inside of a building.

PICTURES:
Outside;
(http://img228.imageshack.us/img228/9913/windowoutzy6.jpg)
Inside;
(http://img228.imageshack.us/img228/4264/windowinpf6.jpg)

Any way/chance of having them fixed?


Title: Re: Broken M&G Window
Post by: eevilcat on 2009 January 27, 22:38:49
Without going as far as extracting and looking at the mesh, I'd say that it's been incorrectly tagged with alpha materials throughout which means that the it's drawn in any old order as the game graphics engine cannot correctly sort/draw the polygons within shape in the correct order. This means the polys will randomly draw in front or behind each other as the camera moves around it. The mesh itself will need to be fixed so that there is an alpha material for the windows and a separate (non-alpha) material group for the frame. The fix may be straightforward if there are two material groups (fix the frame one so that it is not alpha) otherwise a second material group will need to be created and the frame textures associated with it. I think this may also involve splitting a single texture file into two as alpha textures have a gray scale transparency (see-through graduated to solid) while other textures just have on/off per pixel. I may have time to look at this tomorrow as I've got M&G if nobody else does.


Title: Re: Broken M&G Window
Post by: Menaceman on 2009 January 29, 11:38:03
That would be great if you could. Thanks.
I'd have a look myself but don't really know what I'm looking for.


Title: Re: Broken M&G Window
Post by: eevilcat on 2009 January 29, 12:44:34
Ok, I've had a chance to look at the M&G objectsXX files in SimPE and I was correct. It looks the artist originally created it with three separate textures: one for the outer frame; one for the inner frame and one for the glass as those resources are still present. The two frame textures are used in both the interior and exterior window meshes. Assuming that they have the same restrictions as community modders they're only allowed 2 recolourable subsets and 3 into 2 does not go! Their fix was to produce a single combined texture with a single material definition which has been set to alpha blend hence the sort order problems when rendered in game. A number of the other windows do have three associated textures but are mapped as interior + glass OR exterior + glass thus conforming to the two subset limit.

It can be fixed by creating a second recolourable subset to separate out the glass from the frame and likewise splitting the textures to facilitate easy recolouring. I might have a play with this today to confirm that it has actually been texture mapped the way I'm assuming.


Title: Re: Broken M&G Window
Post by: Havelock on 2009 January 29, 22:35:01
I have made a fix. Outside frame and glass could have a different color as inside frame and glass. Also wallmasks are fixed.


Title: Re: Broken M&G Window
Post by: Lord Darcy on 2009 January 30, 10:43:09
Thanks for the fix, Havelock. :)
Like all your previous fixes, I wish this fix would be included in the next version of CEP as well. Have you reported it in CEP thread on MTS2?


Title: Re: Broken M&G Window
Post by: Menaceman on 2009 January 30, 19:06:35
Thanks for seeing to this issue so quickly. I never actually managed to have a look at the window files myself. I'll download it and try it out emmidiately.

EDIT: how come the glass texture becomes so blurry with this fix installed? Is it because I have it in my downloads?

The only remaining window issue that I wish I could fix now is the lighting on the square base game window. When placed, the outside frame gets darker and the inside gets lighter instead of the other way around like all other windows. I posted about it here: http://www.moreawesomethanyou.com/smf/index.php/topic,13744.msg393079.html#msg393079

dDefinder also says a round M&G window is effected the same and I've seen it in my game as well.


Title: Re: Broken M&G Window
Post by: Lerf on 2009 February 11, 18:18:03
Been mentioned before, but I thought I'd bring it up now as you seem to know your way around windows-- M&G broke the triangular "Pythagorean" window from OFB.  It will no longer place on the diagonal.


Title: Re: Broken M&G Window
Post by: SiuPang on 2009 February 15, 11:50:28
Some digression here. If I remember correctly, there is a window borked by M&G. It's the triangular window that comes with OFB, and with M&G, that window becomes implacable on diagonal walls. Is there a fix for it yet ???


Title: Re: Broken M&G Window
Post by: Emma on 2009 February 15, 12:13:48
Deja Vu?