How to switch the whole texture in real time?
For example, there are two kinds of external texture of an airplane model, one is normal and the other is icing, and it needs to be switched in real time, how can I do it?
Real-time texture switching
-
- Lockheed Martin
- Posts: 1207
- Joined: Tue Sep 25, 2012 2:34 pm
Re: Real-time texture switching
Hi pine-nut,
There are a couple options. One option would be to use a material script to change the texture:
https://prepar3d.com/SDKv6/sdk/modeling ... lScripting
https://prepar3d.com/SDKv6/sdk/referenc ... ables.html
You could also use visibility scripts to turn a part on or off. For this to work, you would need to model the part twice with different materials and script them on/off separately:
https://prepar3d.com/SDKv6/sdk/modeling ... ity%20Tags
Regards,
Clifton
There are a couple options. One option would be to use a material script to change the texture:
https://prepar3d.com/SDKv6/sdk/modeling ... lScripting
https://prepar3d.com/SDKv6/sdk/referenc ... ables.html
You could also use visibility scripts to turn a part on or off. For this to work, you would need to model the part twice with different materials and script them on/off separately:
https://prepar3d.com/SDKv6/sdk/modeling ... ity%20Tags
Regards,
Clifton
Clifton Crane
Prepar3D® Software Engineer Sr.
Prepar3D® Software Engineer Sr.
Re: Real-time texture switching
Thanks a lot!Clifton Crane wrote: ↑Fri Jan 26, 2024 12:46 pm Hi pine-nut,
There are a couple options. One option would be to use a material script to change the texture:
https://prepar3d.com/SDKv6/sdk/modeling ... lScripting
https://prepar3d.com/SDKv6/sdk/referenc ... ables.html
You could also use visibility scripts to turn a part on or off. For this to work, you would need to model the part twice with different materials and script them on/off separately:
https://prepar3d.com/SDKv6/sdk/modeling ... ity%20Tags
Regards,
Clifton