Russell Posted January 25, 2023 Share Posted January 25, 2023 I have lost a *.PSD (corrupted file) that I used to generate and change the hair texture of some models. And unfortunately I don't keep the exported PNG to try to recover a provisional version. Is there any way to convert a *.TEX file with transparency from Leadwerks into a PNG also with transparency? I want change a blonde hair to red one, but without the psd with the texturemap i can't do it... Thank you in advance 🙂🙂🙂🙂 Quote Link to comment Share on other sites More sharing options...
Solution Josh Posted January 25, 2023 Solution Share Posted January 25, 2023 Yes, just call LoadPixmap and then use the Save() method to save in PNG. You'll need to load the FreeImage texture loader plugin for saving PNG files. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Russell Posted January 25, 2023 Author Share Posted January 25, 2023 1 minute ago, Josh said: Yes, just call LoadPixmap and then use the Save() method to save in PNG. You'll need to load the FreeImage texture loader plugin for saving PNG files. Many thanks, i will try this... Quote Link to comment Share on other sites More sharing options...
Josh Posted January 25, 2023 Share Posted January 25, 2023 That answer is using the Ultra Engine API, btw. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Russell Posted January 25, 2023 Author Share Posted January 25, 2023 2 minutes ago, Josh said: That answer is using the Ultra Engine API, btw. Ok, so I don't know how to use it in Leadwerks... That's where I have the TEX file that I would need to convert back to PNG. Quote Link to comment Share on other sites More sharing options...
reepblue Posted January 25, 2023 Share Posted January 25, 2023 47 minutes ago, Josh said: Yes, just call LoadPixmap and then use the Save() method to save in PNG. You'll need to load the FreeImage texture loader plugin for saving PNG files. Actually, I tried to both compile and decompile a Leadwerks texture with the Ultra API 2 weeks ago and I couldn't get it to work. DDS worked fine so I assumed you didn't allow this to avoid competition with the standard Leadwerks tools. I would need to write an example to demonstrate this. 1 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Josh Posted January 25, 2023 Share Posted January 25, 2023 Loading a tex file as a pixmap and saving as another format should work fine. Ultra does not save .tex files, but I figured people would probably want to convert their tex files into DDS or another format. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
reepblue Posted January 25, 2023 Share Posted January 25, 2023 I'll try this again and it back to you. I was trying to convert it to a tga, maybe that was my issue. 1 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Genebris Posted January 25, 2023 Share Posted January 25, 2023 You could display the texture on screen in Leadwerks and screenshot it. Then make a shader that outputs alpha as black and and white and screenshot that as well 🙃 1 Quote Link to comment Share on other sites More sharing options...
Russell Posted January 25, 2023 Author Share Posted January 25, 2023 3 hours ago, Genebris said: You could display the texture on screen in Leadwerks and screenshot it. Then make a shader that outputs alpha as black and and white and screenshot that as well 🙃 Yes, i have used this solution to solve my problem. And although it has worked for me. But I have lost quality in the character's hair. Since my original corrupted PSD was somewhat larger in resolution than the screenshot of my screen in FHD. Anyway, I'm going to keep trying reepblue and Josh solutions, because TEX file has the original resolution i need to recover (larger than the screenshot). Thank you so much team. Quote Link to comment Share on other sites More sharing options...
Genebris Posted January 25, 2023 Share Posted January 25, 2023 I think you can also rip texture from memory with RenderDoc 1 Quote Link to comment Share on other sites More sharing options...
Russell Posted January 25, 2023 Author Share Posted January 25, 2023 44 minutes ago, Genebris said: I think you can also rip texture from memory with RenderDoc Interesting program... I'll check it, but for now with the screenshot (even if i have lost several quality in the texture) It has worked for me as a temporary solution. Many thanks Genebris. Quote Link to comment Share on other sites More sharing options...
reepblue Posted January 26, 2023 Share Posted January 26, 2023 When this bug gets fixed, we can easily solve Russell's problem. 1 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Josh Posted January 26, 2023 Share Posted January 26, 2023 An update is available that fixes this. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
reepblue Posted January 26, 2023 Share Posted January 26, 2023 Awesome, I'll compile an app so people like Russell can use it. It's just a F7 key press away. 1 1 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Russell Posted January 29, 2023 Author Share Posted January 29, 2023 On 1/26/2023 at 4:19 PM, reepblue said: Awesome, I'll compile an app so people like Russell can use it. It's just a F7 key press away. Hahahahahha, many thanks!! Quote Link to comment Share on other sites More sharing options...
reepblue Posted January 29, 2023 Share Posted January 29, 2023 This should do it. It'll convert the texture (Both dds and tex) to a tga file. Just drag and drop, tex2tga.zip 1 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Russell Posted January 29, 2023 Author Share Posted January 29, 2023 Thank you so much!! At first it gave me an error from old versions of Vulkan libraries on my computer. But I have solved it without problem and it has executed very well. Again many many thanks!! Quote Link to comment Share on other sites More sharing options...
reepblue Posted January 29, 2023 Share Posted January 29, 2023 Not sure why it needed to call Vulkan, but I'm glad I was able to help. 1 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.