OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Exporting OpenFlight from OSG and DDS textures

Goto page 1, 2  Next
 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Plugins [osgPlugins]
View previous topic :: View next topic  
Author Message
Luke74
Newbie


Joined: 02 May 2010
Posts: 6

PostPosted: Tue May 04, 2010 9:28 am    Post subject:
Exporting OpenFlight from OSG and DDS textures
Reply with quote

Hi,

I'm new with OpeneSceneGraph 2.9.6: i'm analysing plugin code to understand if there is the possibility to generate an "OpenFlight (.FLT) file together with textures" by starting directly from a list of DICOM files or by starting from the .OSG and .DDS files generated with the command:
< osgvolume --images *.dcm -o OutputFile.osg >.
At the moment the .flt file obtained by the command
< osgconv Output.osg Output.flt > contains only the volume and not textures model.
I need some suggestion to understand how generate also textures/image information to be able to visualize DICOM files from a generated OpenFlight format.
Thanks in advance

Cheers,
Luca
Back to top
View user's profile Send private message
Paul Martz
Guest





PostPosted: Tue May 04, 2010 3:38 pm    Post subject:
Exporting OpenFlight from OSG and DDS textures
Reply with quote

Luca Colombari wrote:
Quote:
Hi,

I'm new with OpeneSceneGraph 2.9.6: i'm analysing plugin code to understand if there is the possibility to generate an "OpenFlight (.FLT) file together with textures" by starting directly from a list of DICOM files or by starting from the .OSG and .DDS files generated with the command:
< osgvolume --images *.dcm -o OutputFile.osg >.
At the moment the .flt file obtained by the command
< osgconv Output.osg Output.flt > contains only the volume and not textures model.
I need some suggestion to understand how generate also textures/image information to be able to visualize DICOM files from a generated OpenFlight format.
Thanks in advance

Are you saying that the .flt file doesn't store the textures, instead they exist
as separate files? If so, that's correct: OpenFlight doesn't support storing
texture image date within the .flt file.

--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/


------------------
Post generated by Mail2Forum
Back to top
Luke74
Newbie


Joined: 02 May 2010
Posts: 6

PostPosted: Tue May 04, 2010 4:46 pm    Post subject:
Re: Exporting OpenFlight from OSG and DDS textures
Reply with quote

Hi,
Thanks for the answer...
Ok, Currently I don't know very much the logic about OpenSceneGraph and I'm studing it by going into the code. So now my problem is to understand how can I generate an OpenFlight file by handling also all the related images. I need to convert DICOM files into OpenFlight model to use another tool that manages .FLT files.
With OpenFlight Plugin code it is possible to convert (command 'osgconv') directly DICOM files /or intermediate generated .osg file (with external automatic generated DDS texture file) into a new .FLT file where is loaded the volume (nodes): now if I use the command osgviewer to visualize .flt file I am not able to see nothing, only an empty volume, because no textures are supported.
I have downloaded an example of .flt file together with .rgb and rgb.attr files and in this case I am able to visualize it with osgviewer.
So by using RGB plugin I have generate .rgb files from images read from DICOM files but...how could I link the converted OpenFlight file with the external RGB textures? Sorry but I'm confused and I'm trying to understand how implement code with the use of OpenFlight plugin to generate an FLT file with handled textures and visualize a 3D image with osgviewer or other tools that support OpenFlight format.
Back to top
View user's profile Send private message
Paul Martz
Guest





PostPosted: Tue May 04, 2010 6:43 pm    Post subject:
Exporting OpenFlight from OSG and DDS textures
Reply with quote

Luca Colombari wrote:
Quote:
Hi,
Thanks for the answer...
Ok, Currently I don't know very much the logic about OpenSceneGraph and I'm studing it by going into the code. So now my problem is to understand how can I generate an OpenFlight file by handling also all the related images. I need to convert DICOM files into OpenFlight model to use another tool that manages .FLT files.
With OpenFlight Plugin code it is possible to convert (command 'osgconv') directly DICOM files /or intermediate generated .osg file (with external automatic generated DDS texture file) into a new .FLT file where is loaded the volume (nodes): now if I use the command osgviewer to visualize .flt file I am not able to see nothing, only an empty volume, because no textures are supported.
I have downloaded an example of .flt file together with .rgb and rgb.attr files and in this case I am able to visualize it with osgviewer.
So by using RGB plugin I have generate .rgb files from images read from DICOM files but...how could I link the converted OpenFlight file with the external RGB textures? Sorry but I'm confused and I'm trying to understand how implement code with the use of OpenFlight plugin to generate an FLT file with handled textures and visualize a 3D image with osgviewer or other tools that support OpenFlight format.

Well, there's quite a few things that could be going wrong here. If you can view
the DICOM file with DDS textures, then it sounds like your DDS plugin works. So
I guess the question is: Why is it that when you view a FLT file, the DDS
textures don't show up? First thing to check would be: Is it loading the DDS
files? To find out, set OSG_NOTIFY_LEVEL=DEBUG and then run osgviewer on your
FLT file. Look through the output to see if it is finding and loading your DDS
files correctly.

If it is loading them correctly, then next thing is to compare your first OSG
file with your second OSG file to see what's wrong. For example, in your first
post, you said you used osgvolume to create an OSG file called output.osg. Then
you convert it to FLT and can't view it. So the question is why? The way to find
out: convert that FLT file back to OSG, call it "output2.osg". Then open both
OSG files in a text editor and compare them side by side and look for
differences to explain why the first file works and the second doesn't.

It could be the case that your first OSG file, output.osg, uses features of OSG
that aren't supported in FLT. I don't have enough information to say for sure.
You just need to investigate and debug.

--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/


------------------
Post generated by Mail2Forum
Back to top
Luke74
Newbie


Joined: 02 May 2010
Posts: 6

PostPosted: Wed May 05, 2010 10:16 am    Post subject:
Re: Exporting OpenFlight from OSG and DDS textures
Reply with quote

Hi Paul,
I have followed your suggestions:
- by using command osgvolume it is possible to obtain OSG output file (with related DDS texture file) or to obtain an IVE file: these are correctly visualized with command osgviewer;
- the FLT file generated by using command osgconv to convert from OSG or IVE format to FLT (OpenFlight) format is basically empty without substantial information related to volumes, imagelayers , references to external textures file and so on.
So you are right because if I re-convert the FLT file to a second OSG or IVE output file than these are not more correctly visualized: by editing all these files with a Text Editor I can compare first correct OSG output file with second OSG output file with lost information.

So I supposed that the FLT_WRITER code of flt_plugin could be rewritten by me to allow a correct conversion from OSG or IVE to FLT format.

I'm taking it useful to use this forum to know if someone have encountered the same conversion problems from a specific format to FLT format: so I can understand if I'm missing something about correct use of OpenSceneGraph commands (or implemented code) or if it is actually necessary to implement their own additional code for FLT_Plugin made available in the OpenSceneGraph 2.9.6 version.

Thanks again for your attention and for your eventual new answer based on your knowledge in this context.
Back to top
View user's profile Send private message
Paul Martz
Guest





PostPosted: Wed May 05, 2010 4:37 pm    Post subject:
Exporting OpenFlight from OSG and DDS textures
Reply with quote

Luca Colombari wrote:
Quote:
So I supposed that the FLT_WRITER code of flt_plugin could be rewritten by me to allow a correct conversion from OSG or IVE to FLT format.

OSG supports many more features than FLT. The FLT importer doesn't exercise all
OSG features. Similarly, the exporter doesn't (can't) support converting all OSG
features to FLT.

The FLT exporter was designed primarily to support exporting the same subset of
OSG features used by the FLT importer. Thus you should be able to load a FLT
file into OSG, then export it back to FLT, and get something close to the
original FLT file. It was not a goal of the exporter (nor is it possible) to
support exporting arbitrary OSG scene graphs.

Please post here with a list of the OSG features in your scene graph that are
not being exported to FLT, and what OpenFlight record types you plan to use to
support these features in the exporter.

--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/


------------------
Post generated by Mail2Forum
Back to top
Trajce (Nick) Nikolov
Guest





PostPosted: Wed May 05, 2010 10:19 pm    Post subject:
Exporting OpenFlight from OSG and DDS textures
Reply with quote

Can you also post the FLT file ?-Nick


On Wed, May 5, 2010 at 6:35 PM, Paul Martz < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Luca Colombari wrote:
Quote:
So I supposed that the FLT_WRITER code of flt_plugin could be rewritten by me to allow a correct conversion from OSG or IVE to FLT format.


OSG supports many more features than FLT. The FLT importer doesn't exercise all OSG features. Similarly, the exporter doesn't (can't) support converting all OSG features to FLT.

The FLT exporter was designed primarily to support exporting the same subset of OSG features used by the FLT importer. Thus you should be able to load a FLT file into OSG, then export it back to FLT, and get something close to the original FLT file. It was not a goal of the exporter (nor is it possible) to support exporting arbitrary OSG scene graphs.

Please post here with a list of the OSG features in your scene graph that are not being exported to FLT, and what OpenFlight record types you plan to use to support these features in the exporter.

--
 -Paul Martz      Skew Matrix Software
                  http://www.skew-matrix.com/
_______________________________________________


osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




------------------
Post generated by Mail2Forum
Back to top
Luke74
Newbie


Joined: 02 May 2010
Posts: 6

PostPosted: Thu May 06, 2010 8:48 am    Post subject:
Re: Exporting OpenFlight from OSG and DDS textures
Reply with quote

Hi Paul,
Posted the osg file generated with command:
<osgvolume --images *.dcm -o OSG_output1.osg>
By opening it with a text editor you are able to see the entire structure sholud be converted in another format together with the reference to the DDS texture file autogenerated with osg file.

Posted also the converted FLT file from OSG file with command <osgconv OSG_output1.osg FLT_ConvertedOutput1.flt> without any option.
By opening it with text editor what I can see is quite incomprensible but it is clear that any features have been exported (apart the definition of a volume group).
Now I'm moving to try getting a full description of an OpenFlight format to understand better how records could be witten into a flt file.

Cheers
Back to top
View user's profile Send private message
Paul Martz
Guest





PostPosted: Thu May 06, 2010 3:03 pm    Post subject:
Exporting OpenFlight from OSG and DDS textures
Reply with quote

Luca Colombari wrote:
Quote:
Attachments:
http://forum.openscenegraph.org//files/osg_output1_127.osg

The FLT plugin doesn't have a dependency on the osgVolume nodekit. You'll have
to figure out how to map osgVolume objects to FLT records. Good luck with that.

--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/


------------------
Post generated by Mail2Forum
Back to top
Luke74
Newbie


Joined: 02 May 2010
Posts: 6

PostPosted: Fri May 07, 2010 4:47 pm    Post subject:
Re: Exporting OpenFlight from OSG and DDS textures
Reply with quote

Hi Paul,
sorry last question about your courteous answer.
Continuing with the analysis and study of the OSG code now it's clearer to me what you meant about feauters that are recognized in FLT plugin.
Now I've understood that FLT plugin is only mapped with OSG objects so
an OSG file written with features like:
- osg::Group
- osg::Geode
- osg::StateSet
- osg::Texture2D
- osg::Geometry
- ... and so on
can be correctly translated into OpenFlight format by FLT Plugin.
Features like:
- osgVolume::Volume
- osgVolume::Image Layer
-....
are not recognized.
So one way could be to try mapping osgVolume object to FLT records by knowing the OpenFlight format and how write their information into the .flt file.

....but.....

The osg file I posted to you have been instead generated with osgVolume objects by using the osgVolume plugin and example code: in fact OpenScenGraph gives the possibility to generate a volume of images directly by using osgVolume executable application.

If my intention is to generate a VOLUME of dicom images seen as overlapping dicom images I'm wondering if it is possible to obtain with OpenSceneGraph an osg file that uses only osg features (for example osg::Group instead of osgVolume::Volume and so on).
So another way for me could be re-write or generate a new osg file written only with osg features and not with osgVolume features not recognized by FLT plugin. I'd like to know if possible your last opinion about the possibility to create a volume of images without using osgVolume application (objects) but only osg objects.

Thank you very much
Back to top
View user's profile Send private message
Paul Martz
Guest





PostPosted: Fri May 07, 2010 9:06 pm    Post subject:
Exporting OpenFlight from OSG and DDS textures
Reply with quote

Luca Colombari wrote:
Quote:
Hi Paul,
Features like:
- osgVolume::Volume
- osgVolume::Image Layer
-....
are not recognized.

Right, currently not recognized or used by the FLT plugin.

Quote:
So one way could be to try mapping osgVolume object to FLT records by knowing the OpenFlight format and how write their information into the .flt file.

Right. You would need to figure out how to support these OSG features when
creating the FLT file, using OpenFlight's (relatively speaking) limited features.

By the way: I've never seen a FLT file used to store volumetric data. But, if I
recall correctly, FLT does support 3D textures.

Quote:
If my intention is to generate a VOLUME of dicom images seen as overlapping dicom images I'm wondering if it is possible to obtain with OpenSceneGraph an osg file that uses only osg features (for example osg::Group instead of osgVolume::Volume and so on).

That's an interesting approach. You wouldn't need to modify the FLT plugin if
you could do that.

I'm sure the osgVolume nodekit has many useful features, but honestly I don't
think it's required to create an OSG scene graph to render volumetric data. In
fact, I remember seeing an OSG app running at SIGGRAPH 2004 that was displaying
volumetric data. This was long before the osgVolume nodekit existed. So,
certainly this is possible.

I'm not sure exactly what your scene graph needs to display. But the general
approach for rendering volumetric data is to use a 3D texture with several
screen-oriented triangle pairs. You'd orient those to the screen with a shader.
This can all be done with core OSG and no need for the custom node types present
in the osgVolume nodekit. It should export to FLT.

--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/


------------------
Post generated by Mail2Forum
Back to top
Rambabu
Appreciator


Joined: 10 Nov 2016
Posts: 101

PostPosted: Fri Nov 18, 2016 11:50 am    Post subject:
Reply with quote

Hi,How to convert the .osg files like cessna.osg to .flt files.

...

Thank you!

Cheers,
Rambabu
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11275

PostPosted: Fri Nov 18, 2016 1:55 pm    Post subject:
Exporting OpenFlight from OSG and DDS textures
Reply with quote

On 18 November 2016 at 11:50, Rambabu Repaka <> wrote:
Quote:
Hi,How to convert the .osg files like cessna.osg to .flt files.

To just convert files via the osgconv utility:

osgconv cessna,osg cessna.flt

This only works for plugins that support writing of nodes, most 3d
plugins don't support writing, but in the case of OpenFlight you are
lucky it does.

Robert.


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Rambabu
Appreciator


Joined: 10 Nov 2016
Posts: 101

PostPosted: Tue Nov 22, 2016 4:16 am    Post subject:
Reply with quote

Hi,Can anyone provide the link for download of jpeg and png plugins for osg 3.5.1 version.

...

Thank you!

Cheers,
Rambabu
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11275

PostPosted: Tue Nov 22, 2016 8:15 am    Post subject:
Exporting OpenFlight from OSG and DDS textures
Reply with quote

On 22 November 2016 at 04:16, Rambabu Repaka <> wrote:
Quote:
Hi,Can anyone provide the link for download of jpeg and png plugins for osg 3.5.1 version.

Please spend more effort on crafting your posts so that has the
information that relevant to your question.

Your posts makes the assumption everyone else KNOWS what platform you
are working on.

Your posts makes the assumption everyone else KNOWS what build tools
and options you are using for your current version of the OSG that you
are using.

Thing is, NOBODY except YOU knows this information.

It really doesn't take much time to actually think about what might be
relevant to others when asking questions, it's just requires basic
programmer knowledge and a bit of consideration towards others.


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Plugins [osgPlugins] All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Exporting to 3D studio? bbjorn General 2 Fri Dec 08, 2017 9:49 am View latest post
No new posts Slow optimization and OpenFlight Andreas Ekstrand General 14 Fri Nov 17, 2017 4:16 pm View latest post
No new posts Multi-threaded usage of textures anishuz Submission 7 Tue Oct 17, 2017 8:38 am View latest post
No new posts BVH and model axis centering: a model... Paradox Plugins [osgPlugins] 0 Mon Oct 16, 2017 4:27 pm View latest post
No new posts Multiple video textures using ffmpeg ... mmaurus Plugins [osgPlugins] 6 Thu Oct 05, 2017 10:02 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP