Legacy3d loveliness

Discuss Supermodel and your favorite Model 3 games. Show off your latest threads, this is the place to see and be seen.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

Legacy3d loveliness

Postby rokfpoewrkcpoqwkcp » Mon Mar 29, 2021 6:45 pm

I just wanted to throw some love on the legacy3d engine.
I feel it's been getting a bit of a bad press lately with people referring to it as some sort of second best fall back.
Even the great man himself sounded a little down hearted talking to a Mac user recently,

Bart wrote:(The) Mac unfortunately uses the legacy engine which is hopelessly out of date...

:shock: :(

As an AMD user I live by the legacy3d engine and love the old school slightly pixelated look.
Admittedly the new engine is very beautiful and silky smooth looking, almost making games look like more modern PC titles.
For me though, legacy3d feels more retro and befitting to emulating older games.

Daytona.gif
Daytona.gif (163.8 KiB) Viewed 330 times


Also, as beautiful as the new engine is, it looks slightly over exposed in Daytona 2.
The roof and rear end of the car go almost white, losing the detail of the car number and livery.



Yes I know the Sega Rally menu gets cropped in legacy3d,

RallyMenu.gif
RallyMenu.gif (114.96 KiB) Viewed 330 times


and the geometry/FOV is slightly off, but I kind of like the look of the wider cars.
It looks more correct to me, chunkier and more satisfying.

DoesMyBumLookBigInThis.gif
DoesMyBumLookBigInThis.gif (173.77 KiB) Viewed 330 times


Lets not forget legacy3d is also a useful work around for the whole texture2DLod/driver issues in non Windows builds.

Sure some games don't work with legacy, I think the fishing games don't render properly at all.

If you've never tried legacy though, perhaps you stick with the defaults or you think your super computer is beyond such things, then give it a try.
It's really not that suckey at all. :D
rokfpoewrkcpoqwkcp
 
Posts: 119
Joined: Mon Nov 18, 2019 3:40 pm

Re: Legacy3d loveliness

Postby Bart » Mon Mar 29, 2021 7:32 pm

Haha, thanks. I really appreciate the community's continued enthusiasm for Supermodel whether or not any of my code is still powering it :) It's the only project I've worked on that has reached any sort of an audience. My professional work has either been for in-house consumption only (electronic trading) or completely confidential early-stage prototypes that won't ever ship (Apple). I'd like 2021 to be the year that I find a way to work on things that can hopefully reach a broader audience -- maybe a VR game or app?

Re: the legacy engine:

I can't recall anymore how the lighting model differs from the new engine. So much new stuff was discovered by Ian and Harry Tuttle. Some of it could probably be ported back but I think fundamentally, a lot of key render state from the Model 3 polygon header cannot be sent to the legacy shaders. I could probably introduce some more uniforms to shuttle over the necessary state bits but texture mapping would likely remain fundamentally broken.

Ian: how are the Daytona 2 AI vehicle decals encoded? If I remember correctly, it was some weird planar format and there is no room for the legacy engine to support these.

I do wonder why the legacy engine is so much faster (and IIRC, this speed advantage existed even before Ian moved over to more accurate two pass rendering to sort out priorities). I think Ian's shaders are overall more streamlined than mine. I pack a ton of data into the vertex attributes so perhaps it is the lack of rendering state changes? I didn't realize they were that expensive. If we must carry legacy engine support into the future, it would be good to understand why it performs well on lower-end systems so we don't accidentally eliminate that advantage when improving it.

The investment would probably be better spent on writing a Metal version of the new engine for Mac (and iOS device) support.
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: Legacy3d loveliness

Postby buttersoft » Mon Mar 29, 2021 11:01 pm

Hmm, i'm running twin cabs to CRT's and it might be interesting to try the legacy3d engine, not for speed but for the look alone.

What's the commandline switch again, just "-legacy3D" ?
User avatar
buttersoft
 
Posts: 17
Joined: Fri Mar 12, 2021 10:37 pm

Re: Legacy3d loveliness

Postby Ian » Mon Mar 29, 2021 11:10 pm

The big difference in speed is probably caused by the number of draw calls. The new3d engine issues maybe 4x the amount or more The legacy engine doesn't need to split models by texture type and it ignores half the rendering states. With the quad rendering engine we are bumping against a hard limit of the number of vertex attributes that can be passed from a vertex shader. The fog shine through attribute really should have been a vertex attribute it is a flat attribute so not interpolated but I ended up having to split the models and pass it as a uniform.

I did experiment with a different branch that how it would work is it pass the two texture sheets directly to opengl as unsigned short textures. Then it would do the same integer maths as the original hw does. This would be much less draw calls since we wouldn't need to split the models by texture type. It would also be a lot more code in the shaders which might not be an immediate win. Lighter on the cpu, but heavier on the gpu. It would also require opengl 4 maybe. Apple is stuck at gl 2.1 unless we make a core context, but that means all legacy code stops working. All Windows drivers and probably Linux support compatability contexts so mixing of old and new is not a problem.
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: Legacy3d loveliness

Postby SegaLover2020 » Mon Mar 29, 2021 11:52 pm

Sorry if it's already been asked, but the first pic from daytona2 makes it look like the new 3D engine applies some extra filters to the image (anisotropic, mip mapping). Is this true? Is there any way to disable those or were they already there in the original hardware? Thanks.
User avatar
SegaLover2020
 
Posts: 63
Joined: Wed Aug 19, 2020 10:49 pm

Re: Legacy3d loveliness

Postby Ian » Tue Mar 30, 2021 2:07 am

The original hardware does mipmapping, so that is what the new3d engine does. I turned on an-isotropic filtering in earlier builds but it is not present in later ones as it's not arcade accurate.
There are a few cases where the new3d engine is more 'accurate' than the original hardware. The lighting is actually calculated per pixel, and not per vertex, so the models look a bit better. Quad rendering in supermodel is actually superior to the original hardware. The original h/w uses something called a two folder linear interpolation. In simple terms they just interpolate up and down, then across the scan lines. This works but for quads they will actually distort a bit upon rotation, something similar happens on the nintendo-ds. The quads in supermodel don't suffer from this, they look perfect from every angle.
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: Legacy3d loveliness

Postby Jiterdomer » Tue Mar 30, 2021 7:46 am

Legacy3D is good for low-spec computers that couldn't crank the graphics up to high, so it's best to leave this option on while you can.
Feel the heartbeat of my machine through this tight seat. I feel every motion of my machine
Image
User avatar
Jiterdomer
 
Posts: 627
Joined: Mon Sep 26, 2011 6:37 pm
Location: Los Angeles, California

Re: Legacy3d loveliness

Postby SegaLover2020 » Mon Apr 05, 2021 3:56 am

Ian wrote:The original hardware does mipmapping, so that is what the new3d engine does. I turned on an-isotropic filtering in earlier builds but it is not present in later ones as it's not arcade accurate.


Thanks for the explanation, so there's no difference in lighting or how the textures are drawn? Because the new engine makes it look like the games are brighter or use a different illumination system.
User avatar
SegaLover2020
 
Posts: 63
Joined: Wed Aug 19, 2020 10:49 pm

Re: Legacy3d loveliness

Postby Bart » Mon Apr 05, 2021 9:54 am

SegaLover2020 wrote:
Ian wrote:The original hardware does mipmapping, so that is what the new3d engine does. I turned on an-isotropic filtering in earlier builds but it is not present in later ones as it's not arcade accurate.


Thanks for the explanation, so there's no difference in lighting or how the textures are drawn? Because the new engine makes it look like the games are brighter or use a different illumination system.


The old engine is too dark. If you look at comparison videos with actual hardware, the new engine looks very close. Maybe there is some difference in the gamma curves or something but I don’t think there is anything fundamentally wrong with how the new engine works.
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada


Return to The Catwalk

Who is online

Users browsing this forum: No registered users and 1 guest