SetEmissiveColor or LoadTexture?
2 posters
Page 1 of 1
SetEmissiveColor or LoadTexture?
When I code a train's interior, I used to use this code to make the the texture the same despite brightness levels
It was only later that I started using the following:
Both had the same effect visually, by my question is, is there any performance differences (in terms of framerates) between both?
- Code:
LoadTexture, texture.png, texture.png
It was only later that I started using the following:
- Code:
LoadTexture, texture.png
SetEmissiveColor,255,255,255
Both had the same effect visually, by my question is, is there any performance differences (in terms of framerates) between both?
Re: SetEmissiveColor or LoadTexture?
SetEmissiveColor is appropriate for solid faces. You find if you use it on a texture the whole texture takes on the emissive color as defined.
It is always more costly in terms of framerates to use a texture.
Have you tried both options above to see if there's a noticeable difference in fps? If none is detected you need not worry.
It is always more costly in terms of framerates to use a texture.
Have you tried both options above to see if there's a noticeable difference in fps? If none is detected you need not worry.
Re: SetEmissiveColor or LoadTexture?
.
Last edited by lonelyinardwick on Wed May 13, 2020 3:48 am; edited 1 time in total
Guest- Guest
Re: SetEmissiveColor or LoadTexture?
...and the results are in!
In each of the tests, I have used a full-coloured non-alpha PNG applied onto 2000 faces.
Apparently there are performance differences, but it's not large enough to justify spending time to pore through codes changing NighttimeImage to use SetEmissiveColor.
In each of the tests, I have used a full-coloured non-alpha PNG applied onto 2000 faces.
Apparently there are performance differences, but it's not large enough to justify spending time to pore through codes changing NighttimeImage to use SetEmissiveColor.
Re: SetEmissiveColor or LoadTexture?
What is most relevant in those results is the evidence that the use of textures not scaled to >2 has on your frame rates. Although the 1000x1000 textures will actually be a smaller file size than the 1024x1024 ones, their effect on the renderer is clearly to slow it down.
Nighttime image will obviously impact on fps because there are two files loaded instead of normally one.
EmissiveColor is generally only suitable for solid faces, not for textures (with the exception of "glows") . Any use of textures brings a responsibility to optimise size and consider using index color even, to give the best performance. Many add-ons are deficient in this respect and waste resources to the point where the performance of the route is degraded. The best thing to do with such add-ons is to convert them to "take-offs".
Nighttime image will obviously impact on fps because there are two files loaded instead of normally one.
EmissiveColor is generally only suitable for solid faces, not for textures (with the exception of "glows") . Any use of textures brings a responsibility to optimise size and consider using index color even, to give the best performance. Many add-ons are deficient in this respect and waste resources to the point where the performance of the route is degraded. The best thing to do with such add-ons is to convert them to "take-offs".
Re: SetEmissiveColor or LoadTexture?
To illustrate the uses of such a command on a texture, this is how it is used in my C751A add-on. As you can see, all faces in the train's interior has to remain lighted while the train undergoes different environmental brightness changes, hence the need for SetEmissiveColor.
Edit: and a blog post about it: http://joeyfoo.wordpress.com/2011/10/11/openbve-development-nighttimeimage-v-setemissivecolor-why-to-avoid-non-standard-texture-sizes/
Edit: and a blog post about it: http://joeyfoo.wordpress.com/2011/10/11/openbve-development-nighttimeimage-v-setemissivecolor-why-to-avoid-non-standard-texture-sizes/
Re: SetEmissiveColor or LoadTexture?
Looks like we've gone from a driver simulator to a passenger simulator
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|