Jump to content

Rendering with Syncker


photo

Recommended Posts

Starting using Syncker in IG template, i have some questions.
As this (2,4, ...,n) screens have its own separate rendering, their rendering behavior can be different.
For example i turned off camera exposure mode to static and auto-white balance, because top two screens rendered it more dark.
Is there any other desired settings?

Another is strange screen edge clipping on world terrain (see gif below)

https://imgur.com/a/QyR2dBM

Edited by qwert_e
Link to comment

Hello qwert_e,

19 hours ago, qwert_e said:

As this (2,4, ...,n) screens have its own separate rendering, their rendering behavior can be different.

This is caused by post-effects. To solve this permanently you can disable all post effects with console command "render_skip_post_materials 1". But it can be okay with static exposure and white balance turned off. As I understood you've already done this.

19 hours ago, qwert_e said:

Another is strange screen edge clipping on world terrain (see gif below)

This can be fixed with terrain material parameters. Try increasing the Frustum Culling Padding parameter. This effect can be debugged even in the editor if you find a suitable camera position. Too big values will cause performance drop, please, be careful :)

Thank you!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

Okay, that solved, thanks.
New question - when CIGI connector receives entity control, IG places a node in world. This node isnt syncronized between syncker slaves, and i don`t control its creation. 
First thoughts is to get node, associated with packet and check it with 

int isSyncNodeconst NodePtr & node )

method, every time i receive packet? or what will be more suitable way instead of that?

like that:
 

ig_entity = ig_manager->getEntity(0);
Unigine::NodePtr entity_node = ig_entity->getNode();

if (entity_node.get()) {
	if (!syncker_master->isSyncNode(entity_node)) {
		syncker_master->addSyncNode(entity_node);
	}
}

 

Edited by qwert_e
Link to comment

Yes, this happened to be true, but why i was confused:

when i start fresh master and slave, then start simulation, my entity0 (plane for example) appears on master only. When i reload that world, slave get that node. 

Console gives me some rubbish (I using standard be200 model from examples)
image.png.106265f9273c32d10bb95f1edbd7831c.png

 

 

Edited by qwert_e
Link to comment

yes, i have 

15 minutes ago, morbid said:

Looks like it's caused by initialization order.

Try the following:

  1. Run slave (no world loaded)
  2. Run master (no world loaded)
  3. Run host

 This was already fixed in the internal builds, in the upcoming release launch order shouldn't be a problem.

I used default template for IG, and slave get control over cigi packets if it loaded first.

 

UPD: Oops, i have 2.7.3, will update to 2.7.3.1 and write back

Edited by qwert_e
Link to comment

From what ive tested:
1. Despite of loading sequence, when i load world and place entity, it moves some distance on slaves, but with next packet it moves in right position.
2. Entity consists of dummy with meshes, and (dont know why) when i get access to entity node from component, and then move separate nodes (not entire entity), this movement is not syncked to slaves. Here is example from inside component, placed on node and controlled through cigi Component Control packet:

Unigine::NodePtr ChLeadWheel = node->getChild(node->findChild("lead_chassis"));
Unigine::NodePtr ChLeadCover = node->getChild(node->findChild("lead_chassis_cover"));

if (ChLeadWheel.get()) {
	Unigine::Math::quat rotation = Unigine::Math::slerp(ChLeadWheel_up_rotation, ChLeadWheel_down_rotation, factor);
	ChLeadWheel->setRotation(rotation);
}
if (ChLeadCover.get()) {
	Unigine::Math::quat rotation = Unigine::Math::slerp(ChLeadCover_up_rotation, ChLeadCover_down_rotation, factor);
	ChLeadCover->setRotation(rotation);
}

if i check that nodes with syncker`s isSyncNode(node), its not syncked.

Edited by qwert_e
Link to comment
On 4/3/2019 at 7:57 PM, qwert_e said:

and slave get control over cigi packets if it loaded first.

please, modify you AppSystemLogic

void AppSystemLogic::init_ig()
{
	// check IG plugin
	int ig_plugin_index = Engine::get()->findPlugin("IG");
	if (ig_plugin_index == -1)
	{
		return;
		// try to load IG plugin
		// Engine::get()->addPlugin("IG");
		// ig_plugin_index = Engine::get()->findPlugin("IG");
		// if (ig_plugin_index == -1)
		// 	return;
		// else
		// {
		// 	// try to load CIGIConnector by default (if none of the connectors are loaded)
		// 	int cigi_connector_index = Engine::get()->findPlugin("CIGIConnector");
		// 	int hla_connector_index = Engine::get()->findPlugin("HLAConnector");
		// 	if (hla_connector_index == -1 && cigi_connector_index == -1)
		// 		Engine::get()->addPlugin("CIGIConnector");
		// }
	}
  
  	ig_manager = (IG::ManagerInterface*)Engine::get()->getPluginData(ig_plugin_index);

	// setup IG
	ig_manager->setCoordinateSystem(IG::ManagerInterface::COORDINATE_SYSTEM::NED);
	ig_manager->setInterpolation(1);
	ig_manager->setInterpolationPeriod(0.2); // 200 ms
	ig_manager->setExtrapolationPeriod(0); // 0 ms, disabled
}

do not add the IG Plugin on slaves, as it may result in incorrect behavior of components.

Link to comment
1 hour ago, qwert_e said:

Here is example from inside component, placed on node and controlled through cigi Component Control packet:

Yes, if you make custom component, you need append ChLeadWheel and ChLeadCover nodes to syncker.

Link to comment
×
×
  • Create New...