[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

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,

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

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:

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] 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

[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

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

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

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

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 --

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:

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

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

[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] 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

[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:

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

[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

[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] 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));

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

[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?

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

[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

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

[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

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

[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

[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: