Jump to content

[SOLVED] IG (CIGI), VR (Vive controler) and WidgetSpriteViewport sync issue


photo

Recommended Posts

Dear Unigine support,

I'm facing an issue when moving an entity (helicopter) with CIGI in VR (HTC Vive) and in which there is a WidgetSpriteViewport for an external camera attached to the entity...
- Vive controllers are flickering between previous position and new ones, to get them back in your hand, you have to freeze (CIGI) the entity.
- WidgetSpriteViewport displays some child nodes (landing gears, cargo rope cone) with fake position, flickering as well. A (CIGI) freeze of the entity fix that.  

Both artifacts seem to be IG/CIGI related, and I don't get these issues if I animate the helicopter on predefined trajectory (SplinePath).
Here is IG setup:

	// setup IG
	//NED (North-East-Down) coordinate system. X - front, Y - right, Z - down, default in Unigine. Rotation order: Z -> Y -> X (Yaw-Pitch-Roll)
	//ENU (East-North-Up) coordinate system. X - right, Y - front, Z - up, default in Unigine. Rotation order: Z -> X -> Y (Yaw-Roll-Pitch)
	//CIGI use NED orientation
	ig_manager->setCoordinateSystem(Plugins::IG::Manager::COORDINATE_SYSTEM::NED);
	ig_manager->setInterpolation(1); // enable interpolation and extrapolation
	//Sphere -> 1 step 10ms, replay -> 1 step Sandra 200ms
	ig_manager->setInterpolationPeriod(0.2); // s, default value is 0.04 
	ig_manager->setExtrapolationPeriod(0.2); // s, default value is 0.04, at least 1 step time, or n steps
	//ig_manager->setPlayer(atoi(views_el->getText()));
	//ig_manager->setPlayer(0);
	ig_manager->setCurrentView(0);

 

I tried ig_manager->setInterpolation(0); but didn't fix it.

Kind regards,
Charles

Link to comment

Hello! I need a little more information to reproduce this bug.
1. What version of the engine is used?
2. Сamera of widgetSpriteViewport is child of the helicopter node? WidgetSpriteViewport placed at ObjectGui?
3. How is the VR player attached to the aircraft? Is it a child of the helicopter node, or do you manually update its position in each frame?

Link to comment

Hi,

1. SDK 2.12.0.2

2. Yes, ObjectGui is directly a child.
It is associated to CameraViewComponent (from other thread, thanks for suggestion with texture).

image.thumb.png.e2cc987ec95cc7174a67b0c2c637396f.png

NB: even without VR, but with CIGI, objects visible from external cam are flickering.

3. Yes the player VR is a child of the other players, free player or cigi one.
I know the exercise to put you back in same context is bit complicated, that would be equivalent to merge your demo CIGI with VR one... 

Kind regards,
Charles

Link to comment

About the shaking viewport: try using World::updateSpatial(); after WidgetSpriteViewport::setCamera. Or use this advice

About shaking controllers: I need more time for review, it is very strange behavior.

Link to comment
  • 2 weeks later...

Hi,

Any update on shaking controllers..?
It is maybe not so much, but would bring a lot during the VR experience..
Currently end-user need to pause CIGI in order to see the controllers, with some display attached to them :-/

Kind regards,
Charles

Link to comment

Hi,

Thanks for investigating on it.
To reproduce the context -> "simply" merge CIGI and VR demo.
In the past, we already encountered similar issue... but some new CIGI mechanisms (interpolation / extrapolation) could interfere... or? 

Kind regards,
Charles

Link to comment

hello! I just found VR equipment. 
please check it
 

// Framework/Components/Players/VRPlayerVive.h
class VRPlayerVive : public VRPlayerVR
{
public:
	COMPONENT(VRPlayerVive, VRPlayerVR);
	COMPONENT_INIT(init);
	COMPONENT_POST_UPDATE(update); // instead COMPONENT_UPDATE(update);
  //....
}

this should help with shaky controllers.

Perhaps in other places there will also be problems with shaking. This is due to the order in which the update is called. so far I do not see an easy way to solve problems with the order of the update of different systems. If there is a similar shaking - try to transfer calls to post-update (because the final position of the entity is calculated at the end of the update)

image.png

  • Like 1
Link to comment
  • silent changed the title to [SOLVED] IG (CIGI), VR (Vive controler) and WidgetSpriteViewport sync issue
×
×
  • Create New...