-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can speed up scene rendering? #329
Comments
For me, the most effective trick was to reduce the resolution of the cameras. |
@saihv - thanks for your contribution to make things jitter free :). A quick question I'd was about I'm working on specifying resolution in settings.json. Hopefully will get it done in 1-2 days. |
@sytelus Do you see crashes when getImage is being called too frequently, but normal performance otherwise? IIRC, |
Ah... looks like someone modified your original code and probably introduced bug. I'll investigate this and update this thread. Meanwhile, I was wondering if you have experimented or know about another method to get screenshot. This is more "official way" of doing and it and one advantage I see is that it doesn't require another SceneCapture2D component which means it doesn't need to re-render scene again. In this case, you only get screenshot and assuming you have set FPV view, you can get fast mono images. According to docs, you first call |
Interesting! I hadn't looked at FScreenshot earlier: when I was initially looking into options for screenshots, most of the native functionality seemed to involve blocking the game thread, thereby physics. After a quick look, it looks like even |
Some good news... I was able to track down crashes to few bugs that wasn't setting RenderTarget properly. Now I can run for fairly long time without encountering any crashes! I haven't done the change for I've also added ability to set resolution, FOV and few other params using settings.json. Here's the doc that describes it. |
Just wanted to add a little bit to our past discussion here. With the new recording method (and possibly the UE version upgrade?), I am seeing a bit of an issue. Essentially, there's an expensive flush operation being performed along with the recording, which is coming from the In 4.15 and the old method of recording, once the sub-views were turned on, and the capture components started running, there was no additional overhead involved with I was just wondering if you have any thoughts about this. Also, is it possible at all to run the new AirSim code in UE 4.15? Or is 4.16/17 deeply integrated with the new features? Thanks for your time! |
I found a fix for the jitters. HDR is not being disabled in the render target in the new code,
With this addition, the flush command takes less than a millisecond for the same scene, compared to >10 ms with HDR on. Perhaps it would be good to add this to the settings file as well so users can choose between quality and performance! EDIT: Additional observation - Actually, I don't think the flush was taking a long time just because HDR was on: it's because Unreal was allocating way too much memory. A HDR image is twice the size of a non-HDR image: so for the same resolution, a HDR image should not take 14 ms to flush compared to 1 ms for a non HDR image. It looks like if we don't specify HDR or no HDR, Unreal is allocating too much memory to the render target in general. If the HDR true/false specification is done AFTER the resolution is set at the line
Looks like then, Unreal allocates exactly how much memory is needed for that image size, and the jitter goes away even with HDR on. I am not 100% sure how Unreal is managing these things underneath, but just based on my experiments. For now, I am disabling HDR entirely, and I have jitter-free recording for around 5 vehicles. |
Hello. I'm currently facing the same issue on an Unreal project. Were you able to solve it by changing bHDR to false? I'm working on unreal version 4.17 and even after doing these changes I'm still facing the same low fps issue. Do you have any recommendations? |
Hi, I'm using the latest version of the AirSim and I tried to get stereo images.
Getting a stereo image pair usually takes 90-110ms (about 10 FPS) on nVidia GTX1070.
Adapting Unreal engine quality didn't help.
Is there any way to speed up scene rendering?
The text was updated successfully, but these errors were encountered: