Jump to content

Large World Floating Origin


photo

Recommended Posts

Posted

Hi UNIGINE

 

we are trying to implement large world floating origin approach for camera centric rendering to overcom float precision issues when far away from origin. This requires shifting all world nodes towards the camera which stays more or less at coord origin.

 

Unfortunately moving all world nodes of a complex world by individual node->setTransform() calls takes huge amount of time (see screenshot of provided test application).

 

post-82-066298500 1288543408_thumb.jpg

 

Is there a way for an optimized complete world translation for floating origin approach via something like engine.world.translateWorld( int nodes[], dvec3 offset ) ?

 

Such special case world translation of all nodes should be much more efficient as it doesn't require complex spatial tree updates or geometry bounding box recalulation (except simple offset)

WorldFloatingOrigin.zip

  • 3 weeks later...
Posted

Is there a way for an optimized complete world translation for floating origin approach. Such special case world translation of all nodes should be much more efficient as it doesn't require complex spatial tree updates or geometry bounding box recalulation (except simple offset)

 

@UNIGINE

 

Any short comment would be helpful, thanks

  • 2 weeks later...
Posted

Fast translation of whole world is possible only for nodes without children. If we have nodes with children calculation of relative transformation is still needed. Whole world translation is faster than individual nodes transformation but also requires a lot of calculations. And we can't translate nodes from a list, we should translate all world nodes. Only in this case spatial tree will be valid. Approximately we should walk through all existed root nodes and apply new transformation. Updating of spatial tree should be blocked on this step. And after that update bounds of all spatial WorldPosition and WorldNodes.

Posted

Thanks for the input ! Would you expect such kind of whole world translation quite easy to implement or will this require rather complicated/deep engine modifications ? In other words: do you think, we could implement it realistically on our own ?

×
×
  • Create New...