GeekOwl Newbie
Joined: 15 Sep 2017 Posts: 6
|
Posted: Thu Oct 12, 2017 12:32 pm Post subject: custom file |
|
|
Hi,
At an old project we wish to move render platfrom to osg. The files associated with project have a custom format - it's more complicated than .obj file  (
Is there any example i can follow or just should i give up ?
...
Thank you!
Cheers,
Hakan |
|
robertosfield OSG Project Lead
Joined: 18 Mar 2009 Posts: 12204
|
Posted: Thu Oct 12, 2017 2:08 pm Post subject: custom file |
|
|
Hi Hakan,
On 12 October 2017 at 13:32, Hakan Gedek < ( Only registered users can see emails on this board! Get registred or enter the forums! |
)> wrote:
Quote:
|
At an old project we wish to move render platfrom to osg. The files associated with project have a custom format - it's more complicated than .obj file (
Is there any example i can follow or just should i give up ?
|
The OSG has over a hundred plugins for loading different types of image and 3d data, it's all open source, so there are plenty of real examples. Each of these plugins provide one or more ReaderWriter subclasses that override the appropriate readNode/readImage() method to provide the hook to loading a file.
You can write a loader in the form of a plugin or just compile it directly into your application - the proxy object registration of ReaderWriter works in exactly the same way regardless of whether it's loaded as a plugin or compiled directly into an application.
So the hooks to getting the OSG to call your custom ReaderWriter are pretty minimal and straight forward - just look at the obj loader for example, so the bulk of the work will be parsing the file format and then converting the loaded data over into OSG specific data structures. This part we can't help directly with - only your and your team know the specifics of your file format and what type of data it represents.
Robert.
------------------
Post generated by Mail2Forum |
|