Re: [osg-users] Texture2D format problem

2008-02-25 Thread Vincent Bourdier
Hello,

I will make my own answer :
I used osg::Image to obtain the unsigned char* data array, and i use it to
melt the two pictures in one.

data[n] = osg::maximum(Edata[n],   (unsigned char)Cdata[i]);

This is not a the solution of the problem, but it can solve it, when no
other solution exist. (Be carefull to the depth of the Image)

If someone have anther solution, I'll be interested.

Thank you.


2008/2/21, Vincent Bourdier [EMAIL PROTECTED]:

 Hello

 I am trying to put 2 Texture2D on the same geometry.

 The backgroud texture is a .jpg file and the foregroud texture is a .png
 file with opacity (clouds map).

 If I use them normally, the foregroud texture is in good position, but in
 place of the transparent's pixels the is only a dark (black) color, and in
 place of the clouds pixels, I can see the background picture...

 if I convert .png file in .jpg(without transparency) it does nothing at
 all.
 and in .gif it does something strange, with a hight level of opacity (very
 transparent) and the white color of the clouds is not visible...

 Is there some picture formats recomendations ?
 How to manage 2 textures on the same geometry ? (melting them)

 Thanks


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Texture2D format problem

2008-02-25 Thread Robert Osfield
HI Vincent,

Perhaps everybody else like me is a bit confused by what you are
actually after.  The OSG supports multi-texturing, and shaders, the
plugins are all orthogonal to final readering - all in all is most
likely what you are trying to do is very straightforward.  I can't
really glean exactly what the problem might be, perhaps you are just
tackling it in an awkward way that is confusing things.

Robert.

On Mon, Feb 25, 2008 at 8:26 AM, Vincent Bourdier
[EMAIL PROTECTED] wrote:
 Hello,

 I will make my own answer :
 I used osg::Image to obtain the unsigned char* data array, and i use it to
 melt the two pictures in one.

 data[n] = osg::maximum(Edata[n],   (unsigned char)Cdata[i]);

 This is not a the solution of the problem, but it can solve it, when no
 other solution exist. (Be carefull to the depth of the Image)

 If someone have anther solution, I'll be interested.

 Thank you.


 2008/2/21, Vincent Bourdier [EMAIL PROTECTED]:

  Hello
 
  I am trying to put 2 Texture2D on the same geometry.
 
  The backgroud texture is a .jpg file and the foregroud texture is a .png
 file with opacity (clouds map).
 
  If I use them normally, the foregroud texture is in good position, but in
 place of the transparent's pixels the is only a dark (black) color, and in
 place of the clouds pixels, I can see the background picture...
 
  if I convert .png file in .jpg(without transparency) it does nothing at
 all.
  and in .gif it does something strange, with a hight level of opacity (very
 transparent) and the white color of the clouds is not visible...
 
  Is there some picture formats recomendations ?
  How to manage 2 textures on the same geometry ? (melting them)
 
  Thanks
 
 


 ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Texture2D format problem

2008-02-25 Thread Vincent Bourdier
Hi Robert.

Perhaps i'm not very clear in what i intend to do :
I want to create a sphere to simulate the earth. for texturing it, i use 2
textures : one of the sea and lands, one of the clouds. the second one can
be with opacity (to keep only clouds).
I would just put the 2 textures on the earth, with the opacity of the clouds
map, to obtain something a little bit realistic.

I am new with OSG applications so I am still searching how to do basic
things like that...

Thanks.

2008/2/25, Robert Osfield [EMAIL PROTECTED]:

 HI Vincent,

 Perhaps everybody else like me is a bit confused by what you are
 actually after.  The OSG supports multi-texturing, and shaders, the
 plugins are all orthogonal to final readering - all in all is most
 likely what you are trying to do is very straightforward.  I can't
 really glean exactly what the problem might be, perhaps you are just
 tackling it in an awkward way that is confusing things.

 Robert.


 On Mon, Feb 25, 2008 at 8:26 AM, Vincent Bourdier
 [EMAIL PROTECTED] wrote:
  Hello,
 
  I will make my own answer :
  I used osg::Image to obtain the unsigned char* data array, and i use it
 to
  melt the two pictures in one.
 
  data[n] = osg::maximum(Edata[n],   (unsigned char)Cdata[i]);
 
  This is not a the solution of the problem, but it can solve it, when no
  other solution exist. (Be carefull to the depth of the Image)
 
  If someone have anther solution, I'll be interested.
 
  Thank you.
 
 
  2008/2/21, Vincent Bourdier [EMAIL PROTECTED]:
 
   Hello
  
   I am trying to put 2 Texture2D on the same geometry.
  
   The backgroud texture is a .jpg file and the foregroud texture is a
 .png
  file with opacity (clouds map).
  
   If I use them normally, the foregroud texture is in good position, but
 in
  place of the transparent's pixels the is only a dark (black) color, and
 in
  place of the clouds pixels, I can see the background picture...
  
   if I convert .png file in .jpg(without transparency) it does nothing
 at
  all.
   and in .gif it does something strange, with a hight level of opacity
 (very
  transparent) and the white color of the clouds is not visible...
  
   Is there some picture formats recomendations ?
   How to manage 2 textures on the same geometry ? (melting them)
  
   Thanks
  
  
 
 

  ___
   osg-users mailing list
   osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Texture2D format problem

2008-02-25 Thread Robert Osfield
HI Vincent,

Have a look at the osgplanets example is has code paths that do
multi-texturing on spheres.

Robert.

On Mon, Feb 25, 2008 at 9:01 AM, Vincent Bourdier
[EMAIL PROTECTED] wrote:
 Hi Robert.

 Perhaps i'm not very clear in what i intend to do :
 I want to create a sphere to simulate the earth. for texturing it, i use 2
 textures : one of the sea and lands, one of the clouds. the second one can
 be with opacity (to keep only clouds).
  I would just put the 2 textures on the earth, with the opacity of the
 clouds map, to obtain something a little bit realistic.

 I am new with OSG applications so I am still searching how to do basic
 things like that...

 Thanks.

 2008/2/25, Robert Osfield [EMAIL PROTECTED]:

  HI Vincent,
 
  Perhaps everybody else like me is a bit confused by what you are
  actually after.  The OSG supports multi-texturing, and shaders, the
  plugins are all orthogonal to final readering - all in all is most
  likely what you are trying to do is very straightforward.  I can't
  really glean exactly what the problem might be, perhaps you are just
  tackling it in an awkward way that is confusing things.
 
  Robert.
 
 
  On Mon, Feb 25, 2008 at 8:26 AM, Vincent Bourdier
  [EMAIL PROTECTED] wrote:
   Hello,
  
   I will make my own answer :
   I used osg::Image to obtain the unsigned char* data array, and i use it
 to
   melt the two pictures in one.
  
   data[n] = osg::maximum(Edata[n],   (unsigned char)Cdata[i]);
  
   This is not a the solution of the problem, but it can solve it, when no
   other solution exist. (Be carefull to the depth of the Image)
  
   If someone have anther solution, I'll be interested.
  
   Thank you.
  
  
   2008/2/21, Vincent Bourdier [EMAIL PROTECTED]:
  
Hello
   
I am trying to put 2 Texture2D on the same geometry.
   
The backgroud texture is a .jpg file and the foregroud texture is a
 .png
   file with opacity (clouds map).
   
If I use them normally, the foregroud texture is in good position, but
 in
   place of the transparent's pixels the is only a dark (black) color, and
 in
   place of the clouds pixels, I can see the background picture...
   
if I convert .png file in .jpg(without transparency) it does nothing
 at
   all.
and in .gif it does something strange, with a hight level of opacity
 (very
   transparent) and the white color of the clouds is not visible...
   
Is there some picture formats recomendations ?
How to manage 2 textures on the same geometry ? (melting them)
   
Thanks
   
   
  
  
 
   ___
osg-users mailing list
osg-users@lists.openscenegraph.org
  
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 


 ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Texture2D format problem

2008-02-25 Thread Vincent Bourdier
Thanks, I think i have understood that TexEnvCombine is necessary. I'll try
this as soon as possible.

Thank you for your explanations.

2008/2/25, Robert Osfield [EMAIL PROTECTED]:

 HI Vincent,

 Have a look at the osgplanets example is has code paths that do
 multi-texturing on spheres.

 Robert.

 On Mon, Feb 25, 2008 at 9:01 AM, Vincent Bourdier

 [EMAIL PROTECTED] wrote:
  Hi Robert.
 
  Perhaps i'm not very clear in what i intend to do :
  I want to create a sphere to simulate the earth. for texturing it, i use
 2
  textures : one of the sea and lands, one of the clouds. the second one
 can
  be with opacity (to keep only clouds).
   I would just put the 2 textures on the earth, with the opacity of the
  clouds map, to obtain something a little bit realistic.
 
  I am new with OSG applications so I am still searching how to do basic
  things like that...
 
  Thanks.
 
  2008/2/25, Robert Osfield [EMAIL PROTECTED]:
 
   HI Vincent,
  
   Perhaps everybody else like me is a bit confused by what you are
   actually after.  The OSG supports multi-texturing, and shaders, the
   plugins are all orthogonal to final readering - all in all is most
   likely what you are trying to do is very straightforward.  I can't
   really glean exactly what the problem might be, perhaps you are just
   tackling it in an awkward way that is confusing things.
  
   Robert.
  
  
   On Mon, Feb 25, 2008 at 8:26 AM, Vincent Bourdier
   [EMAIL PROTECTED] wrote:
Hello,
   
I will make my own answer :
I used osg::Image to obtain the unsigned char* data array, and i use
 it
  to
melt the two pictures in one.
   
data[n] = osg::maximum(Edata[n],   (unsigned char)Cdata[i]);
   
This is not a the solution of the problem, but it can solve it, when
 no
other solution exist. (Be carefull to the depth of the Image)
   
If someone have anther solution, I'll be interested.
   
Thank you.
   
   
2008/2/21, Vincent Bourdier [EMAIL PROTECTED]:
   
 Hello

 I am trying to put 2 Texture2D on the same geometry.

 The backgroud texture is a .jpg file and the foregroud texture is
 a
  .png
file with opacity (clouds map).

 If I use them normally, the foregroud texture is in good position,
 but
  in
place of the transparent's pixels the is only a dark (black) color,
 and
  in
place of the clouds pixels, I can see the background picture...

 if I convert .png file in .jpg(without transparency) it does
 nothing
  at
all.
 and in .gif it does something strange, with a hight level of
 opacity
  (very
transparent) and the white color of the clouds is not visible...

 Is there some picture formats recomendations ?
 How to manage 2 textures on the same geometry ? (melting them)

 Thanks


   
   
  
___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
   
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
   
   
   ___
   osg-users mailing list
   osg-users@lists.openscenegraph.org
  
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
 
 
  ___
   osg-users mailing list
   osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org