BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

.gif Textures - a question

3 posters

Go down

.gif Textures - a question Empty .gif Textures - a question

Post by Dexter Thu Apr 20, 2017 8:24 am

Hello everyone,
I have recently played with the textures in my new route a bit and I was thinking about one thing. Is there any way for the sim to utilize a .GIF texture and keep the animation stored in it? If this is a silly question, don't mind me. But it would come in handy in many cases.
Thanks! :-)
Dexter
Dexter

Posts : 2153
Join date : 2011-07-08
Age : 38
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

.gif Textures - a question Empty Re: .gif Textures - a question

Post by Quork Thu Apr 20, 2017 12:25 pm

Only Chris can really answer that, but I'll guess it'll be a "no", since gifs are, for all I know, very inefficient to display.
Quork
Quork

Posts : 1438
Join date : 2012-05-05
Age : 33
Location : Hofheim a.T., Hessen (Hesse), European Union

Back to top Go down

.gif Textures - a question Empty Re: .gif Textures - a question

Post by Dexter Thu Apr 20, 2017 12:29 pm

Well, I know a nice workaround, which will enable me to create what i need, so I should be fine. Just thought I'd ask.
Dexter
Dexter

Posts : 2153
Join date : 2011-07-08
Age : 38
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

.gif Textures - a question Empty Re: .gif Textures - a question

Post by leezer3 Thu Apr 20, 2017 3:43 pm

Definitely not supported, and unlikely to be so.

Nothing to do with inefficiencies per-se, but rather the animation; The engine only supports simple textured polygons, and there's no method for displaying animations/ videos on one.
openBVE should currently load GIF files, but IIRC will only display the first frame of animated gifs.

Your best bet performance wise would be to produce a 'filmstrip' of the animation you wish to display, and use the TextureShiftFunction to move between the frames as appropriate.

leezer3

Posts : 1978
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

.gif Textures - a question Empty Re: .gif Textures - a question

Post by Dexter Thu Apr 20, 2017 6:18 pm

Yep, based on the character of the animation I will have to settle for either texture shifts, or cyclic state changes. Smile
Dexter
Dexter

Posts : 2153
Join date : 2011-07-08
Age : 38
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

.gif Textures - a question Empty Re: .gif Textures - a question

Post by Quork Thu Apr 20, 2017 6:32 pm

IIRC texture shifts are described as by far the most inefficient animation the engine supports at all. State changes should thus be better. Or have you changed this, Chris?
Quork
Quork

Posts : 1438
Join date : 2012-05-05
Age : 33
Location : Hofheim a.T., Hessen (Hesse), European Union

Back to top Go down

.gif Textures - a question Empty Re: .gif Textures - a question

Post by leezer3 Thu Apr 20, 2017 7:37 pm

This is one of those cases where the documentation whilst not 'wrong' per-se, it's rather too simplistic to really be taken at face value.

It's going to depend heavily on the individual object and combination of functions / textures it contains, and for that matter what it actually does within the world.

Essentially speaking, anything using transparency slows performance by a factor of approximately 2.
Similarly, a frame which actually contains a state change within an object is considerably slower than one in which the object state does not change.

The math for texture shifting must always be applied to calculate the final co-ordinates, hence an object using this function will be inherently slower than one which changes state infrequently.
As soon as the state changes become more frequent however, the performance boundary becomes considerably more blurred.

Assuming you haven't got '00s of objects using a texture shift though, I wouldn't be too bothered about it.

leezer3

Posts : 1978
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

.gif Textures - a question Empty Re: .gif Textures - a question

Post by Dexter Thu Apr 20, 2017 7:47 pm

I think that's also when the HW part comes into play. I suppose it's the processing unit on the GPU that does these calculations...? Or is it pre-chewed by the CPU and then finalized at the video card level?
Dexter
Dexter

Posts : 2153
Join date : 2011-07-08
Age : 38
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

.gif Textures - a question Empty Re: .gif Textures - a question

Post by leezer3 Thu Apr 20, 2017 8:04 pm

Dexter wrote:I think that's also when the HW part comes into play. I suppose it's the processing unit on the GPU that does these calculations...? Or is it pre-chewed by the CPU and then finalized at the video card level?

At present, essentially everything is calculated on the CPU.

The GPU speed will have a certain effect, especially if AA / AF are involved, but the CPU is the main bottleneck.

leezer3

Posts : 1978
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

.gif Textures - a question Empty Re: .gif Textures - a question

Post by Dexter Thu Apr 20, 2017 8:13 pm

I see. So I have big redundancy on my GPU. Smile
Is openBVE capable of utilizing multiple threads? I think I always observe two cores of my CPU working much more than the other two when playing.


Last edited by Dexter on Fri Apr 21, 2017 7:13 am; edited 1 time in total (Reason for editing : Questionnable sentence composure.)
Dexter
Dexter

Posts : 2153
Join date : 2011-07-08
Age : 38
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

.gif Textures - a question Empty Re: .gif Textures - a question

Post by leezer3 Thu Apr 20, 2017 9:31 pm

Dexter wrote:I see. So I have big redundancy on my GPU. Smile
Is openBBE capable of utilizing multiple threads? I think I always are two cores of my CPU working much more than the other two when playing.

Mostly not.

My builds make some progress in this area, but not a great deal.

leezer3

Posts : 1978
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

.gif Textures - a question Empty Re: .gif Textures - a question

Post by Dexter Fri Apr 21, 2017 7:14 am

So basically, the biggest factor is the CPU performance in single-threaded mode. That's where Intel should dominate...
Dexter
Dexter

Posts : 2153
Join date : 2011-07-08
Age : 38
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

.gif Textures - a question Empty Re: .gif Textures - a question

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum