Hello,
I am using a custom shader to enlight my scene thanks to a spot light.
I have got a problem considering enlightment of some shapes.
Objects loaded from 3ds file seems to be correctly enlighted.
But, when I create a simple object like a Cone, it is not enlighted correctly,
and I can't
Hello,
I am using a osg::CameraView to make a first person view. The CameraView is
attached to a osg::PositionAttitudeTransform node (we will call this node
Head).
I can't understand why, but when I tilt the head, the camera's Znear, and
Zfar value's change...
I create my CameraView in this
Hi,
Disable near and far computation have some side effects. Some of my objects
(skydome and other) aren't dispalyed.
I tried with a very huge fixed zNear and zFar (Near : 0.1 and Far 3), but
some objects aren't displayed.
Did some one understand why ?
Cheers,
Adrien
--
Hello,
I set a texture on a big plane with the following lines :
Code:
Image* image = osgDB::readImageFile(resources/textures/sable-jaune.bmp);
Texture2D* texture = new osg::Texture2D;
TexMat* tmat = new TexMat;
tmat-setMatrix(Matrix::scale(100,100,1));
if (image)
{
Thank you very much !!
That works fine, I just had to replace
Code:
gl_TexCoord[0] = gl_MultiTexCoord0;
by
Code:
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0*;
Cheers,
Adrien
--
Read this topic online here:
Oups...
That seems to work, but that doesn't work... In my previous post I made a
syntax error in my vertex shader, so the shader was disable, that's why my
texture was correctly displayed...
If I well understand, gl_MultiTexCoord0 contain the per vertex texture
coordinate 0 (I found that in
It's ok I finnaly find something that work, using the following lines :
Code:
gl_TexCoord[0].s = dot(gl_Vertex, gl_ObjectPlaneS[0]);
gl_TexCoord[0].t = dot(gl_Vertex, gl_ObjectPlaneT[0]);
End of the POST !
--
Read this topic online here:
Hello,
In an OSG scene, I have to objects imported from a 3DS file. I can grossly
approximate these objects with bounding boxes (but not with bounding spheres).
I load my objects in this way :
Code:
Registry::instance()-getDataFilePathList().push_back(resources/data);
ref_ptr
Hello,
I am creating a scene composed of two objects : - A (yellow) submarine, and a
osg::ShapeDrawable created from an osg::HeightField : The Seabed.
I use a spot light to illuminate this scene. The spot light is positinoned 1
meter above the submarine, the submarine is 10 meters above the
Thanks for your answer...
Now, osgspotlight example is working on my computer... (I didn't download the
ressources file, shame on me).
I will try to do exactly like in this sample, and I hope all wil be right !
So in this sample, they use a HeighMap and a osg::ShapeDrawable. You said
that's
Hello,
I am writting an application wich use osgOcean Plugin.
I add to an ocean scene a submarine (imported from a 3DS file), and I would
like to activate spot lights of this submarine.
So I attach to the submarine a light :
Code:
Vec4f lightPose(0,-1270,0,1); // le kster mesurant1.26mètres
Hi !
Thank for your reply, but that is exacly what I would'nt want to read !
I am affraid about learning gl Shading Language.
Do you know some cool resources to learn it ? I have got the OpenGL Super Bible
4th edition, is it enough ?
Thanks !
A. BARRAL
--
Read this topic
Hi,
I am writting an application wich need to use differents view to show the scene.
Operator cas switch from one view to another typing a keyboard key...
For example we start in top view, and when the operator press the c key,
whe change to subjective (first person) view.
I saw 3 differents
Tom,
I manage to do that with a CameraViewSwitchManipulator, and two CameraView
object (one for each view), and that works well...
Thank you for your help
Cheers,
BARRAL
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=31923#31923
14 matches
Mail list logo