Hi All,
As part of the VulkanSceneGraph-1.0 release I will tag the 1.0 release of vsgXchange, so will need to resolve all the outstanding Issues with vsgXchange. There are currently 4 Issues on the
vsgXchange github Issue tracker all of which relate the the vsgXchange::OSG loader, so all these need resolve in some form before VSG-1.0.
The Issues themselves all need addressing and I'll tackle them soon, but how best to about it is something I haven't settled upon yet. There are wider issues at play that affect how best to go about resolve them, which is why I started this thread.
The big question I am pondering right now is whether vsgXchange should have vsgXchange::OSG at all, and if not then should it be provided by a dedicated library like the original osg2vsg or integrated into future versions of the OpenSceneGraph.
With formats like .jpg, .obj, .gltf etc. we just need to read or write the 3rd party formats, and there is little need to worry about the implementation details, these can be encapsulated very naturally within a standard ReaderWriter interface as is done in vsgXchange.
GDAL support is a little different as GDAL itself can be useful for image processing, so being able to use GDAL and get the image/DEM data from it in VSG compatible form is helpful. I did originally have vsgGIS provide this, but in the end decided that the integration was so lightweight that I could put the GDAL integration code directly into the vsgXchange. I'm happy with how this integration turned out as there is little additional bloat or awkwardness.
For existing OSG application developers the needs may be as simple as converting data from OSG to VSG and then loading them into a pure VSG application that need not know anything further about the OSG. This type of usage is attempted by the current vsgXchange::OSG loader, but as we have 4 issues reported about it clearly it needs some more work :-)
There are also OSG application developers that will want to keep OSG parts of their application and add VSG usage for performance of functionality reasons. This class of OSG/VSG user will likely want ways of moving data from OSG to VSG, and from VSG to OSG. There may well also want to move GPU resources from OpenGL to Vulkan, and Vulkan to OpenGL.
For this class of user the current vsgXchange::OSG user is very poorly served. This type of integration is also far more extensive than just writing minimal wrappers like has been possible with vsgXchange::GDAL, we'd need OSG and VSG nodes that have be used in OSG or VSG scene graphs, and means of converting/adapting data.
Re-instating osg2vsg or a similar library would natural way to provide this deeper OSG/VSG integration.
Another route might be for a future OSG version to have VSG support as a library that sits alongside osgUtil etc. One might even envisage the OSG adopting parts of the VSG directly to replace existing functionality in the OSG, as the VSG counterparts are just more modern, cleaner, perform better and are more flexible.
VSG integration into future versions of the OSG is kinda out there, and is not something that will happen in the VSG-1.0 time frame, but thinking about these possibilities can help us frame what needs to be done right now to vsgXchange so that it's 1.0 is a natural stepping stone to future work.
My current feeling is that a osg2vsg like library is probably the best interim step, and one that should be done prior to VSG/vsgXchange-1.0.
I don't think having a vsgXchange::OSG that is independent from a osg2vsg library so we either drop vsgXchange::OSG from vsgXchange completely or have vsgXchange check for osg2vsg's OSG ReaderWriter and assigns that to vsgXchange::all so it would behave similar to current functionality.
This is how vsgXchange::OSG was originally integrated - prior to me merging osg2vsg into vsgXchange, so the changes I'm currently thinking of we be kinda a re-wind. The vsgXhange::OSG has developed a long way since the original osg2vsg so it'd be a case of porting all the functionality back.
Last week I had bash at doing this backport but it ended up giving up after two attempts.
It may be just better to start from scratch. The VSG can come a very long way since the early days when osg2vsg was written, we now have vsg::ShaderSet, lighting etc.
Thoughts?
Robert.