Jorak Uln 458 Posted May 15, 2017 Hi there, im searching for the small dot texture(which i marked with a red arrow) which is switching on/off on the larger texture of the Ebon Hawk Panel LEH_scre02: Its really annoying for texturing and i want to make it invisible. Im grateful for any help - does someone know the texture name? Thank you in advance! Quote Share this post Link to post Share on other sites
djh269 264 Posted May 15, 2017 leh_greysmall.tga? Here's a list of all the texture files for ebo_m12aa.mod: 1 Quote Share this post Link to post Share on other sites
DarthParametric 3,777 Posted May 15, 2017 The squares are additional meshes with animated self-illum. The two main side panel meshes are hologlow01 and hologril01, with the top panel main mesh being mcholmach02. You then have 5 other meshes spread across the panels: Mesh27, Mesh30, Mesh117, Mesh118, Object181. They all share the same texture, LEH_scre02, they just have their self-illum values keyed to cycle between black and white. For example: node dummy Mesh27 parent M12aa_01fa selfillumcolorkey 0 0 0 0 0.266667008399963 1 1 1 0.533333003520966 0 0 0 0.766667008399963 1 1 1 1.03332996368408 0 0 0 1.29999995231628 1 1 1 1.56666994094849 0 0 0 1.79999995231628 1 1 1 2.09999990463257 0 0 0 2.40000009536743 1 1 1 2.70000004768372 0 0 0 2.96667003631592 1 1 1 3.2666699886322 0 0 0 endlist endnodeYour problem isn't a texture issue, it's a mesh issue. You'll need to hex edit all the relevant level models and set the render flags for those 5 meshes to 0. 1 Quote Share this post Link to post Share on other sites
Jorak Uln 458 Posted May 15, 2017 The squares are additional meshes with animated self-illum. The two main side panel meshes are hologlow01 and hologril01, with the top panel main mesh being mcholmach02. You then have 5 other meshes spread across the panels: Mesh27, Mesh30, Mesh117, Mesh118, Object181. They all share the same texture, LEH_scre02, they just have their self-illum values keyed to cycle between black and white. For example: node dummy Mesh27 parent M12aa_01fa selfillumcolorkey 0 0 0 0 0.266667008399963 1 1 1 0.533333003520966 0 0 0 0.766667008399963 1 1 1 1.03332996368408 0 0 0 1.29999995231628 1 1 1 1.56666994094849 0 0 0 1.79999995231628 1 1 1 2.09999990463257 0 0 0 2.40000009536743 1 1 1 2.70000004768372 0 0 0 2.96667003631592 1 1 1 3.2666699886322 0 0 0 endlist endnodeYour problem isn't a texture issue, it's a mesh issue. You'll need to hex edit all the relevant level models and set the render flags for those 5 meshes to 0. wow - i havent expected a solution that soon! Thank you! How can i set those render flags to 0? Havent done hex editing besides renaming files yet.. Quote Share this post Link to post Share on other sites
DarthParametric 3,777 Posted May 16, 2017 First you will need to find the model for the central lounge section of the Ebon Hawk. In this instance I already know it is M12AA_01F. You need to extract the binary model, the MDL/MDX pair, somewhere. Don't convert it to ASCII. Run MDLOps, hit "Select file" and browse to the MDL, set the type to Kotor 1, hit the "Read model" button, then when the output window shows that is complete, hit the "View data" button: You will be presented with a multi panel window (you probably want to maximise it so you can see what you are doing) that shows the model structure on the left, the hex data in the center, and the actual values in decimal on the right. Expand the "nodes" sub-section on the left to see all the individual child objects: We already established previously by looking at the model in Max that the meshes we are interested in are named Mesh27, Mesh30, Mesh117, Mesh118, and Object181, so find those in the list: Now if you expand one of those, let's start with first in the list Mesh118, and click on "subhead", you'll see some data populate the center and righthand panels. Scroll down to the bottom of the righthand panel. I know from past experience that the value for an enabled render flag is 256, which we can see towards the bottom there. For more info on the structure of a model, check out Chuck Chargin's model data table. Now this particular instance is easy, because that is the only value of 256 present. However, the shadow flag also has a value of 256 when enabled, but in this case shadows are disabled, so we don't have to worry about that. But for the record, the render flag should be after the shadow flag. With the target value identified, we need to find the hex value for it so that we can change the value. If you look on the righthand panel, you can see there are five values that follow the render flag value: 0, 0.0199781320989132, 0, 848320, 701705. If we look at the last 4 bytes of data, we see that is 09 B5 0A 00. If we convert that to an integer, we get 162859520, which obviously doesn't correspond to anything. However, KOTOR models are in little endian byte order. Basically what that means is for a 4 byte chunk ABCD, the data is actually stored backwards as DCBA. That means in this case we reverse our chunk to 00 0A B5 09. If you convert this to an integer you get 701705, which is the last value listed in the righthand panel. We can continue working backwards in this manner. 848320 is the 4 bytes C0 F1 0C 00 (00 0C F1 C0), 0 is 4 bytes 00 00 00 00. When we get to 0.0199781320989132, we need to deal with a float rather than an integer, so need a different converter (here's one). This is the 4 bytes 2E A9 A3 3C (3C A3 A9 2E). Now we have the 4 bytes 00 01 00 00, which we know from the righthand panel must comprise two values, our render flag 256 and 0. A conversion tells us 256 in hex is 01 00, which if we reverse is 00 01. So we know the first 2 bytes of that 00 01 00 00 chunk is our render flag. Now we can't just search for a 2 byte chunk 00 01 in a hex editor, there are over 2,700 instances of that in this file. We need that unqiue instance, so we include the surrounding bytes. If we search for the string 00 01 00 00 2E A9 A3 3C 00 00 00 00 C0 F1 0C 00 09 B5 0A 00 then we find a single instance. If we compare the preceeding bytes, we can see they also match what we see in the MDLOps data viewer. Knowing that, we can do a search and replace. We replace 00 01 00 00 2E A9 A3 3C 00 00 00 00 C0 F1 0C 00 09 B5 0A 00 with 00 00 00 00 2E A9 A3 3C 00 00 00 00 C0 F1 0C 00 09 B5 0A 00 which will change the render flag from 00 01 to 00 00, thus setting it to off. Now you just need to do that for all four remaining meshes. To save you some time, here are the search and replace strings you need: Mesh117: 00 01 E6 3D 6A 08 AF 3C 00 00 00 00 80 FD 0C 00 AB C1 0A 00 00 00 E6 3D 6A 08 AF 3C 00 00 00 00 80 FD 0C 00 AB C1 0A 00 Object181: 00 01 00 00 43 F3 2B 3C 00 00 00 00 60 10 0D 00 A9 D7 0A 00 00 00 00 00 43 F3 2B 3C 00 00 00 00 60 10 0D 00 A9 D7 0A 00 Mesh27: 00 01 36 00 1A 7D E5 3C 00 00 00 00 80 21 0D 00 CF EF 0A 00 00 00 36 00 1A 7D E5 3C 00 00 00 00 80 21 0D 00 CF EF 0A 00 Mesh30: 00 01 00 00 2D 7A D4 3C 00 00 00 00 C0 26 0D 00 BB F6 0A 00 00 00 00 00 2D 7A D4 3C 00 00 00 00 C0 26 0D 00 BB F6 0A 00 With all the edits done, you should get something like this: 5 Quote Share this post Link to post Share on other sites
bead-v 251 Posted May 16, 2017 Seriously DarthParametric, are you aiming for some kind of community award that I am unaware about? Here's a BIG thank you on behalf of the community for helping so many people with their issues of all kinds! You really deserve some kind of medal... 4 Quote Share this post Link to post Share on other sites
Kexikus 994 Posted May 16, 2017 You could probably fill dozens of tutorials with The help DarthParametric has given in all these threads. That might actually be a good idea just to collect all of that Information in one place. 2 Quote Share this post Link to post Share on other sites
Sith Holocron 2,473 Posted May 16, 2017 You could probably fill dozens of tutorials with The help DarthParametric has given in all these threads. Feel free to make tutorials and quote where necessary. If DP wishes to do himself, he welcome to do that. Knowledge is power. Quote Share this post Link to post Share on other sites
Jorak Uln 458 Posted May 16, 2017 @Darth Parametric: Im grateful for your phenomenal helping effort you show us every time without any hesitation! Thank you! I'll try it out as soon as i can. This tweak is really a big step forward making texturing those elements worthwile. --------------------------------------------------------------------------------------------------------------------------------------------------- EDIT: i tried out with setting "0" = OFF, but then unfortunately the edited areas appear as "holes": since the finsihed texture will be not black like in vanilla but grey metallic that holes are quite sore on the eye: Now, when i return the setting to default 1 in the mdl, the dots obviously animate again - but there is a moment where they completely appear same colored like the background texture: is it possible to set the animation to "off" at this point - to have the texture always looking like in the last pic? Quote Share this post Link to post Share on other sites
DarthParametric 3,777 Posted May 17, 2017 Whoops. That was an oversight on my part. I only did a cursory check. I thought the illuminated meshes were laying over the top, so didn't notice the gaps. Sorry about that. To fix it, we have to tackle it a different way. We'll need to edit the keyframe data for the animations to stop the self-illumination cycling. Start by decompiling the M12AA_01F model and open the ASCII output in a text editor. Search for the term "newanim" and you'll be taken down to the bottom of the file where the animation data is. Browsing through it, there are 11 meshes with animated self-illum, Mesh118, Mesh117, Object178, Object179, Object180, Object181, Object182, Object183, Mesh27, Mesh30, and Object189 (all children of dummy object M12AA_01FA). Looking at the model in Max, we can ignore Object189 as that is a light strip. There's also an AuroraLight with keyed colour, which we don't need to worry about. Of the 10 remaining meshes, there's the five in the center holoprojector I covered in the previous post, and the rest are scattered around the walls of the room. I assume that you will also want to edit these this time. The base static control panel meshes have their self-illum set to white, so we'll need to edit these blinking meshes so they have their self-illum always set to white as well. Open the binary model in the MDLOps data viewer. This time, we'll be looking in a different section, under Animations. If you expand the "animloop1" node, then under "nodes" you'll find the data for the individual objects: If we refer back to the ASCII file, we'll see the keyframe data for the first object, Mesh118: node dummy Mesh118 parent M12aa_01fa selfillumcolorkey 0 1 1 1 0.300000011920929 0 0 0 0.633333027362823 1 1 1 0.933332979679108 0 0 0 1.2333300113678 1 1 1 1.5 0 0 0 1.7666699886322 1 1 1 2 0 0 0 2.29999995231628 1 1 1 2.59999990463257 0 0 0 2.93333005905151 1 1 1 3.2666699886322 1 1 1 endlist endnode What we see here are 12 keyframes that are switching the value for self-illum between black (0 0 0) and white (1 1 1), which is how you get the lights blinking on and off. If we expand the node for Mesh118 in the Data Viewer and select "controllerdata" we see the following: In the right panel we can see it's pretty obvious our keyframe data comprises the values from 012 to 047. Looking at the hex, it's clear that 1 1 1 is 00 00 80 3F 00 00 80 3F 00 00 80 3F and 0 0 0 is 00 00 00 00 00 00 00 00 00 00 00 00. If we do a search for the entire keyframe chunk in a hex editor: 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F we only find a single instance: So we can replace it with data to change every keyframe to 1 1 1, like so: 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F Mesh117 only has two keyframes, so we need to search for the entire controller data chunk: 00 00 00 00 1F 11 51 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F Which again we find a single instance of, right below the chunk we just edited: We can replace that with: 00 00 00 00 1F 11 51 40 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F Repeat for the remaining objects. For Object178 you'll want to add the hex values from the "controllers" chunk as well to give you enough to work with. Note that this is identical to the data for Object180, so you can replace both in one go. Here are the search and replace hex chunks: Object178 & Object 180 (i.e. 2 occurrences, replace both): 64 00 00 00 FF FF 03 00 00 00 03 00 03 00 36 00 00 00 00 00 F5 10 D1 3F 1F 11 51 40 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 64 00 00 00 FF FF 03 00 00 00 03 00 03 00 36 00 00 00 00 00 F5 10 D1 3F 1F 11 51 40 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F Object179: 00 00 00 00 9A 99 99 3E B0 AA 2A 3F A4 88 88 3F 5C 77 B7 3F 8F AA EA 3F 33 33 13 40 1F 11 31 40 1F 11 51 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 9A 99 99 3E B0 AA 2A 3F A4 88 88 3F 5C 77 B7 3F 8F AA EA 3F 33 33 13 40 1F 11 31 40 1F 11 51 40 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F Object181: 00 00 00 00 9A 99 99 3E 9A 99 19 3F 66 66 66 3F 71 55 95 3F 5C 77 B7 3F 9A 99 D9 3F D8 BB FB 3F E1 EE 0E 40 00 00 20 40 1F 11 31 40 14 22 42 40 1F 11 51 40 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 9A 99 99 3E 9A 99 19 3F 66 66 66 3F 71 55 95 3F 5C 77 B7 3F 9A 99 D9 3F D8 BB FB 3F E1 EE 0E 40 00 00 20 40 1F 11 31 40 14 22 42 40 1F 11 51 40 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F Object182: 00 00 00 00 7D 77 77 3F B9 AA 0A 40 1F 11 51 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7D 77 77 3F B9 AA 0A 40 1F 11 51 40 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F Object183: 00 00 00 00 9A 99 99 3E 17 11 11 3F 50 55 55 3F F5 10 91 3F 33 33 B3 3F 71 55 D5 3F 5C 77 F7 3F CD CC 0C 40 00 00 20 40 1F 11 31 40 14 22 42 40 1F 11 51 40 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 9A 99 99 3E 17 11 11 3F 50 55 55 3F F5 10 91 3F 33 33 B3 3F 71 55 D5 3F 5C 77 F7 3F CD CC 0C 40 00 00 20 40 1F 11 31 40 14 22 42 40 1F 11 51 40 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F Mesh27: 00 00 00 00 94 88 88 3E 83 88 08 3F 4A 44 44 3F 28 44 84 3F 66 66 A6 3F A4 88 C8 3F 66 66 E6 3F 66 66 06 40 9A 99 19 40 CD CC 2C 40 EC DD 3D 40 1F 11 51 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 94 88 88 3E 83 88 08 3F 4A 44 44 3F 28 44 84 3F 66 66 A6 3F A4 88 C8 3F 66 66 E6 3F 66 66 06 40 9A 99 19 40 CD CC 2C 40 EC DD 3D 40 1F 11 51 40 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F Mesh30: 00 00 00 00 CD CC 4C 3F 1F 11 11 40 1F 11 51 40 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 00 00 CD CC 4C 3F 1F 11 11 40 1F 11 51 40 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F 00 00 80 3F It should be noted that you may end up with a bit of a halo around these meshes by virtue of the fact that they are physically separate. There's not really anything you can do about that without physically altering the meshes themselves. Hopefully it is less noticeable with a proper texture, but it might be problematic with a pale/light colour. 3 Quote Share this post Link to post Share on other sites