[osg-users] Passing different textures using GLSL

2011-07-05 Thread Linda Lee
Hi,

I need to develop an application to pass streams and lots of different textures 
into GPU for processing.  An I suppose to use glTexSubImage2D?  If so how do 
i used it and if there is any sample code I could refer to?

Thank you!

Cheers,
Linda

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





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


Re: [osg-users] Passing multiple textures in glsl

2011-06-11 Thread Linda Lee
Hi,

I tried add these lines into my code:


osg::Texture2DArray* tileImgLay;
tileImgLay = new osg::Texture2DArray;
tileImgLay-setTextureSize(128, 128, 2);
tileImgLay-setUseHardwareMipMapGeneration(false);   


tileImgLay-setImage(0, osgDB::readImageFile(test1.bmp));
tileImgLay-setImage(1, osgDB::readImageFile(est1.bmp));
ss-setTextureAttribute(1, tileImgLay); 


tileImgLay-setFilter( osg::Texture2DArray::MIN_FILTER, 
osg::Texture2DArray::NEAREST); 
tileImgLay-setFilter( osg::Texture2DArray::MAG_FILTER, 
osg::Texture2DArray::NEAREST); 

ss-addUniform( new osg::Uniform(test, 1) );

and in the fragment shader:

uniform sampler2DArray test;


and access it using:

gl_FragColor = texture2DArray(test, vec3(0, 0, 0)); 


However, it fail to work.

Any ideal why?


Thank you!

Cheers,
Linda

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





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


Re: [osg-users] Passing multiple textures in glsl

2011-06-11 Thread Linda Lee
Hi,

I did not get any compiler error.  The application runs successfully.  However, 
the texture did not seem to be loaded into the shader code.  The image rendered 
as black in color.

As the lines, Where should I add them?
#version 120 
#extension GL_EXT_gpu_shader4 : enable 
#extension GL_EXT_texture_array : enable 

I gotten error msg when I add them into the main .cpp file. 

Thank you!

Cheers,
Linda

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





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


Re: [osg-users] Passing multiple textures in glsl

2011-06-11 Thread Linda Lee
Hi,

Nope.  The typo is caused when I cut and paste into the posting textbox.  I am 
quite sure the textures were loaded correctly.

Any idea what is causing the problem? :(

Thank you!

Cheers,
Linda

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





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


Re: [osg-users] Passing multiple textures in glsl

2011-06-11 Thread Linda Lee
Hi,

Forgot to mention to I have this msg when I run the application.

Warning: detected OpenGL error 'invalid enumerant' after RenderBin::draw(,)

Thank you!

Cheers,
Linda

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





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


[osg-users] Passing multiple textures in glsl

2011-06-10 Thread Linda Lee
Hi,

I need to handle multiple textures in glsl.  Any suggestions how do I do it?  
Should I use sampler2DArray?  How do I use it?  Any links I could take 
reference from?

Also, is there a limit to the amount of textures I could load into GPU.   I 
tried loading 25 4096by4096 textures and it crashes when I tried to load more.  
Is there any ways to increase the amount that I could load?

Thank you!

Cheers,
Linda

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





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


[osg-users] rendering dae model into texture

2011-05-07 Thread Linda Lee
Hi,

I have an application to take various view of a dae model and render into 
textures.  I used and worked from the sample project from osgScreenCapture.  I 
managed to do the screen capture and the textures captured of the model appear 
to be textureless.  When I tried to load other files eg openflight, the model 
captured appear to have textured mapped.  I also tried to load the dae model 
using other osg application code and the model appears perfect with relevant 
textures mapped onto it.

It seems to appear that when I tried to load dae file in the screen capture 
code, its texture somehow do not appear.  

Could anyone give some advise what I could have done wrong?

Thank you!

Cheers,
Linda

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





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


Re: [osg-users] Collada

2011-04-30 Thread Linda Lee
Hi,

I managed to load the jpg files after changing some paramenters in the CMAKE 
file.  Thanks.

Thank you!

Cheers,
Linda

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





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


Re: [osg-users] Collada

2011-04-29 Thread Linda Lee
Hi,

I managed to get the plugin dae folder to appear in the OSG solution workspace. 
 However, I still have problem loading dae files.  Nevertheless, I decide to 
have a workaround solution by converting the dae file to osg and load the osg 
file instead.  

However, I realized that while converting the dae files, it has problem loading 
jpg files.  Could anyone advise how do I get OSG to load jpeg files?

I know I would need to downloads stuff from 
http://gnuwin32.sourceforge.net/packages/jpeg.htm;.  However, I am not sure 
what to download, which folder to put them, and if I need to compile anything 
and the steps to make it work, etc.

Please advise.  Any help is deeply appreciated.


Thank you!

Cheers,
Linda

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





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


Re: [osg-users] Collada

2011-04-29 Thread Linda Lee
Hi,

Am I suppose to see the jpeg plugin folder in the OSG solution?  If yes, then I 
must have done something wrong while setting up the solution or downloaded the 
older third party files.  I am using OSG 2.8.3.  Could you point me to the 
third party download you have?  Don't we need to compile additional stuff to 
make OSG be able to load jpeg?

Thank you!

Cheers,
Linda

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





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


Re: [osg-users] Collada

2011-04-29 Thread Linda Lee
Hi,

Forgot to indicate that I could not find the jpeg plugin folder in my OSG file. 
 In addition while doing the configuration at CMAKE, I have this msg Could NOT 
find JPEG (missing:  JPEG_LIBRARY JPEG_INCLUDE_DIR).  Any advise how to solve 
this?

Thank you!

Cheers,
Linda

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





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


Re: [osg-users] Collada

2011-04-27 Thread Linda Lee
Hi,

I tried following the steps from the link.  However, I have difficulty getting 
rid of the Could NOT find LibXml2 (missing:  LIBXML2_LIBRARIES 
LIBXML2_INCLUDE_DIR)  msg from CMake.

Any advise how to solve this?



Thank you!

Cheers,
Linda

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





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


Re: [osg-users] Collada

2011-04-23 Thread Linda Lee
Hi,

I don't think I have the DAE plugin built.  Could anyone advise how do I build 
and include the DAE plugin?

Thank you!

Cheers,
Linda

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





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


Re: [osg-users] Collada

2011-04-22 Thread Linda Lee
Hi,

I try loading a dae file using the following line
Group* terrain = (osg::Group*) osgDB::readNodeFile(model.dae);

But I have an error msg saying Warning: Could not find plugin to read objects 
from file model.dae.

Any advice why?

Thank you!

Cheers,
Linda

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





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


[osg-users] Collada

2011-04-21 Thread Linda Lee
Hi,

I am using OSG 2.8.3.  Just wonder if I could load a collada file with this 
version?  If so, how do I load them?  Or if I need to download additional files?

Thank you!

Cheers,
Linda

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





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


[osg-users] Using only geometries from highest LOD

2011-04-17 Thread Linda Lee
Hi,

I need to do screencaptures of a scene from different views.  And I need the 
terrain to be switched to the highest LOD to capture all details.  Is there a 
way to force the terrain (an openflight terrain) to switch to the highest LOD 
when rendering in OSG?

Thank you!

Cheers,
Linda

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





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


[osg-users] Multitexture in Shader

2011-03-15 Thread Linda Lee
Hi,

Has anyone encountered this problem where only the first texture at layer 0 
seems to successfully passed to the shader code but not the other textures with 
textureID of 1, 2, ... ?

Thank you!

Cheers,
Linda

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





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


Re: [osg-users] Multitexture in Shader

2011-03-15 Thread Linda Lee
Hi,

I did some testing.  The code seems to work properly until I try to put them 
into the osgsceencapture sample to do sceenshot.  It seems that only the first 
texture is successfully passed to the shader program.  Any idea why it does not 
work?  Or is there a way to pass multiple textures into the shader program and 
still able to work in the osgscreencapture code and to do screenshot?

Thank you!

Cheers,
Linda

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





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


[osg-users] Generating terrain mesh using 3D points

2011-03-10 Thread Linda Lee
Hi,

Has anyone tried generating a terrain mesh using 3D points?  Any advice of how 
to get started?  I have some terrain data consisting of 3D points and need to 
develop functions to query the terrain height during runtime.

Thank you!

Cheers,
Linda

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





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


[osg-users] Changing background color

2011-02-26 Thread Linda Lee
Dear All,

I am trying to change the background color from dark blue to black in color.  
Could someone tell me how to do it?   

Thank you!

Cheers,
Linda

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





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


[osg-users] Changing vertex color for openflight model

2011-01-30 Thread Linda Lee
Hi,

I tried changing the vertex colors for an openflight model using the following 
functions:

osg::ref_ptrosg::Vec4Array colors = new osg::Vec4Array;
int num =  vertex-getNumElements(); 
for (int j = 0; j  num; j++)
colors-push_back(osg::Vec4(0, 0, 0, 1.0f));
geo-setColorArray(colors.get());
geo-setColorBinding(osg::Geometry::BIND_PER_VERTEX);

But it seems to fail.  Just wonder if I am have missed out some important lines 
of codes?

Thank you!

Cheers,
Linda

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





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


Re: [osg-users] Changing vertex color for openflight model

2011-01-30 Thread Linda Lee
Hi,

Thank you for your reply and suggestions.  I did what you suggested like using 
geo-dirtyDisplayList() and stuffs.  I think that I did most of it correctly as 
I realized with more debugging that it works only on certain openflight files.  
I suspects that some attributes on the some openflight files are preventing me 
from changing or overriding the vertex colors.  Just wonder if anyone has 
encountered similar problems.

Thank you!

Cheers,
Linda

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





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


[osg-users] Accessing Vertex attributes of a loaded flt model

2011-01-25 Thread Linda Lee
Hi,

I need to read all the vertex position and normal of a loaded flt model.  I 
tried using InfoVisitor to get all Geode nodes and get information on the 
vertices but not sure how to do it. 

Could someone advise how I should go about getting information on the vertex 
position and normal?

Thank you!

Cheers,
Linda

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





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


Re: [osg-users] Shadows in OSG

2011-01-17 Thread Linda Lee
Hi,

How about learning the way OSG structures the shadow code.  I found it 
difficult understanding how OSG manage shadow.  Could anyone briefly explain 
the shadow codes in OSG or is there any way I could learn more on them?

Thank you!

Cheers,
Linda

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





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


[osg-users] Shadows in OSG

2011-01-16 Thread Linda Lee
Hi everyone,

I am trying to learn to the detail implementation of shadowing in OSG and maybe 
to develop my own shadow technique.  Could anyone give some advices on where I 
should get started or if there is any online resources that I could start 
learning with?

Thank you!

Cheers,
Linda

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





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


Re: [osg-users] StandardShadowMap effect

2010-12-28 Thread Linda Lee
Hi Wojtek Lewandowski,

Thanks for your help.

I tried using ShadowMap and the effect is the same.  How do I check if my model 
is using texture coordinates on the same stage as shadow map (1 by default)?  I 
tried using ShadowTexture and the effect is okay.  But it seems that of all 
Shadow effects, only Shadow Texture seems to work on my machine.  I am using 
ATI Mobility Radeon HD 4330.  Is that an issue?

Thank you!

Cheers,
Linda

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





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


[osg-users] Shadows in large Urban area

2010-12-28 Thread Linda Lee
Dear all,

I am new to OSG and is thinking of implementing shadows in a large urban area 
with lots of buildings.  Could anyone tell me if this is feasible and what 
shadow tecnique should I used?  Or should I try to implement a customized 
shadow algorithm?  Would computation performance be an issue?

Any suggestions and advices would be most welcome.  

Thank you!

Cheers,
Linda

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





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


Re: [osg-users] StandardShadowMap effect

2010-12-28 Thread Linda Lee
Hi Wojtek Lewandowski,

I tried using cow.osg and have similar problem.  I tried download the driver 
from AMD website but the latest version they have is 10.12 and it seems to keep 
crashing after installed.  Do you think there is any work around using the ATI 
card like change the mapping method for the shadow texture?  Or should I keep 
to find another device or simply abandon this machine?

Thank you!

Cheers,
Linda

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





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


[osg-users] Shadow implementation

2010-12-27 Thread Linda Lee
Hi,

I have tried using StandardShadowMap.  However I am having strange effect as 
attached in this post.  Could anyone give some clue what is wrong?

Thank you!

Cheers,
Linda

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




Attachments: 
http://forum.openscenegraph.org//files/shadow_500.jpg


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


[osg-users] StandardShadowMap effect

2010-12-27 Thread Linda Lee
Hi,

I tried using StandardShadowMap but however, have strange result as attached.  
Could anyone give some clue as what went wrong?

Thank you!

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




Attachments: 
http://forum.openscenegraph.org//files/shadow_213.jpg


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