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 

osgconv.exe textures getting mangled

Goto page 1, 2  Next
 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
macher
User


Joined: 20 Jul 2009
Posts: 20

PostPosted: Thu Aug 06, 2009 8:31 am    Post subject:
osgconv.exe textures getting mangled
Reply with quote

Hi,
I have a model in ive format and osgviewer displays it fine. However if i convert it to osg, i get black and white shaded files as textures, which are of no use. I am using osgconv.exe with the following command line

osgconv.exe -e osg -O OutputTextureFiles -O precision:0.001 model.ive model.osg

Is there anything which i am missing ??

Thank you!
Mach
Back to top
View user's profile Send private message
joctee (Joakim Simonsson)
Newbie


Joined: 24 Dec 2008
Posts: 17

PostPosted: Thu Aug 06, 2009 12:00 pm    Post subject:
osgconv.exe textures getting mangled
Reply with quote

On Thu, 06 Aug 2009 10:31:57 +0200, Mach Bhai <> wrote:

Quote:
Hi,
I have a model in ive format and osgviewer displays it fine. However if
i convert it to osg, i get black and white shaded files as textures,
which are of no use. I am using osgconv.exe with the following command
line

osgconv.exe -e osg -O OutputTextureFiles -O precision:0.001 model.ive
model.osg

Try

osgconv.exe -e osg -O "OutputTextureFiles precision 4" model.ive model.osg

precision takes an integer
multiple options are space separated

--
Joakim Simonsson


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


Joined: 20 Jul 2009
Posts: 20

PostPosted: Thu Aug 06, 2009 12:12 pm    Post subject:
Reply with quote

Thanks but it didnt work. I am still not getting correct textures.
Back to top
View user's profile Send private message
joctee (Joakim Simonsson)
Newbie


Joined: 24 Dec 2008
Posts: 17

PostPosted: Thu Aug 06, 2009 12:14 pm    Post subject:
osgconv.exe textures getting mangled
Reply with quote

On Thu, 06 Aug 2009 14:00:15 +0200, Joakim Simonsson <>
wrote:

Quote:
On Thu, 06 Aug 2009 10:31:57 +0200, Mach Bhai <> wrote:

Quote:
Hi,
I have a model in ive format and osgviewer displays it fine. However if
i convert it to osg, i get black and white shaded files as textures,
which are of no use. I am using osgconv.exe with the following command
line

osgconv.exe -e osg -O OutputTextureFiles -O precision:0.001 model.ive
model.osg

Try

osgconv.exe -e osg -O "OutputTextureFiles precision 4" model.ive
model.osg

precision takes an integer
multiple options are space separated

When I try the OutputTextureFiles option, I also get black and white
striped textures.

What image format do you use? I use .rgb.

If you also use .rgb, perhaps it is something with the .rgb plugin...

--
Joakim Simonsson


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


Joined: 20 Jul 2009
Posts: 20

PostPosted: Thu Aug 06, 2009 12:17 pm    Post subject:
Reply with quote

Yes i am also getting rgb files. It might be that something is wrong with that plugin but i cannot verify. Can we specify the format of the texture ?
Back to top
View user's profile Send private message
joctee (Joakim Simonsson)
Newbie


Joined: 24 Dec 2008
Posts: 17

PostPosted: Thu Aug 06, 2009 12:23 pm    Post subject:
osgconv.exe textures getting mangled
Reply with quote

No, it is not possible.

The current osg implementation looks for the filename extension for the
texture inside the .ive file.
If the texture originally was an .rgb texture, it will try to write it to
that format as well.

On Thu, 06 Aug 2009 14:17:43 +0200, Mach Bhai <> wrote:

Quote:
Yes i am also getting rgb files. It might be that something is wrong
with that plugin but i cannot verify. Can we specify the format of the
texture ?

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








--
Joakim Simonsson


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


Joined: 20 Jul 2009
Posts: 20

PostPosted: Thu Aug 06, 2009 12:42 pm    Post subject:
Reply with quote

So how can this issue be resolved ?
Back to top
View user's profile Send private message
joctee (Joakim Simonsson)
Newbie


Joined: 24 Dec 2008
Posts: 17

PostPosted: Thu Aug 06, 2009 12:48 pm    Post subject:
osgconv.exe textures getting mangled
Reply with quote

You are using compressed textures in the ive file, right?

I figured out that the rgb plugin can't write compressed textures.

The only pixel formats that are supported are:


GLenum pixelFormat = img.getPixelFormat();

raw.sizeZ =
pixelFormat == GL_COLOR_INDEX? 1 :
pixelFormat == GL_RED? 1 :
pixelFormat == GL_GREEN? 1 :
pixelFormat == GL_BLUE? 1 :
pixelFormat == GL_ALPHA? 1 :
pixelFormat == GL_RGB? 3 :
pixelFormat == GL_BGR ? 3 :
pixelFormat == GL_RGBA? 4 :
pixelFormat == GL_BGRA? 4 :
pixelFormat == GL_LUMINANCE? 1 :
pixelFormat == GL_LUMINANCE_ALPHA ? 2 : 1;

When an compressed pixelformat (0x83f0) is encountered, it is treated as
an unknown pixel format. And hence 1 is used for sizeZ...


On Thu, 06 Aug 2009 14:42:03 +0200, Mach Bhai <> wrote:

Quote:
So how can this issue be resolved ?

The issue can be solved by extending the rgb plugin, so that it can write
compressed textures.

OR

Don't compress your textures when you create the ive file...

--
Joakim Simonsson


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


Joined: 20 Jul 2009
Posts: 20

PostPosted: Thu Aug 06, 2009 12:55 pm    Post subject:
Reply with quote

I will want to go with the first approach and add support for writing compressed textures.
So how can I go about uncompressing this data ? Any clues ?

and thanks for your help.
Back to top
View user's profile Send private message
joctee (Joakim Simonsson)
Newbie


Joined: 24 Dec 2008
Posts: 17

PostPosted: Thu Aug 06, 2009 1:19 pm    Post subject:
osgconv.exe textures getting mangled
Reply with quote

On Thu, 06 Aug 2009 14:55:12 +0200, Mach Bhai <> wrote:

Quote:
I will want to go with the first approach and add support for writing
compressed textures.
So how can I go about uncompressing this data ? Any clues ?

You have to write an S3TC uncompressor.

I have done this in a school project some years ago... If you want I can
try to dig up that code.

Quote:

and thanks for your help.


--
Joakim Simonsson


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


Joined: 20 Jul 2009
Posts: 20

PostPosted: Thu Aug 06, 2009 1:24 pm    Post subject:
Reply with quote

If you can do that, it would be very kind of you.
Back to top
View user's profile Send private message
joctee (Joakim Simonsson)
Newbie


Joined: 24 Dec 2008
Posts: 17

PostPosted: Thu Aug 06, 2009 1:33 pm    Post subject:
osgconv.exe textures getting mangled
Reply with quote

Gotta go now. See what I can do tomorrow.

On Thu, 06 Aug 2009 15:24:40 +0200, Mach Bhai <> wrote:

Quote:
If you can do that, it would be very kind of you.

--
Joakim Simonsson


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


Joined: 20 Jul 2009
Posts: 20

PostPosted: Thu Aug 06, 2009 1:39 pm    Post subject:
Reply with quote

thanks i am looking forward to your help
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 8598

PostPosted: Thu Aug 06, 2009 1:45 pm    Post subject:
osgconv.exe textures getting mangled
Reply with quote

Hi Mach,

The .dds plugin supports writing compressed textures, so changing the
extension of the images from .rgb to .dds would probably do the trick.

Robert.


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


Joined: 20 Jul 2009
Posts: 20

PostPosted: Thu Aug 06, 2009 1:52 pm    Post subject:
Reply with quote

Thanks, i only have the ive files, i dont have the original texture files.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General 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 Access loaded model's textures. Meessen General 5 Thu Oct 09, 2014 1:19 pm View latest post
No new posts missing textures of collada model in ... SandroWeber Plugins [osgPlugins] 1 Wed Jul 23, 2014 7:10 pm View latest post
No new posts Crash-fix in Glyph.cpp if scene has 2... jaap_glas_dgb Submission 1 Thu Jul 17, 2014 12:58 pm View latest post
No new posts Osgconv citygml -> dae emmanuel s├ęguin General 3 Mon Mar 10, 2014 12:28 pm View latest post
No new posts osgconv Ekaterina General 8 Mon Feb 24, 2014 1:51 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