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

Abnormally low fps with .b3d models compared to .s

2 posters

Go down

Abnormally low fps with .b3d models compared to .s Empty Abnormally low fps with .b3d models compared to .s

Post by Delsin Tue May 25, 2021 3:08 am

I tried using MSTS .s models and some car parts appeared oddly flipped. Problem was solved by converting them to b3d, but this has dropped performance to unplayable levels while exactly the same models in .s worked fine. Normally it's the other way round and fps difference is nowhere as drastic.

Train https://www.dropbox.com/s/wc907wlqt139wjy/%D0%AD%D0%A02.7z?dl=0
(comes with 2 .animated file sets in train/msts/, one uses converted models, another - original .s to make testing easier. Set to converted models by default)
Delsin
Delsin

Posts : 294
Join date : 2016-08-20

Back to top Go down

Abnormally low fps with .b3d models compared to .s Empty Re: Abnormally low fps with .b3d models compared to .s

Post by leezer3 Wed Jun 02, 2021 5:40 pm

It's something in your conversion doing it. I can't easily see what unfortunately.

First file:
MSTS .s
1 opaque face
12490 alpha faces
------------------
12491 total faces

B3D
288 opaque faces
14522 alpha faces
------------------
14810 total faces

The b3d has ~20% more faces, which are essentially all alpha faces, hence why it's always going to be slower.

Will try and take a look at the misplaced bits though, must be a wrong matrix multiplication somewhere causing that one.

leezer3

Posts : 1802
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Abnormally low fps with .b3d models compared to .s Empty Re: Abnormally low fps with .b3d models compared to .s

Post by leezer3 Wed Jun 02, 2021 6:02 pm

Fixed most of the glitched positioning. (I unfortunately now understand somewhat more about matricies than a few years ago Razz )

There's still a small part of the underframe floating around which I can't immediately trace, but the doors and cab are now in place and correct with the MSTS files.

leezer3

Posts : 1802
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Abnormally low fps with .b3d models compared to .s Empty Re: Abnormally low fps with .b3d models compared to .s

Post by Delsin Wed Jun 02, 2021 6:09 pm

Thanks, will test it. Not sure what caused face count difference, didn't do any modifications, will look

Think I reported the displaced .s parts some time ago btw.
Delsin
Delsin

Posts : 294
Join date : 2016-08-20

Back to top Go down

Abnormally low fps with .b3d models compared to .s Empty Re: Abnormally low fps with .b3d models compared to .s

Post by leezer3 Wed Jun 02, 2021 6:19 pm

Very possibly true I'm afraid Smile
If I forget something, feel free to poke me a few times though. I've got all sorts of half complete or broken stuff I keep meaning to get back to, and it's really easy to forget one little bug.

leezer3

Posts : 1802
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Abnormally low fps with .b3d models compared to .s Empty Re: Abnormally low fps with .b3d models compared to .s

Post by Delsin Sun Jul 25, 2021 7:29 pm

So I played around with another model and think I found why there's so many alpha faces coming up after conversion.
I used a traincar with everything textured with 1 image, including glass, and since all faces used a texture with some parts semi-transparent, Openbve treated them all as alpha faces which created lots of lag. When I converted the texture to non-transparent 24-bit png, performance improved dramatically.
So as long as texture has any alpha bits, a face is treated as transparent even if it isn't. This isn't something to fix probably, just a thing to consider when adapting models for Openbve - make sure opaque and alpha parts use separate textures.

Still doesn't explain extra faces added by the conversion though Question
(my best guess - some step in the conversion process triangulates a few, which also adds to the alpha face disaster probably)
Delsin
Delsin

Posts : 294
Join date : 2016-08-20

Back to top Go down

Abnormally low fps with .b3d models compared to .s Empty Re: Abnormally low fps with .b3d models compared to .s

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


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