- This topic has 7 replies, 3 voices, and was last updated 2 years, 5 months ago by NaxosCG.
-
AuthorPosts
-
2022-07-23 at 10:58 am #54346NaxosCGCustomer
Hello,
I am testing the small script for enabling SSAA
( thanks @kvd77kvd : )After some tests, on my rtx3090, even 16x is fast, of course on a small radeon embedded into ryzen 5 4500u, fps are down, a lot (from 30fps to 17 with SSAA 4x). My tests are on the “spinner” demo scene.
So i thought to use the puzzle “Check performances”, but even this small ryzen is found as a “good” gpu, so i guess the “good / poor” performance test is quite low.
That would be great to have more differents results : poor, medium, good and extra (like in video games), so we could set more optimum parameters.Any idea ? Maybe with some scripting ?
Regards.
"1+1=3... for large values of 1"
2022-07-23 at 3:39 pm #54347xeonCustomerI personally have found the good / poor performance indicator not a valuable indicator of any expected performance. I have many cards that report poor but perform better than those that report good. So not sure if it’s really an indicator of overall performance or just one stat but we just ignore that completely.
We just conduct actual tests against required hardware and validate and call it a day.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2022-07-23 at 6:00 pm #54348kdvParticipantcheck FPS and lower SSAA level after the app was loaded… you can calculate FPS using
app.frame
andDate.now()
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2022-07-23 at 9:21 pm #54349kdvParticipantSomething like that. The code will stop checking the framerate in two cases: SSAA is disabled or the framerate is more than the desired minimal value.
let sampleLevel = 4; //SSAA is set to 16x by default function checkFPS() { setTimeout(function() { const startFrame = app.frame; const startTime = Date.now(); setTimeout(function() { const currFrame = app.frame; const currTime = Date.now(); const fps = ((currFrame-startFrame)/(currTime-startTime))*1000; if (fps < 50) { //minimal desired framerate if (sampleLevel > 0) { //if SSAA disabled do nothing sampleLevel = sampleLevel - 1; app.enableSSAA(sampleLevel, (sampleLevel == 0)); checkFPS(); console.log(sampleLevel); } } }, 500); //measure interval, ms }, 500); //timeout after SSAA level change, ms } app.enableSSAA(sampleLevel, false); checkFPS();
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2022-07-25 at 2:16 pm #54384NaxosCGCustomerMany thanks ! It works well, i could change some values et see that on a small laptop, SSAA goes from 4 to 3, then 2, then 1 and stays at 1
Of course, it would be great to be able to go back up in SSAA if we change zoom, content, etc…
I guess it is not thinkable to test all the time (each frame / each 10sec). I don’t know how heavy it is to check and change, don’t know if this script would work continuously.
"1+1=3... for large values of 1"
2022-07-25 at 3:20 pm #54388kdvParticipantOf course, it would be great to be able to go back up in SSAA if we change zoom, content, etc
What’s the problem? Run this script again after appending another scene…
each frame / each 10sec
don’t use this puzzles ))) you can’t stop them. use the timer puzzle instead. a timer can be stopped…
I don’t know how heavy it is to check and change
The script checks FPS no more than 4 times. Then it stops. CPU load is minimal…
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2022-07-25 at 7:04 pm #54391kdvParticipantdon’t know if this script would work continuously.
Well, this script checks fps continuously and changes SSAA level if needed CPU load is minimal. But I wouldn’t recommend to use it )))
let startFrame, startTime, currFrame, currTime, fps; let pageOnFocus = true; let sampleLevel = 4; //SSAA is set to 16x by default window.onfocus = function() { pageOnFocus = true; } window.onblur = function() { pageOnFocus = false; } function checkFPS() { setTimeout(function() { startFrame = app.frame; startTime = Date.now(); setTimeout(function() { if (pageOnFocus) { currFrame = app.frame; currTime = Date.now(); fps = ((currFrame-startFrame)/(currTime-startTime))*1000; if ((fps < 40) && (sampleLevel > 0)) { //min desired fps sampleLevel = sampleLevel - 1; app.enableSSAA(sampleLevel, (sampleLevel == 0)); } else if ((fps > 61) && (sampleLevel < 4)) { //max desired fps sampleLevel = sampleLevel + 1; app.enableSSAA(sampleLevel, false); } } checkFPS(); console.log(sampleLevel); }, 500); //measure interval, ms }, 500); //timeout after SSAA level change, ms } app.enableSSAA(sampleLevel, false); checkFPS();
p.s. The first script has been updated to be more correct…
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2022-07-25 at 10:02 pm #54394NaxosCGCustomerGenious !
"1+1=3... for large values of 1"
-
AuthorPosts
- You must be logged in to reply to this topic.