Worst performance in DX mode, why you don't scrap it?

Synthesia is a living project. You can help by sharing your ideas.
Search the forum before posting your idea. :D

No explicit, hateful, or hurtful language. Nothing illegal.

Postby KaleidonKep99 » 01-19-15 1:09 pm

Hello dear Synthesia users!

Anyone noticed how slow and buggy is the DirectX render system on Synthesia?
Yeah! No one ever noticed... Ok stop.

Hey Nicholas, remember me? I'm that guy that asked you about the 128 keys support! XD
I noticed a thing, the DirectX renderer is really slooooooow and buggy, and when i'm not viewing the Synthesia window, the framerate is automatically dropped to 10-15.
After changing it to OpenGL, everything is changed. I can play bigger MIDIs without any problem, and the framerate drop problem is completely gone.

So, why you don't stop compiling it with both renderers and you don't optimize OpenGL instead of DirectX?

This is a good idea to shrink the Synthesia executable size, and since everything supports OpenGL, this will be a good way to have a better multiplatform support! (Even Ubuntu gets 60 FPS on Synthesia with a s****y GeForce 4, while using OpenGL.)

Waiting for a response!
- Keppy
KaleidonKep99
 
Posts: 49
Location: Cagliari, Sardegna, Italy

Postby Raymond » 01-19-15 8:35 pm

It's going to be different with different systems, that's why there is support for both.

For me DirectX is smoother then OpenGL. (when window is focused)
Raymond
 
Posts: 528
Location: United States, Washington

Postby Nicholas » 01-20-15 8:37 am

KaleidonKep99 wrote:... when i'm not viewing the Synthesia window, the framerate is automatically dropped to 10-15.

Completely intentional.

Code: Select all
if (!DXUTIsActive()) Sleep(50);


KaleidonKep99 wrote:This is a good idea to shrink the Synthesia executable size...

That 11 MB is really breaking the bank, huh? ;) Half of that is textures. The other half are our big third-party libraries (boost, FreeImage, SQLite, etc.). The DirectX renderer might be 1% of the machine code.


Snarky comments aside, it'd be nice to only have to support one drawing back-end. But there are a ton of old machines out there that don't have good OpenGL drivers. Dropping DirectX support breaks Synthesia for a ton of users.
Nicholas
 
Posts: 11778

Postby Raymond » 01-20-15 6:50 pm

Nicholas wrote:Completely intentional.

Could that be optional?
Code: Select all
if (!DXUTIsActive() && ConfigOption("fancyname") == 1) Sleep(50);

I have dual screens, and I like to have chat and stuff open on the side. It would be nice if was smooth without being active.
Raymond
 
Posts: 528
Location: United States, Washington

Postby KaleidonKep99 » 01-21-15 9:29 am

Nicholas wrote:Snarky comments aside, it'd be nice to only have to support one drawing back-end. But there are a ton of old machines out there that don't have good OpenGL drivers. Dropping DirectX support breaks Synthesia for a ton of users.

I tested a lot of machines in my house, some are very old (Like an AMD K7 with a NVIDIA Riva TNT and Windows 98).
Using KernelEx (A Windows NT libraries emulator), Synthesia works better in OpenGL than in DirectX.
Then, the same thing happens with XP and Vista.
KaleidonKep99
 
Posts: 49
Location: Cagliari, Sardegna, Italy

Postby Nicholas » 01-21-15 11:02 am

Those were high-end, well supported parts in their day. I had a Riva TNT back when I was in high-school. :lol:

I'm talking about the weird parts on the low-spec machines. Things like Via, S3, SIS, and some of the older Intel stuff.

Beyond that: there are some driver features available to DirectX that aren't in OpenGL on the same hardware. I've been waiting (since 2006) for good coverage on OpenGL PBO support. DirectX has been able to quickly render to texture since 9 and every DX9 device can do it. But the same card in OpenGL mode can't (depending on the manufacturer, driver, etc.). Feature coverage is really uneven.

These days on modern hardware, it's an easy decision. When you're talking about supporting every computer made in the last decade or so, it's nice to have a few options.

Raymond wrote:Could that be optional?

That was actually boilerplate DirectX code from the recommended Microsoft practices. Although, it's not very clear why they recommend it. I might bump it from 50ms down to 3 or 4. At that point it will still throttle things enough that you're not wasting CPU/GPU time unnecessarily, but the frame rate shouldn't drop. (At 60 FPS, a frame is ~17ms.)
Nicholas
 
Posts: 11778

Postby Nicholas » 11-02-15 7:37 pm

KaleidonKep99 wrote:So, why you don't stop compiling it with both renderers and you don't optimize OpenGL instead of DirectX?

I like this idea now. I'm going to do it. DirectX is being unceremoniously ripped out tomorrow. :lol:

While wrapping up the video creator on the OS X side of the fence, I learned of an interesting limitation. (The "Platform Issue" mentioned on this page.) The video creator required one new'ish OpenGL call... which means on OS X you MUST use all new calls. So, I had to bring the OpenGL renderer out of the stone age and start using pixel shaders.

That means the rendering code for Mac, iPad, Android... and half of PC are now all virtually identical. The "half of PC" seems silly now -- double the effort just to have one extra option on one platform -- especially in the face of finite development time. I'd much rather spend the time improving the OpenGL renderer (like you suggested) than fiddling with DirectX.

Good idea! It only took me ten months to realize it. ;)
Nicholas
 
Posts: 11778

Postby KaleidonKep99 » 11-15-15 11:02 am

Yay! Finally! :D

And the OpenGL seems smoother if compared to the DirectX one, which seems very sluggy and laggy.
KaleidonKep99
 
Posts: 49
Location: Cagliari, Sardegna, Italy

Postby Gingeas » 11-15-15 11:05 am

Interesting...glad to hear you are still actively developing Synthesia!
Gingeas
 
Posts: 11

Postby Nicholas » 11-15-15 12:20 pm

While you guys are here, you might be interested in seeing one of the early results from the video creator. How is that for no latency? :lol:
Nicholas
 
Posts: 11778

Postby KaleidonKep99 » 11-16-15 1:50 pm

Nicholas wrote:While you guys are here, you might be interested in seeing one of the early results from the video creator. How is that for no latency? :lol:

Looks awesome! Can't wait to test it out. :3

Other features that will be nice for us:
- Again, the 128 keys feature (We've already talked about this, but you don't look really interested :P)
- Advanced note speed settings for the export, where you can go ABOVE the default limits
- No keyboard delay settings, to remove that annoying delay of the lights in the keyboard :P
KaleidonKep99
 
Posts: 49
Location: Cagliari, Sardegna, Italy

Postby Nicholas » 11-16-15 2:40 pm

KaleidonKep99 wrote:Advanced note speed settings for the export, where you can go ABOVE the default limits

Are you talking about how far you can stretch notes vertically with PgUp? Yeah, that would be an easy limit to triple or quadruple in the video creator.

KaleidonKep99 wrote:No keyboard delay settings, to remove that annoying delay of the lights in the keyboard :P

It respects the same "Gameplay.ForcedBreakBetweenNotes" setting as the client does, so you can already turn that off. (In retrospect, I should have done that when generating the video. I agree that Black MIDIs look better with that set to zero.)
Nicholas
 
Posts: 11778


Return to Feature Requests

Who is online

Users browsing this forum: No registered users

cron