Re: [osg-users] Shadows MinGW Enviroment on Windows

2009-05-14 Thread Paul Griffiths
Salvador wrote: Hi I'm facing the same troubles. I'm using Visual Studio, and my application crashes when I try to move the scene. Is it a bug, or something? Thanks in advance Rodrigo Salvador I don't think so, mines crashing before i get to see the scene. --

[osg-users] Ideas for glow effects on 3D objects

2009-05-14 Thread Paul Griffiths
Hi, Im creating a music application, below is a screenshot, im after a glow effect for my enabled buttons. does anyone have any ideas? Anything goes just don't want to use up too many gpu cycles though. [Image: http://img401.imageshack.us/img401/8212/pichbu.jpg ] ... Thank you! Cheers,

[osg-users] Shadows SPHERE_MAP??

2009-05-15 Thread Paul Griffiths
Hi, Im trying to get shadows and SPHERE_MAP effect working together without success. Infact if i even just apply a texture to a osg node i just get pure black. What do I have to do to get textures working with osg nodes with shadows and will this work with SPHERE_MAP effect? heres the code

Re: [osg-users] Shadows SPHERE_MAP??

2009-05-16 Thread Paul Griffiths
Not to worry, I got it working., i used the precompiled binaries and changed StandardShadowMap to ShadowMap. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12319#12319 ___ osg-users mailing list

[osg-users] [osgPPU] Glow Example

2009-05-16 Thread Paul Griffiths
Hi, Is there a way to change the glow example so the glow effect does not glow through other objects? Thank you! Cheers, Paul -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12320#12320 ___

[osg-users] Picking and ignoring clipped parts of models?

2009-05-21 Thread Paul Griffiths
Hi, Im using code based on the osgpick example, im clipping a model so some of is it is invisible on screen. But I can pick the part with the mouse pointer even though that part of the model is invisible, is there an easy way for the pick code to ignore cliped parts? heres my code, my

Re: [osg-users] Picking and ignoring clipped parts of models?

2009-05-21 Thread Paul Griffiths
Paul Martz wrote: The scene graph that you perform the pick on doesn't have to be the same scene graph as the one you display, if that helps. No, my scene is a bit too complicated for that. It's for a new 3D gui system im creating called RedWidget! I really do need to ignore cliped parts of

Re: [osg-users] Picking and ignoring clipped parts of models?

2009-05-21 Thread Paul Griffiths
Simon Hammett wrote: Which picker are you using? Im using a LineSegmentIntersector, i did not know there were diferent types. am new to osg. just used the osgpick example. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12701#12701

Re: [osg-users] Picking and ignoring clipped parts of models?

2009-05-21 Thread Paul Griffiths
Im guessing ill have to create a method like getClipBoundingBox in the parent control of that being detected during the pick and check the world coords of the pick are within the bounds of the box. was hoping there was an out the box solution though. -- Read this topic online

Re: [osg-users] Picking and ignoring clipped parts of models?

2009-05-21 Thread Paul Griffiths
If i have a osg:Group added to a osg:ClipNode and i set its bounding box how can i check when using a picker if the world pick point is within this bounding box? for example in my app i use this code on a group call someGroup this-clipNode = new osg::ClipNode;

Re: [osg-users] Picking and ignoring clipped parts of models?

2009-05-21 Thread Paul Griffiths
i found out i can simple use: if (clipBox.contains(hitr-getWorldIntersectPoint())) how do i get a clipNodes clipBox? so i can check if the WorldIntersectPoint is within it? Any ideas? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12708#12708

[osg-users] Compute axis aligned bounding box of a given size

2009-05-21 Thread Paul Griffiths
Hi, I wish to compute an axis aligned bounding box of a given size whos position is centered to a node. This node cound be scaled, translated or rotated. it must be axis aligned. I need to know this to test if a picked part of a node picked with the mouse is inside the bounds a bounding box

Re: [osg-users] Compute axis aligned bounding box of a given size

2009-05-22 Thread Paul Griffiths
Simon Hammett wrote: LineSegmentIntersector::Intersection has a member: matrix which is the accumulated local to world coordinates matrix. If you transform the nodes BoundingSphere center by that, you can then construct an aabb around that at whatever size you want. Sorry, i should of

Re: [osg-users] Compute axis aligned bounding box of a given size

2009-05-22 Thread Paul Griffiths
Im clipping an osg::group with an osg::ClipNode so parts of it is invisible on screen but when i click on the invisible parts the picker is still picking the object . i dont want it like that, i want the invisible parts to be invisible to the mouse as well. so i wish to create an aabb around

Re: [osg-users] Compute axis aligned bounding box of a given size

2009-05-22 Thread Paul Griffiths
Ive came up with this but it returns outside true every time regardless: Code: bool outside = false; if (obj-getParentWidget() obj-getParentWidget()-getUsingClipBoundingBox()) { osg::ref_ptrosg::ClipNode clipNode = obj-getParentWidget()-getClipNode(); if (clipNode) { for

Re: [osg-users] Compute axis aligned bounding box of a given size

2009-05-22 Thread Paul Griffiths
Simon Hammett wrote: Okies, if memory serves me correctly, the clip planes aren't in world coordinates, I think they are in eye coordinates. So that would be take the local intersection coordinate and transform it using computeLocalToEye (in osg/Transform) and test that point. If that

Re: [osg-users] Compute axis aligned bounding box of a given size

2009-05-22 Thread Paul Griffiths
Simon Hammett wrote: Right I've had time to play with ClipNode, and what I said above is rubbish. You just need the matrix which transforms from the parent to the intersection node. Given you are writing a tool kit, I suspect you can quickly and easily work out that transform from

[osg-users] Single-sided ClipPlane?

2009-05-22 Thread Paul Griffiths
Hi, Is it possible to set a ClipPlane so it's singe-sided so it only clips when viewed from only one side? and can you select which side? ... Thank you! Cheers, PaulG -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12794#12794

[osg-users] Capping holes made by clipping?

2009-05-22 Thread Paul Griffiths
Hi, Im using a clipNode, and when I clip a model, i get a hole, can these be filled? ... Thank you! Cheers, PaulG -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12796#12796 ___ osg-users mailing

Re: [osg-users] Single-sided ClipPlane?

2009-05-22 Thread Paul Griffiths
[Image: http://img177.imageshack.us/img177/9184/singlesidedclipplane.png ] This is the effect im after, if i can have single sided clipPlanes then i can construct a clipBox behind my window so from the outside it clips my scrollpanel behind so my window has virtually no depth, but from looking

Re: [osg-users] Capping holes made by clipping?

2009-05-23 Thread Paul Griffiths
[Image: http://img265.imageshack.us/img265/922/capping.png ] This is the problem im having, as my window is scrolled, this funny looking chrome block sticking through my window in this example is being clipped at the window top, but it's leaving a hole, i really need to fix this. Any ideas?

[osg-users] Texture always facing screen?

2009-05-23 Thread Paul Griffiths
Hi, How can i get a texture to be displayed always facing the screen? the width of the texture has to be the width of the screen, same for height. and the corner of the texture always start at screen coords 0,0 osg::StateSet* stateset = new osg::StateSet();

Re: [osg-users] Single-sided ClipPlane?

2009-05-23 Thread Paul Griffiths
I have a second idea to get my desired effect, but i would much prefer single-sided clipPlanes. If anyone know of other ways too then please do post. [Image: http://img507.imageshack.us/img507/8462/idea.png ] -- Read this topic online here:

Re: [osg-users] Texture always facing screen?

2009-05-23 Thread Paul Griffiths
No, im after a texture that can be applied to a plane, this texture is the size of the osg window and it always faces you(the window). Take these screenshots below: I capture the screen and apply it to a plane, whenever the plane moves, the texture coords do not, the texture coords are always

Re: [osg-users] Referencing loaded models

2009-05-23 Thread Paul Griffiths
I does this: const static osg::ref_ptr osg::Node staticNode = osgDB::readNodeFile(Shapes/Shape.osg); then for each required instance: const static osg::ref_ptr osg::Node nodeCopy = (osg::Node*)staticNode-clone(osg::CopyOp::DEEP_COPY_NODES); -- Read this topic online here:

Re: [osg-users] Texture always facing screen?

2009-05-23 Thread Paul Griffiths
Dont worry people, the reason i needed this wont work, my idea has a flaw, what if the contents of 2 windows overlap, ill get the contents of one window inside the other :( If anyone knows how to create single-sided clipPlanes which only clip when viewed from one side and when viewed from the

Re: [osg-users] Referencing loaded models

2009-05-23 Thread Paul Griffiths
Is the only way i worked out that works, though i belive there is a tutorial in the turorial section. Got to ask though, whats wrong with using static? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12812#12812

Re: [osg-users] Referencing loaded models

2009-05-23 Thread Paul Griffiths
The reason i chose static is so the model is loaded only once when the first class instance is created. You could however create this node non-static but you must make sure you load it only once, like put it in another class and referance to it or something. -- Read this topic

Re: [osg-users] Referencing loaded models

2009-05-23 Thread Paul Griffiths
Kim C Bale wrote: Hi Sebastian, Unless you explicitly ask the osg to clone your model's geometry it will share the geometry by default. It simply stores a pointer to the loaded model's vertices etc. So the below code should work for you. You can also set osgDB to cache the model in

Re: [osg-users] Single-sided ClipPlane?

2009-05-23 Thread Paul Griffiths
My second idea of how to create my effect has a flaw, if the rear contents of 2 scrollpanels overlap then ill get the contents of the scrollpanels inside each other. If anyone knows how to create single-sided clipPlanes which only clip when viewed from one side and when viewed from the other

Re: [osg-users] Referencing loaded models

2009-05-23 Thread Paul Griffiths
Kim C Bale wrote: Could you not check the name of parent node to identify the instance of the child? I might be wrong I haven't used the picking functionality for a while. K. Tried that but it always gives the parent node of the first instance. -- Read this topic

Re: [osg-users] Referencing loaded models

2009-05-23 Thread Paul Griffiths
Skylark wrote: If that's the case, then you're probably using getParent(0) to go up in the graph, instead of using the intersection's node path. Yes, i am going osg::Node* node = hitr-nodePath.back(); if (node node-getNumParents() 0) { node = node-getParent(0); ... } now im trying

Re: [osg-users] Referencing loaded models

2009-05-23 Thread Paul Griffiths
Found the fault, forgot to add hitr-nodePath.pop_back() at the end of each itteration -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12825#12825 ___ osg-users mailing list

Re: [osg-users] Single-sided ClipPlane?

2009-05-23 Thread Paul Griffiths
attach an UpdateCallback that knows the current view position, and enable/disable the corresponding GL_CLIP_PLANE accordingly. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 -Original Message- From: [mailto:] On Behalf Of Paul Griffiths Sent

Re: [osg-users] Single-sided ClipPlane?

2009-05-23 Thread Paul Griffiths
How do you disable a clipPlane? osg::ClipPlane plane = this-clipNode-getClipPlane(2); -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12833#12833 ___ osg-users mailing list

Re: [osg-users] Single-sided ClipPlane?

2009-05-23 Thread Paul Griffiths
Enabling/disabling clipPlanes won't do the job, your looking at the side and into the scroll window at the same time. From what i can work out, clipPlanes slice all the way along the model and remove the outer half, so any clipping applied is going to effect what I see at the front of the

Re: [osg-users] Capping holes made by clipping?

2009-05-23 Thread Paul Griffiths
[quote=Paul Martz] If it's something you really need done now, No, im in no real hurry, am 6-12-24-48 months away to be honist. But if you or anyone does impliment such a feature or comes upon such info then please dont forget me. -- Read this topic online here:

Re: [osg-users] Single-sided ClipPlane?

2009-05-23 Thread Paul Griffiths
Simon Hammett wrote: 2009/5/23 Paul Griffiths : Enabling/disabling clipPlanes won't do the job, your looking at the side and into the scroll window at the same time. From what i can work out, clipPlanes slice all the way along the model and remove the outer half, so any

Re: [osg-users] Single-sided ClipPlane?

2009-05-24 Thread Paul Griffiths
Just to let people know, portals is not quite what im looking for, its more of an extended type portal, i believe a portal is a plane with a texture of a scene applied to give to look of a scene within a scene, im looking for scenes within scenes but with models coming out from the portal front

Re: [osg-users] Single-sided ClipPlane?

2009-05-24 Thread Paul Griffiths
Ive worked out whats required to get my effect working , though im only guessing right now at the math required. Just need 4 clipPlanes facing into the into the scene surrounding the panel. Simple, in theory lol Cheers, PaulG [Image: http://img411.imageshack.us/img411/713/clipplanes.png ]

Re: [osg-users] Capping holes made by clipping?

2009-05-24 Thread Paul Griffiths
Hi, I know I said I wouldnt need this feature for a while yet, but i do. I need to impliment this before my toolkit gets too large. So in the hope that someones up to the challenge I present here a simple example of a shadowed scene containing a cube which has been split in half by a

Re: [osg-users] Single-sided ClipPlane?

2009-05-24 Thread Paul Griffiths
Simon wrote: Paul Griffiths wrote: Ive worked out whats required to get my effect working , though im only guessing right now at the math required. Just need 4 clipPlanes facing into the into the scene surrounding the panel. Simple, in theory lol Cheers, PaulG Given 3

Re: [osg-users] Single-sided ClipPlane?

2009-05-27 Thread Paul Griffiths
Wish someone could of told me, you cant put clipplanes within clip planes, you cant make holes! Is it possible to have more than one clipNode in a scene? if i try 2 clipnodes everything gets clipped to the second node. Any ideas? If I cant use more than one clipNode in a scene im thinking

[osg-users] vertex shader help: compare position

2009-05-27 Thread Paul Griffiths
Hi, Im trying to use a shader to make parts of models transparant(clipped) i was using a clipnode but learned you cant use more than one in a scene? or am i wrong? anyway, i wish to clip along a plane. currently this plane is defined as 3 points: Code: varying vec3 pos0; varying vec3 pos1;

Re: [osg-users] vertex shader help: compare position against plane

2009-05-27 Thread Paul Griffiths
I know the code: vec3 worldPos = gl_ModelViewMatrix * gl_Vertex; is worng, if i rotate the view so does this position. i need the world position and not the modelview position. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13023#13023

Re: [osg-users] vertex shader help: compare position against plane

2009-05-27 Thread Paul Griffiths
ok, i got the world position with: Code: mat4 ToWorldMatrix= osg_ViewMatrixInverse* gl_ModelViewMatrix; vec3 worldPos = ToWorldMatrix * gl_Vertex; now i need to check which side of the plane the worldPos is. I googled and found some code for this but its not for glsl, ive came up with this

Re: [osg-users] vertex shader help: compare position against plane

2009-05-27 Thread Paul Griffiths
://video.google.com/videosearch?q=cross+productoe=utf-8rls=org.mozilla:en-US:officialclient=firefox-aum=1ie=UTF-8ei=LE4dSreZCpLt_AbS4OGxDQsa=Xoi=video_result_groupresnum=4ct=title#) Regards. 2009/5/27 Paul Griffiths () Kim C Bale wrote: I presume this line: n = (pos1 -pos0

[osg-users] chrome metal look

2012-10-21 Thread Paul Griffiths
how do i get a reflective chrome metal type look to my models? thanks. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=50700#50700 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] Ideas for shiny antique Gold?

2013-02-18 Thread Paul Griffiths
Looking for ideas to get the best shiny antique Gold? For a frame. A few on screen, don't wish to use up too much GPU. With rough texture if not too much GPU too. Thanks. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52741#52741

[osg-users] Simple window on windoews

2011-11-10 Thread Paul Griffiths
Hi, Does anyone have a code snippet for building a simple window on windows? Thank you! Cheers, Paul -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43813#43813 ___ osg-users mailing list

Re: [osg-users] Simple window on windoews

2011-11-10 Thread Paul Griffiths
ive created a window but cant draw anything 3d. any ideas why not? Code: #include osg/io_utils #include osgWidget/Util #include osgWidget/WindowManager #include osg/ShapeDrawable const unsigned int MASK_2D = 0xF000; int main(int argc, char** argv) { osgViewer::Viewer viewer;

[osg-users] Get camera X rotation angle in rads?

2011-11-11 Thread Paul Griffiths
Hi, I wish to get the camera X rotation relative to the scene in rads, any ideas? Thank you! Cheers, Paul -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43833#43833 ___ osg-users mailing list

Re: [osg-users] Get camera X rotation angle in rads?

2011-11-15 Thread Paul Griffiths
I now wish to get the z rotation angle of the camera in degrees. How do I do it? ive got my : Code: osgGA::TrackballManipulator* man; ... and if i go Code: osg::Matrixd mat = man-getMatrix(); float angle = mat.getRotate().z(); but if i spin my camera doing a 360 the result is not in

Re: [osg-users] Get camera X rotation angle in degrees?

2011-11-15 Thread Paul Griffiths
Code: void getEulerFromQuat(osg::Quat q, double heading, double attitude, double bank) { double limit = 0.49; double sqx = q.x()*q.x(); double sqy = q.y()*q.y(); double sqz = q.z()*q.z(); double t = q.x()*q.y() + q.z()*q.w(); if (tlimit) //

[osg-users] Rotate point in 3d space?

2011-12-17 Thread Paul Griffiths
Hi, Lets say i have a point: float x = 20; float y = 5; float z = 3; how do I rotate the point using point 0,0,0 as the pivot? Say I wish to rotate it by 45deg? It's for some math to set a clip plane's 3 points. ... Thank you! Cheers, Paul -- Read this topic online

[osg-users] OSG within firebreath?

2012-03-13 Thread Paul Griffiths
Hi, Just a quick ask. Has anyone had any experiance integrating OSG with Firebreath? ( http://www.firebreath.org/ ) Firebreath gives you the power of c++ as a plugin within the most popular browsers. Anyone? ... Thank you! Cheers, Paul -- Read this topic online here:

Re: [osg-users] OSG within firebreath?

2012-03-13 Thread Paul Griffiths
Thanks for the link. Don't think ill be using firebreath, seems a bit of a overkill considering its windows only. Theres next to nothing on the osg forum about osg and web browsers, which is quite surprising if not shocking! :O Anyone have any code to share for browsers internet explorer,

[osg-users] Question with offscreen rendering.

2012-03-16 Thread Paul Griffiths
Hi, These are the steps I would like to produce. 1. Have multiple nodes(well call these nodes 'roots') 2. Each 'root' and it's tree renders to it's own off-screen buffer. 3. Have a few 2d triangles(black) rendered in 2d space over the top. 4. Where ever there is black convert the area to

[osg-users] Offscreen render to texture only showing black?

2012-03-18 Thread Paul Griffiths
Hi, I'm using the code below, mixture taken from the examples. It's only rendering black. Anything I'm doing wrong? Thank you! The function takes a node providing a new scene, and a back color. It returns a node containing a quad with the texture being the new scene rendered to it. Code:

Re: [osg-users] Offscreen render to texture only showing black?

2012-03-18 Thread Paul Griffiths
I'm sure my texture is not working because of mt tex coords and or normal? This is what I'm currently using. What I'm currently seeing is a quad, clearColor is correct but I'm just seeing a faint diagonal line as the scene. osg::Geometry* polyGeom = new osg::Geometry;

[osg-users] Texture render ratio?

2012-03-19 Thread Paul Griffiths
Hi, Lets say I have a texture 800 * 480. I have a quad which is 10 * 10. If I render the texture to the quad, the texture will be squashed on the x axis. How do I compensate for this, correct the aspect ratio? ... Thank you! Cheers, Paul -- Read this topic online here:

[osg-users] Trans/Rot need for quad fill entire screen?

2012-03-20 Thread Paul Griffiths
Hi, Lets say: A Quad (4 * 3 units) at pos(0, 10, 0), rot(0, 45, 0). The screen is 800 * 600 (ratio 4/3) What is the trans rot needed from the Quad for the Quad to fill the entire screen? I need to pull back from the Quad for it to exactly fill the screen. Any advice? ... Thank you!

[osg-users] 2nd Camera - disable CameraManipulator

2012-03-21 Thread Paul Griffiths
Hi, I have included a second camera to my scene. When I use the TrackballManipulator It effects every camera in the scene. How do I stop this? ... Thank you! Cheers, Paul -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46485#46485

Re: [osg-users] 2nd Camera - disable CameraManipulator

2012-03-23 Thread Paul Griffiths
Hi, Thanks chris. the needed lines was: Code: camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF); The problem for some reason is I cant move the camera. which I can't understand. Heres a class to create my portal, (quite a handy class if you need one?) Code: class Portal { public:

[osg-users] framebuffer texture applied to plane, need texture always full screen

2012-09-09 Thread Paul Griffiths
Hi, I have 2 scenes, one scene rendered to offscreen framebuffer. Other scene contains plane to render first scene on to. How do I render the image so it is entire size of monitor, face on. Only rendering area where plane is displayed? Hope you understand. Cheers. -- Read this

Re: [osg-users] framebuffer texture applied to plane, need texture always full screen

2012-09-09 Thread Paul Griffiths
Paul Martz wrote: I've attached the source of the rtt example from the osgWorks project. Perhaps it will be helpful. See the comment block at the end of the source for a description. -Paul Code you gave is not what I need. My plane is not fullscreen, but I need the texture to be

Re: [osg-users] framebuffer texture applied to plane, need texture always full screen

2012-09-09 Thread Paul Griffiths
Any ideas? OpenGL should do this. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49882#49882 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] framebuffer texture applied to plane, need texture always full screen

2012-09-10 Thread Paul Griffiths
I need the texture to always face the camera regardless of the angle of the plane, the tuxture being fullscreen and only rendered where the plane is. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49886#49886

Re: [osg-users] framebuffer texture applied to plane, need texture always full screen

2012-09-12 Thread Paul Griffiths
Paul Martz wrote: His description is difficult to understand, but it seems like he wants some type of stencil solution. So the plane rendering pass would be: 1. Render the plane with stencil set to write a 1 bit. 2. Render a fullscreen quad to display the texture, but only where stencil is

[osg-users] clipped Scenes within a clipped scenes?

2012-09-12 Thread Paul Griffiths
Hi, Is it possible to have a clipped scene within a clipped scene? Say, i have a clipped cube, can i add this object within another scene which is also clipped(using 4 clipplanes?) -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49977#49977