Malkior 476 Posted December 27, 2017 I've been pondering this for quite some time, frankly to once and for all fix the issue of inner model geometry showing when a character is turned into a hologram. After so long we finally have people who understand the models to actually do this.The issue I speak of is to the best of my knowledge because Obsidian decided instead of having a unique effect texture for holograms (As was the case in Kotor 1), they would instead just run a hologram filter over the character models themselves. This, I theorize caused unforeseen consequences such as the geometry of the eyes, teeth, and gums suddenly becoming visible of which looks frankly downright freaky.I have previously attempted to mitigate this effect by manually painting the texture with a color that blends in better, but it only works on a few and doesn't work at all on some like the Peragus Medical Officer.So, I want to know is, if indeed the issue is being caused by extra geometry in the model, could I somehow remove it from rendering or if perhaps there's a better way?-Yes, I will upload screenshots to illustrate the problem I'm attempting to describe. Quote Share this post Link to post Share on other sites
DarthParametric 3,795 Posted December 27, 2017 The most extreme approach would be to excise as much extraneous geometry as possible, likely requiring changes to how some meshes. like eyes, are animated. The mouthbox would probably still be an issue though. While you could alter it to be smaller, you can't get rid of it altogether. Quote Share this post Link to post Share on other sites
Malkior 476 Posted December 28, 2017 Hmm. That does indeed sound extreme. Is there a possible method of just removing the information from the UVW map? (Apologies if what I'm saying makes no sense. Of all areas of texturing, I know the least about the actual skinning process..) Quote Share this post Link to post Share on other sites
DarthParametric 3,795 Posted December 28, 2017 No, and that would do nothing anyway. UVs simply map the geometry to 2D space. Even if you remove the texture, the physical geometry is still there. You need the mouthbox, otherwise you'll just have a giant hole when they open their mouths. Quote Share this post Link to post Share on other sites
JCarter426 1,220 Posted December 28, 2017 The model format has a means of having some geometry not be shown on the hologram model. I haven't tested it, but there's something there, so let's assume it works for now. In that case, you could split the problematic objects in half and set one half to not be shown in holograms. So you'd be free to remove as much as you want on the hologram model without messing up the regular appearance. Still a lot of modeling work, but I think that's the best option. The issue with the K2 holograms is that they apply the same hologram texture to the all the geometry, and it's a transparent texture so anything that would be normally obscured by other geometry being in front of it no longer is. There's no getting around that without hacking away at the geometry. Quote Share this post Link to post Share on other sites
DarthParametric 3,795 Posted December 28, 2017 It seems inconsistent with what meshes cause issues. I noticed this when I was playing around with a rehash of the Admiralty mod. My version of Carth's head didn't have any problems with the eyeball or eyelid meshes, yet Cede's head did: Looking at each of the models, there is no immediately discernible difference in their eyeball or eyelid meshes. The back of the hat when looking front-on is the same. Not really visible through Carth's melon, but visible through Cede's. In both cases I lopped the tops of their heads under the hat completely off. Quote Share this post Link to post Share on other sites
JCarter426 1,220 Posted December 28, 2017 Hmm, that would imply that Carth's model actually is obscuring all the stuff that should be obscured, but Cede's isn't. Well if we knew how that worked, that would make things a lot easier. One thing does come to mind. If you put one lightsaber in front of another, the game has an issue of the lightsaber that was rendered into the game most recently always being on top. So its hilt will always render on top of the other lightsaber's blade, even from behind. It may be a similar case here, of just which object on the model happens to be loaded in the game first. If that was something that could be predicted (like alphabetical by name or something) then maybe it would be of use. But I'm pretty sure it's not, because the models' objects are usually named the similarly with little variation, so there should be no reason Carth and Cede are different if that's the case. Quote Share this post Link to post Share on other sites
DarthParametric 3,795 Posted December 28, 2017 Carth still has the mouthbox issue, but that could be because the mouthbox is part of the head mesh. Skinned meshes are typically bottom of the hierarchy, but comparing the binary models I spotted something interesting: And here are the source hierarchies: I'll try breaking out the mouthbox to a separate mesh and putting it under the head mesh in the hierarchy. And try reorganising Cede's hierarchy in the same manner. Edit: Seems like that works fairly well. I need to make some adjustments to the mouthbox, as I accidentally included a strip of the bottom lip. He looks a bit fish-mouthed without the teeth/tongue not being visible, but that's probably about as good as it going to get. Here's the revised hierarchy: Ironically I probably added problems by switching from a full body model, like Jinger/Kreia had in the original Admiralty mod, to separate heads. I can switch back though, which should remove the issue of the neckline. How many other holograms are there? Presumably all the Harbinger officers would need to be redone. All the various people on Perargus. Cede and Carth of course. Bao-Dur towards the end-game. Who else? Edit 2: Here's a revised Cede: I tried switching off the "hide in hologram" flags for his teeth and tongue meshes and it seems like it is mostly ok under this new arrangement: There's a few glitches here and there. The ones around the nose corners seems like it might be because of the topology, so I'll see if I can tidy that up. After that, I'll try the full body version and see if that alleviates the neck issues. Edit 3: Here's the full body Cede: Now the head properly occludes the body, but at the price of some small overlap/intersection glitches. I guess that is the lesser of two evils. Although there's a weighting issue causing some of that - bottom row of neck verts weighted to necklwr_g instead of torsoUpr_g, causing it to clip into the torso. An easy fix. Actually it's the way the collar is set up on the torso. Because it is uneven, the bottom of the neck clips through to hide the join, which would normally be fine, just not on a hologram. Made some minor mesh adjustments to minimise it. Edit 4: OK, so bare minimum requirements seem to be a full body model, mouthbox split out, and correct mesh hierarchy. Seemed to work out well for the Harbinger Captain. I'll roll changes for the Harbinger crew holograms into the Admiralty Mod Redux when I get that sorted in the next month or two. There are still some minor glitches caused by overlapping geometry within the same mesh, like when the head tilts down and you see through the chin to the neck, but I can't see any way of resolving that. Around 95% clean is probably about as good as it is going to get. 4 Quote Share this post Link to post Share on other sites
JCarter426 1,220 Posted December 29, 2017 Interesting. Very interesting. I still maintain there was no reason for Carth and Cede to be that different (your edits aside) since they have the same object names and supermodel structure and such so why would the hierarchies be different? But clearly they were different so whatever. Weird game. Weird problem, weird models, weird game. As for other holograms in the game, there's Goto, but I don't recall him having this problem. There's also the reporter on Onderon, and the Twi'lek dancers there as well. And the Sith officer on Dxun. I feel like there must be more incidental ones I'm forgetting. Oh, and also Bastila. I'm definitely forgetting some. Quote Share this post Link to post Share on other sites
DarthParametric 3,795 Posted December 29, 2017 I still maintain there was no reason for Carth and Cede to be that different (your edits aside) since they have the same object names and supermodel structure and such so why would the hierarchies be different? But clearly they were different so whatever. These were my custom models. The different hierarchies were a result of me swapping bits around, linking and unlinking to the base. By chance it ended up with Carth's having the meshes at the top of the hierarchy. It would appear the game is rendering transparent meshes strictly in the order they appear in the model's hierarchy. A quick Google would suggest that this is a legacy of the way the OpenGL Z buffer works. The fact that neither Bioware or Obsidian implemented a fix for rendering multiple overlapping transparent meshes actually works in our favour in this instance, as we can use that to occlude the troublesome interior meshes like the eyeballs and mouthbox. Ironically if they did have the renderer working "properly" then the holograms would presumably be irredeemably bug-eyed. Quote Share this post Link to post Share on other sites
Malkior 476 Posted December 29, 2017 Wow! I would never have figured this out on my own, it seems. Thank you so much for doing the extra research, guys. As far as a few extra holograms that stand out, the female Peragus Medical Officer is nearly the worst aside from Canderous (In the message T3 plays on the Ebon Hawk) and maybe Coorta. I haven't checked the Dock Officer yet, as I'm using the VP Tweak, but he might also be messed up. For such a prominent effect, there really aren't that many after Peragus.. Quote Share this post Link to post Share on other sites
JCarter426 1,220 Posted December 29, 2017 These were my custom models. The different hierarchies were a result of me swapping bits around, linking and unlinking to the base. By chance it ended up with Carth's having the meshes at the top of the hierarchy. It's not just your edits though. It's more of a problem on some models than others, even without mods. Carth's eyes were already fine, and only his mouth was problematic, whereas other models have everything wrong with them. I suspect it's the same case with the rest - by chance the hierarchies are arranged nicely for some but not others. Strange. It would appear the game is rendering transparent meshes strictly in the order they appear in the model's hierarchy. A quick Google would suggest that this is a legacy of the way the OpenGL Z buffer works. The fact that neither Bioware or Obsidian implemented a fix for rendering multiple overlapping transparent meshes actually works in our favour in this instance, as we can use that to occlude the troublesome interior meshes like the eyeballs and mouthbox. Ironically if they did have the renderer working "properly" then the holograms would presumably be irredeemably bug-eyed. That's funny. I guess that makes sense, in its own nonsensical way. And I bet that explains other issues we've noticed like windows blocking out characters when they shouldn't - again it probably has to do with the order in which the models are drawn. Quote Share this post Link to post Share on other sites
DarthParametric 3,795 Posted December 29, 2017 Yes, it's all about how they calculate the depth buffer. It's not taking into account mesh transparency, which works in our favour in this case, but against us for windows, kolto tanks, etc. Although even then, the renderer should be working purely based on position of polys in the frame, not order of meshes in the model hierarchy. As with many other cases, perhaps this was some workaround to deal with the limitations of the original Xbox. Edit: So here's a first pass at a list of potential hologram replacements. Ones that use unique appearances are only listed once Revised. Listed all occurrences now. Bastila seems like she may need a LS and a DS version. The admirals I have already done the models for and have an installer in place. The ones with unique appearances could most easily be done as simple appearance.2da overrides. Ones like the Republic crew on the Harbinger will probably require custom entries to minimise clashes with other mods, and that might be best for some of the uniques as well, like the Jedi masters. Edit 2: And because you can never have too many spreadsheets, here's a refined model list: I think I will start with just head adjustments, as being simple model overrides they are the quickest and easiest to test. And also the most compatible with other mods. Pre-existing full body models can also be done. After that, it will probably require some in-game testing to determine if certain individuals require the full body treatment, or whether they can get away with just a tweaked head. Quote Share this post Link to post Share on other sites
JCarter426 1,220 Posted December 30, 2017 Sounds like a plan. I just remembered there's also Visquis. I'd be interested in doing a few if only to learn the procedure for future reference. From your screenshot I can guess how you broke up the face so certain elements will be obscured by the head object (mouth, nostrils, etc) but I'm not sure what the method for changing the hierarchy is. Do you just unlink it from the base and then relink it in the order you want? Or do you change it in MDLEdit after export? I don't see any means of doing it in there. I'm sure it could be done by editing the ASCII in Notepad, but I'm hoping that's not the answer. Quote Share this post Link to post Share on other sites
DarthParametric 3,795 Posted December 30, 2017 I did it in Max and re-exported an ASCII. You could do it in a text editor if you were a masochist I guess. For somebody coding-inclined, the hierarchy component at least could be automated, but there's really no practical way to separate out the mouthbox without doing that in a 3D app anyway, so that is kind of moot. As you said, I just unlink everything from the base and then relink in the appropriate order. Here's the hierarchy of a rehash of comm_b_f I am trying: I think splitting out the nostrils and eye sockets is probably unnecessary based on my tests with the Harbinger's captain, but I will ascertain with further tests. Seeing as the mouthbox is always broken out into separate UV space, and the model will be split by UV islands, breaking out the mouthbox should generally be trivial. Clone the head mesh, select the Element sub-mode, pick the mouthbox and delete/invert selection and delete as appropriate. Quote Share this post Link to post Share on other sites
JCarter426 1,220 Posted December 30, 2017 Got it. I'll knock a few off your plate when I get a chance then. I've been in the process of updating my old heads resource so applying this there would probably be a good idea too, saves future annoyance. Quote Share this post Link to post Share on other sites
DarthParametric 3,795 Posted December 30, 2017 I'm working on some of the Republic heads for the Harbinger holos. I created a new female officer, as I never liked the dinky little cap the officers wear: I made a tweaked version of the admiral's cap, with rank bars of 2 (lieutenant) and 4 (captain) pips. It seems like pale skinned characters don't suffer as much with the transparency issues, I assume because the texture is acting in some sort of blending mode, which is bad news for dark skinned characters. Here's the revised variant of Comm_B_F for the Republic doctor: Seems like she'll need a full body model to avoid the neckline transparency. Can I make use of your new revised Republic female bodies for that JC? 1 Quote Share this post Link to post Share on other sites
bead-v 251 Posted December 30, 2017 As you said, I just unlink everything from the base and then relink in the appropriate order. Here's the hierarchy of a rehash of comm_b_f I am trying: Btw, there is an Order Children tool in kmax, a leftover from nwmax, that is capable of doing this and is maybe a little less tedious Quote Share this post Link to post Share on other sites
DarthParametric 3,795 Posted December 30, 2017 Yeah, I've tried it before. It tends to flip out with any sort of mass migration. It's just less hassle to do it via relinking. Quote Share this post Link to post Share on other sites
JCarter426 1,220 Posted December 30, 2017 Can I make use of your new revised Republic female bodies for that JC? Sure, no problem. Quote Share this post Link to post Share on other sites
DarthParametric 3,795 Posted December 30, 2017 Sure, no problem. Cheers. Btw I noticed in TSL at least that the female officer body (N_RepOff_F) has exactly the same UV layout as the male officer (N_RepOff), but for some reason uses a 256x256 texture (N_RepOff_F01) instead of the male's 512x512 one (N_RepOff01). A simple appearance.2da patch you could add to your mod perhaps. I'll switch it for the full body versions I am doing. Quote Share this post Link to post Share on other sites
bead-v 251 Posted December 30, 2017 Here's a quickfix for the Order Children problem. kx_orderchildren.zip Quote Share this post Link to post Share on other sites
JCarter426 1,220 Posted December 30, 2017 Btw I noticed in TSL at least that the female officer body (N_RepOff_F) has exactly the same UV layout as the male officer (N_RepOff), but for some reason uses a 256x256 texture (N_RepOff_F01) instead of the male's 512x512 one (N_RepOff01). A simple appearance.2da patch you could add to your mod perhaps. I'll switch it for the full body versions I am doing. Yeah, I actually implemented that in an old mod a looooong time ago, and I was planning to get around to it once I update that. The update would also edit appearance.2da so the mod would not have to rely on a texture rename, making it more compatible with other mods. Just haven't felt like messing with TSLPatcher yet. Been lazy. Quote Share this post Link to post Share on other sites
DarthParametric 3,795 Posted December 30, 2017 Been lazy. ; =====================================================[v1.0.5b1]==== ; TSLPATCHER - GENERATED MODIFICATIONS FILE (30/12/2017) ; =================================================================== ; This file is automatically generated and as such has no formatting ; to speak of. You can insert blank lines between sections (but NOT ; between keys within a section!) and add comment lines starting ; with semicolon to make it more readable without breaking anything. ; ------------------------------------------------------------------- [Settings] FileExists=1 WindowCaption=[TSL] Female Republic Officer Texture Patch - Lazy Boy Edition ConfirmMessage=N/A LogLevel=3 InstallerMode=1 BackupFiles=1 PlaintextLog=0 LookupGameFolder=0 LookupGameNumber=2 SaveProcessedScripts=0 [TLKList] [InstallList] [2DAList] Table0=appearance.2da [GFFList] [CompileList] [SSFList] ; =================================================================== [appearance.2da] ChangeRow0=appearance_mod_republic_officer_fem_black_0 ChangeRow1=appearance_mod_republic_officer_fem_old_asian_0 ChangeRow2=appearance_mod_republic_officer_fem_old_white_0 ChangeRow3=appearance_mod_republic_officer_fem_old_black_0 ChangeRow4=appearance_mod_republic_officer_fem_white_0 [appearance_mod_republic_officer_fem_black_0] RowIndex=360 texa=N_RepOff texb=N_RepOff texc=N_RepOff texd=N_RepOff texe=N_RepOff texf=N_RepOff texg=N_RepOff texh=N_RepOff texi=N_RepOff texk=N_RepOff texm=N_RepOff texn=N_RepOff [appearance_mod_republic_officer_fem_old_asian_0] RowIndex=361 texa=N_RepOff texb=N_RepOff texc=N_RepOff texd=N_RepOff texe=N_RepOff texf=N_RepOff texg=N_RepOff texh=N_RepOff texi=N_RepOff texk=N_RepOff texm=N_RepOff texn=N_RepOff [appearance_mod_republic_officer_fem_old_white_0] RowIndex=362 texa=N_RepOff texb=N_RepOff texc=N_RepOff texd=N_RepOff texe=N_RepOff texf=N_RepOff texg=N_RepOff texh=N_RepOff texi=N_RepOff texk=N_RepOff texm=N_RepOff texn=N_RepOff [appearance_mod_republic_officer_fem_old_black_0] RowIndex=363 texa=N_RepOff texb=N_RepOff texc=N_RepOff texd=N_RepOff texe=N_RepOff texf=N_RepOff texg=N_RepOff texh=N_RepOff texi=N_RepOff texk=N_RepOff texm=N_RepOff texn=N_RepOff [appearance_mod_republic_officer_fem_white_0] RowIndex=367 texa=N_RepOff texb=N_RepOff texc=N_RepOff texd=N_RepOff texe=N_RepOff texf=N_RepOff texg=N_RepOff texh=N_RepOff texi=N_RepOff texk=N_RepOff texm=N_RepOff texn=N_RepOff 1 Quote Share this post Link to post Share on other sites
JCarter426 1,220 Posted December 30, 2017 Hah, there's actually more I'd have to do but that'll certainly save lazy JC some time, thanks. Quote Share this post Link to post Share on other sites