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 

DDS textures not loading on Mac OSX and the latest trunk(3.5.0)

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
crubel@compro.net
User


Joined: 12 Aug 2010
Posts: 69
Location: Melbourne, FL USA

PostPosted: Tue Aug 11, 2015 5:52 pm    Post subject:
DDS textures not loading on Mac OSX and the latest trunk(3.5.0)
Reply with quote

Hi,

I have looked a bit and did not find this specific issue listed, I think it
might have been reported already so please accept my apologies
if this is already in the pipeline to get taken care of....

On Mac OSX Yosimite 10.10.3, osg/osgviewer does not seem to be able
to load DDS textures when referenced in our openflight files.

This I believe was first noticed by us back on release 3.3.7 and as
of updating from SVN today from the trunk(3.5.0), still appears to be not
working as our terrain tiles are all showing with no textures. It would
be really great if we can get this fix into the next upcoming release...

At one point we had commented out line 1016 of the ReaderWriterDDS.cpp
if (mipmap_offsets.size()>0) osgImage->setMipmapLevels(mipmap_offsets);

and was able to get the textures to show up. So maybe this will help someone figure out the actual area that is affected.... I would be happy to look but this is way out of my area of knowledge.

I will be happy to help in any way I can though if anyone has any suggestions they would like to try, I can put them in and retest...


...

Thank you!

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


Joined: 18 Mar 2009
Posts: 10989

PostPosted: Tue Aug 11, 2015 7:44 pm    Post subject:
DDS textures not loading on Mac OSX and the latest trunk(3.5.0)
Reply with quote

Hi Curtis,

Assigning a mipmap levels to an osg::Image won't affect loading of
that imagery. So when you say it doesn't load, could it be that it's
loading fine but a rendering bug of some sort is preventing the
texture it's assigned to from working.

Could you try converting the the model to an .osgb file and see if the
.osgb file works.

If possible could you post the orgingal flt model and textures, and
the created .osgb file.

Right now my suspicion is that there is a driver bug where prepared
mipmaps are failing for some reason, or that the mipmap levels in the
dds file are corrupted for some reason.

Robert.



On 11 August 2015 at 18:52, Curtis Rubel <> wrote:
Quote:
Hi,

I have looked a bit and did not find this specific issue listed, I think it
might have been reported already so please accept my apologies
if this is already in the pipeline to get taken care of....

On Mac OSX Yosimite 10.10.3, osg/osgviewer does not seem to be able
to load DDS textures when referenced in our openflight files.

This I believe was first noticed by us back on release 3.3.7 and as
of updating from SVN today from the trunk(3.5.0), still appears to be not
working as our terrain tiles are all showing with no textures. It would
be really great if we can get this fix into the next upcoming release...

At one point we had commented out line 1016 of the ReaderWriterDDS.cpp
if (mipmap_offsets.size()>0) osgImage->setMipmapLevels(mipmap_offsets);

and was able to get the textures to show up. So maybe this will help someone figure out the actual area that is affected.... I would be happy to look but this is way out of my area of knowledge.

I will be happy to help in any way I can though if anyone has any suggestions they would like to try, I can put them in and retest...


...

Thank you!

Cheers,
Curtis

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64725#64725








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
crubel@compro.net
User


Joined: 12 Aug 2010
Posts: 69
Location: Melbourne, FL USA

PostPosted: Tue Aug 11, 2015 8:44 pm    Post subject:
Reply with quote

Hi Robert,

The files ended up being a bit to big to upload I guess as it kept failing.

Here is a a link to my dropbox...

It contains a zip of the flt file, all the dds textures and a .osgb
file converted on the mac.

https://www.dropbox.com/s/t5r8x1s7ee6m107/DDS_TEST.zip?dl=0

This tile will load the textures when I comment out the line I mentioned. Right now that line is back in and no textures are loading.

The issue I see is that while on the MAC I cannot see the textures in osgviewer, when I unzip these files on my linux system and load the osgb file, the textures load properly. So seems its something to do only with the actual loading of the textures and not building of the .osgb
file itself.

We can duplicate this on all our macs, so it does not appear to be just
a one bad mac issue either....

...
Thank you!

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


Joined: 18 Mar 2009
Posts: 10989

PostPosted: Tue Aug 11, 2015 9:18 pm    Post subject:
DDS textures not loading on Mac OSX and the latest trunk(3.5.0)
Reply with quote

Hi Curtis,

Thanks for posting the model. I'm downloading it now.

However it's pretty late here in Scotland, and I have a lot of other
work to prep for the OSG-3.4 release and presentation work to do for
the OSG BOF at Siggraph tomorrow so really don't have time to look
into this evening. Might have chance tomorrow morning.

I don't have an OSX box to test on, so the only tests I can do are to
look at validity of the DDS files themselves and the code that is
reading them, and the OSG code that is downloading the mipmaps to
OpenGL. There is chance I might spot something helpful, but suspect
it will be a case of ruling things out and relying upon OSX users to
do specific tests to confirm the cause of the problem.

It would be very helpful if others could pitch in and look into what
might be causing the problem on the OSX. In particular different
rev's of OSX and different hardware, i.e. Intel vs AMD vs NVidia. It
may be that certain combinations of drivers and hardware are the root
cause.

Robert.


On 11 August 2015 at 21:44, Curtis Rubel <> wrote:
Quote:
Hi Robert,

The files ended up being a bit to big to upload I guess as it kept failing.

Here is a a link to my dropbox...

It contains a zip of the flt file, all the dds textures and a .osgb
file converted on the mac.

https://www.dropbox.com/s/t5r8x1s7ee6m107/DDS_TEST.zip?dl=0

This tile will load the textures when I comment out the line I mentioned. Right now that line is back in and no textures are loading.

The issue I see is that while on the MAC I cannot see the textures in osgviewer, when I unzip these files on my linux system and load the osgb file, the textures load properly. So seems its something to do only with the actual loading of the textures and not building of the .osgb
file itself.

We can duplicate this on all our macs, so it does not appear to be just
a one bad mac issue either....

...
Thank you!

Cheers,
Curtis

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64728#64728








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10989

PostPosted: Tue Aug 11, 2015 9:25 pm    Post subject:
DDS textures not loading on Mac OSX and the latest trunk(3.5.0)
Reply with quote

Hi Curtis,

The model (both .flt and .osgb) works fine for me here - Linux, NVidia
drivers + Geforce GTX 760

Do you get any OpenGL errors reported to the console?

Robert.


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10989

PostPosted: Tue Aug 11, 2015 10:13 pm    Post subject:
DDS textures not loading on Mac OSX and the latest trunk(3.5.0)
Reply with quote

Hi Curtis,

I have gone through the DDS plugin checking the mipmap_offsets vector
that gets passed to the osg::Image to set where the mipmap levels are
and it all looks correct. I've put debugging into the Texture.cpp
where the data gets download to the GPU and again all the values are
as they should be.

I have also modified the mipmap_offsets to produce invalid levels and
these errors get mapped onscreen as I would expect them to. This
shows that these values are being used and are being used correctly.

I have also looked for OSX specifc code paths in Texture.cpp and the
only one relevant is the ClientStoreHint related code but as far as I
can tell this Hint shouldn't enabled in this case so it looks to me
exactly the same code paths should be used under Linux and OSX and
with exactly the same data. The OSG code that I've looked at looks
fine, the data looks fine, it all seems to work as intended.

This leaves me without anything more that I can do at my end. I'll
have to pass this on to OSX dev's to get to the bottom of why
precomputed compressed mipmaps don't work with OSX, they should, it's
a pretty well established part of the spec.

I can't rule out an OSG bug somewhere along the line, but at this
point I have say the most likely cause of the problem is OSX OpenGL
drivers. I would recommend looking into support forums to see if
others have had problems with precomputed compressed mipmaps.

As for workarounds for bugs drivers, perhaps the best thing to do in
this instance would be to look at disabling extensions, or having an
OSX specific hack in your own application code to disable the mipmaps
on the osg::Image so your OSX application doesn't attempt to pass
precomputed mipmaps.

Robert.


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Voerman, L.
Guest





PostPosted: Wed Aug 12, 2015 7:21 am    Post subject:
DDS textures not loading on Mac OSX and the latest trunk(3.5.0)
Reply with quote

Just a quick remark: this problem was already on the mailing list.
OS X (10.9) Texture2D with hardware compression results in no texture data. 

David Guthrie < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> May 28
http://forum.openscenegraph.org/viewtopic.php?p=63862#63862





Regards, Laurens Voerman.

------------------
Post generated by Mail2Forum
Back to top
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10989

PostPosted: Wed Aug 12, 2015 8:55 am    Post subject:
DDS textures not loading on Mac OSX and the latest trunk(3.5.0)
Reply with quote

Hi Laurens,

I recall the thread. Alas there was no conclusion as to cause then.

This time around I have had a chance to the review a dataset that
doesn't work on OSX, and to the relevant code that passes that data to
OpenGL and it all looks OK, so it now I'm more certain it's an OSX
driver bug.

This investigation makes it very clear that hacking the DDS plugin to
disable mipmaps is absolutely the wrong thing to do as this code is
correct and works properly on all platforms - I'm confident that it's
working under OSX as well as it's all vanilla C++ code.

If OSX users are to hack code to workaround what looks like a driver
bug then they'll need to do this in their own applications - such as
traversing the loaded scene graphs to disable the mipmaps in
osg::Image.

Hopefully this bug will be a transient issue and that Apple will fix
the bug rather have users/developers run around trying to patch their
applications to workaround it.

Robert.

On 12 August 2015 at 08:20, Voerman, L. <> wrote:
Quote:
Just a quick remark: this problem was already on the mailing list.

OS X (10.9) Texture2D with hardware compression results in no
texture data.
David Guthrie <> May 28
http://forum.openscenegraph.org/viewtopic.php?p=63862#63862

Regards, Laurens Voerman.





------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
crubel@compro.net
User


Joined: 12 Aug 2010
Posts: 69
Location: Melbourne, FL USA

PostPosted: Wed Aug 12, 2015 12:57 pm    Post subject:
Reply with quote

Hi Robert,

OK I will do some more digging into this and see if I can
find anything myself that could help. Hopefully there
are some other mac folks out there that have a better
background in this area than I do, that would be nice...

I can def say that OSG 3.3.1 is working OK on my mac, as I just
compiled and reloaded it to make sure. So looks like maybe its
something that has changed since that dev release.

I will try 3.3.3 next to see if we can at least isolate when the issue
first started as it might help give some ideas where to look as well.

...

Thank you!

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


Joined: 18 Mar 2009
Posts: 10989

PostPosted: Wed Aug 12, 2015 1:32 pm    Post subject:
DDS textures not loading on Mac OSX and the latest trunk(3.5.0)
Reply with quote

Hi Curtis,

On 12 August 2015 at 13:57, Curtis Rubel < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Robert,

OK I will do some more digging into this and see if I can
find anything myself that could help.  Hopefully there
are some other mac folks out there that have a better
background in this area than I do, that would be nice...

I can def say that OSG 3.3.1 is working OK on my mac, as I just
compiled and reloaded it to make sure.  So looks like maybe its
something that has changed since that dev release.

I will try 3.3.3 next to see if we can at least isolate when the issue
first started as it might help give some ideas where to look as well.


OSG-3.4.0 *is* working even better than 3.3.1.  OSG-3.4.0 has hundreds of bug fixes, code refinements and optimizations.


Ironically, it's the fact that OSG-3.4.0 is working better w.r.t properly support DDS format is what it tripping up OSX.

OSG-3.3.1 and all OSG version before didn't properly support DDS mipmaps so you never got to see the buggy driver problem.


What I've seen so far points to the failure being in OSX OpenGL drivers and nothing to do with the OSG.


To resolve the problem you need to go beyond the OSG, and on to OSX OpenGL drivers.


If you want a short term workaround then simply disable the mapmaps assigned to any osg::Image that are loaded.  Such a hack will work for all data sources of osg::Image.  Remember, it's not a DDS bug, changes to this plugin has just been the trigger for finding the problem which is elsewhere, so there is no reason to believe that it's DDS images that trigger, but mipmapping, so catching it in a more generic way is the best solution.



Robert.
 

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
crubel@compro.net
User


Joined: 12 Aug 2010
Posts: 69
Location: Melbourne, FL USA

PostPosted: Wed Aug 12, 2015 1:53 pm    Post subject:
Reply with quote

Hi Robert,

I know the openGL implementation on the Mac is different, we
run into shader issues all the time when we setup our applications
to run on WIndows, Linux and Mac. It never fails the Mac will have
some sort of issue we need to account for...

A real fix is going to take someone very good at openGL on the mac
to find it then..

Now to find someone to help us on this...I will consult with Frank over at SunDog
Software as I know with SilverLining and Triton he has someone that he uses for
Mac OSX OpenGL/etc., support that might be able to help us on this too.

If I get anything I will update this thread for everyone...
...

Thank you for all your input on this,

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


Joined: 18 Mar 2009
Posts: 10989

PostPosted: Wed Aug 12, 2015 2:02 pm    Post subject:
DDS textures not loading on Mac OSX and the latest trunk(3.5.0)
Reply with quote

Hi Curtis,

On 12 August 2015 at 14:53, Curtis Rubel < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
A real fix is going to take someone very good at openGL on the mac
to find it then..


I suspect it might be a case of just confirming it's an OpenGL driver bug, reporting this, and then coming up for workarounds for the interim.



A NodeVistor that switches off any mipmaps on osg::Image would be where I'd start for a workaround.


Robert.

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
crubel@compro.net
User


Joined: 12 Aug 2010
Posts: 69
Location: Melbourne, FL USA

PostPosted: Wed Aug 12, 2015 2:21 pm    Post subject:
Reply with quote

Hi Robert,

I am searching the OpenGL Mac forums right now to see if I can
find any references to mipmap or compressed textures but so
far no results. I will look a bit more before entering a new
post.

When I was replying earlier I missed the other updates on this
thread that occurred, so I now see you did some pretty thorough testing
to rule out OSG on this...thanks for spending the time, I know your
busy right now with everything else going on..

I will pass on your recommendations to our other developers here
as well on your suggestion on the Nodevisitor switching
off mipmaps in the interim.

...

Thank you very much!

Cheers,
Curtis
Back to top
View user's profile Send private message
crubel@compro.net
User


Joined: 12 Aug 2010
Posts: 69
Location: Melbourne, FL USA

PostPosted: Mon Aug 17, 2015 3:19 pm    Post subject:
Reply with quote

Hi Robert,

After some checking around with our development team,
we discovered that after updating to the latest OSX release
the newest GL package from Apple was also installed
as part of this update and this issue seems to have been resolved...

The numbers from my particular mac:

Version: 4.1 NVIDIA-10.4.2 310.41.35f01

Shading language version: 4.10

Then removing and reconverting all our files into .osgb again
things are loading properly now.

So my apologies for not thinking about updating this before
getting everyone here involved. Normally all our macs are
kept up to date, so was not even thinking about this
as a possibility.

Anyone else having similar issues should try to update their
systems to the latest release of OSX to ensure they have
the latest Apple versions of OpenGL installed.

...

Thank you!

Cheers,
Curtis Embarassed
Back to top
View user's profile Send private message
crubel@compro.net
User


Joined: 12 Aug 2010
Posts: 69
Location: Melbourne, FL USA

PostPosted: Tue Aug 18, 2015 1:10 pm    Post subject:
Reply with quote

Hi Robert,

Maybe I spoke too soon... Just to add some more data
to this thread:

The attached file, terrain.ive is something we use for testing
and is also delivered with Sundog's Triton package as part
of a demo.

This file loads fine on Linux all versions of OSG.

On the mac it loads fine on OSG 3.3.1, but since then
no textures are loaded with this file.

I also have another set of openflight files that have the
same issue, Linux all versions is OK, Mac OS, nothing
after 3.3.1 will load the dds textures.

This link to a small sample database, also has issues
on the Mac, but works fine on all Linux versions:

https://www.dropbox.com/s/nm8f4op5ybw39dq/MalaysiaFlt.tjz?dl=0

It is still likely that this is some Mac OSX OpenGL thing, but
if some time comes up might be worth looking at just to
be sure what is happening with them. Maybe its an old
version of flight formatting or something.

Loading one of the flt tiles on the mac, the only suspicious
message I see is:

Warning: Detected OpenGL error 'invalid operation' at After Render::compile

OpenGL extension'' is not supported.


...

Thank you!

Cheers,
Curtis
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 Regarding Slowing loading of building... Rambabu General 2 Fri Apr 21, 2017 7:59 am View latest post
No new posts How to improve frame rate when loadin... vinothrajendran4 General 9 Wed Feb 22, 2017 2:01 pm View latest post
No new posts Deferring loading in an DB ReaderWrit... James Turner General 1 Fri Nov 18, 2016 8:03 pm View latest post
No new posts Problems with .ive loading Tiniriel Plugins [osgPlugins] 1 Wed Nov 09, 2016 9:55 am View latest post
No new posts Loading problem, OpenVR integration Oneiros General 8 Wed Nov 02, 2016 4:59 pm 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