Change a models texture live

Discuss modding questions and implementation details.
User avatar
Ralzar
Posts: 2211
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: Change a models texture live

Post by Ralzar »

BadLuckBurt wrote: Sun Jul 10, 2022 4:29 pm I bet if you have a separate model with the lava texture and instantiate that, it just works.
Yup, seems likely. I am aware I am going in and grabbing code at a point DFU is not expecting anything to change. At the moment it is not all that important to figure out, but I figured when we were already looking at switching the textures it was a good idea to figure this out as well.

I will give your code a shot. Thanks again.

User avatar
BadLuckBurt
Posts: 948
Joined: Sun Nov 05, 2017 8:30 pm

Re: Change a models texture live

Post by BadLuckBurt »

Ralzar wrote: Sun Jul 10, 2022 5:09 pm Yup, seems likely. I am aware I am going in and grabbing code at a point DFU is not expecting anything to change. At the moment it is not all that important to figure out, but I figured when we were already looking at switching the textures it was a good idea to figure this out as well.

I will give your code a shot. Thanks again.
It's fine to do the unexpected, those situations show where the DFU layer could possibly use extra helper functions although this case should be covered by my example if I read the code right. It's good to know how this kind of stuff works anyway so yeah, totally agree on figuring this out.
DFU on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt

.

User avatar
Ralzar
Posts: 2211
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: Change a models texture live

Post by Ralzar »

Bingo, worked pretty much out of the box :)

User avatar
BadLuckBurt
Posts: 948
Joined: Sun Nov 05, 2017 8:30 pm

Re: Change a models texture live

Post by BadLuckBurt »

Ralzar wrote: Sun Jul 10, 2022 5:57 pm Bingo, worked pretty much out of the box :)
Nice! Happy texture swapping I guess :D
DFU on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt

.

Post Reply