sailab-code / SAILenv

Python HTTP Client for interfacing with Unity Virtual Environment.
Other
0 stars 2 forks source link

Incorrect flow #1

Open egedib opened 3 years ago

egedib commented 3 years ago

Hi! It seems if two objects are nested I can see the further object's flow and I can see the objects' flow when there is a wall between the camera and the objects.

Reproduction:

  1. Open the project in Unity, then open scene: Room 02.
  2. From the Mover object, I deleted all Waypoint except Mover Waypoint (0)
  3. Import a Blend model. It's an animated cube. cube_blend.zip
  4. Place the cube two times to the scene, size set to 0.25. Both times modify the Light object's intensity to 1 (instead of the imported 1000). Create Animation Controller, added the animation, slowed it down to 0.25x and set it to loop, then connect it to the Cubes.
  5. Open the Python project, modified with imsave methods to save flow and main image and I set the resolution to 960x540, the imshow functions are deleted.

I tried the following options separately and together:

Example 1: Both cubes are moving, but if you look at the flow, the flow of the rear cube is seen fully. This is not desirable behaviour, because the front cube's flow should cover the rear one. example-1_inside

Example 2: The boxes are now moving sideways, I can see fully the flow of the rear cube. example-1_outside

Example 3: I can see the flow through the wall. example-2_inside

Example 4: Here the objects' size (in the flow) looks wrong. size_issue

I can send you the project files if those are needed.

enricomeloni commented 3 years ago

Hello @egedib, thank you very much for the well-detailed issue. We will be trying to reproduce the bug and fix it.

If you have any other comment or suggestion don't hesitate to write us an email or issue!

InsaneMonster commented 3 years ago

I reproduced this. The best workaround currently is to not use an Animator but use a script moving the objects with physics (one is provided by default for rotation, for example). In the meanwhile, I will look into it to understand the deeper causes of this and I will try to see if I can find a way to make it work also with Animators.

egedib commented 3 years ago

Thank you for the fast reply and for the workaround!

egedib commented 3 years ago

Unfortunately, if I move an object with the Poltergeist script, there is a problem too. I used Chair 01 and the following properties for the Poltergeist script:

chair-issue

enricomeloni commented 3 years ago

Hello @egedib, thanks for the further example! We are looking on it!

InsaneMonster commented 3 years ago

@egedib Just wanted to update on this issue. By futher investigation I am not able to consistently reproduce the bug. I noticed the bug exists when objects are further away and it disappear up close. Also, it doesn't appear with every object. We will continue investigating our code, but there could be a possibility this issue comes from the way Unity computes motion vectors.