Skip to content
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

vget return images always from the same location #198

Open
dmambelli opened this issue Oct 3, 2020 · 8 comments
Open

vget return images always from the same location #198

dmambelli opened this issue Oct 3, 2020 · 8 comments

Comments

@dmambelli
Copy link

  • Operating System: macOS Catalina 10.15.5
  • UE4 Version: 4.25.3
  • UnrealCV Version: 0.4.0
  • Client (python2, 3 or matlab): python2/3
  • Problem Description:
    I am trying to collect a sequence of images over a trajectory previously recorded. When I run my code I see in the editor the camera following the trajectory but the images that I collect using "client.request('vget /camera/0/lit png')" are all taken from the initial position. I am using a World that I generated where I added the Unrealcv plugin.
@qiuwch
Copy link
Member

qiuwch commented Oct 5, 2020

Hi, @dmambelli

You can drag a Fusion Camera Actor from the left side "Place Actors" panel. And control this camera with camera id 1. Actually, you can put as many cameras as you need in this way.

image

I will check what is wrong with camera 0 and make a fix.

@dmambelli
Copy link
Author

Thanks @qiuwch. This solved my problem!

@qiuwch
Copy link
Member

qiuwch commented Oct 6, 2020

Great. Let me know if you find any other issues.

I will keep this issue open until I fixed it, so that others can find the solution here.

@qiuwch qiuwch reopened this Oct 6, 2020
@dmambelli
Copy link
Author

One follow up question.
I have an element in one of my assets that I want to remove, the easiest way that I found to do that is to assign a transparent material to the element. In my application I am mainly interested in capturing the depth.

I realized the transparent material following https://answers.unrealengine.com/questions/11377/view.html.

When I use "vset /viewmode depth" in the editor I don't see the transparent element as desired. However, as soon as I use client.request('vget /camera/1/depth npy') to capture an image I get the depth image with the transparent element visible.

Is there any way to obtain the same behaviour of "vset /viewmode depth" using "vget /camera/1/depth npy"?

@dmambelli
Copy link
Author

Solved by setting the variable "bIgnoreTransparentObjects" to true in DepthCamSensor.cpp, and then building again the plugin.

@qiuwch
Copy link
Member

qiuwch commented Oct 11, 2020

Cool! Thanks for sharing this tip.

@antopost
Copy link

antopost commented Mar 5, 2021

Is there a way to solve this issue without using the fusion camera? The main problem I'm having is that the LoDs will only change depending on the distance to camera0, not camera1. So a lot of my textures are low resolution.

@Buffyqsf
Copy link

Buffyqsf commented Jul 3, 2023

Hi, @dmambelli

You can drag a Fusion Camera Actor from the left side "Place Actors" panel. And control this camera with camera id 1. Actually, you can put as many cameras as you need in this way.

image

I will check what is wrong with camera 0 and make a fix.

Hi I am not very familiar with UnrealEngine, and I coudn't find "Fusion Camera Actor" in UE4.16 or UE4.27. And I have searched for this but got nothing. Could you tell me which version of UE do you use?
And I want to control more than one camera, but I don't know how to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants