[osg-users] osgWidget suggestions
Hi Jeremy, some days ago you asked about some feedback for osgWidget. Since i read your message i have been looking at osgWidget and i have some suggestions, comments about how its works and possible future lines of work. And no, i'm not using it, osgWidget came to late to me, so i leave it out (at the moment). I use osg for a project that's growing up, now i'm looking harder to it and osgWidget will be something I will use. First, i must say its a good job. As far as i have seen it looks promising. But, have you some documentation regarding its design and or future plans? So i don't spend hours thinking something you have already thought about! :) The first question i could ask is (read beyond the obvious): What is the very concrete objective of osgWidget? I'm not fooling here. I mean, its objective is to be a thin layer of abstraction to allows some basic ui programmability with osg or it is to be a complete ui framework for user interfaces on OSG? Are you still open to suggestions? PD: Your optimism is commandable! Good for you. I wish you the best! Keep going! Best regards, Himar. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] runtime bug when loading obj model in OpenSceneGraph 2.8.2
Hi Dat, On 27/10/09 11:53 AM, Ulrich Hertlein wrote: On 27/10/09 2:05 AM, Nguyen Tien Dat wrote: So I have read about .mtl and .obj files and understood what you meant. I created a program to optimize the model (http://cs.uiowa.edu/~tinguyen/OptimizeMtlFiles.rar) Oh and one more thing: you have a lot of identical materials without texture. Does your optimizer only check for identical textures? Cheers, /ulrich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem with DOF Nodes
Hi, first of all, thank you very much for your answer. But there is something that I do not understand, for example if I load a .3DS model in a osg Node, how I can transform it to a DOF Node to translate or rotate in real time? I thought that with a dynamic cast I could get it. Thank you! Cheers, Felipe -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18791#18791 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem with DOF Nodes
Hi Felipe. On Wed, Oct 28, 2009 at 9:39 AM, Felipe Lemus yoindra...@hotmail.com wrote: first of all, thank you very much for your answer. But there is something that I do not understand, for example if I load a .3DS model in a osg Node, how I can transform it to a DOF Node to translate or rotate in real time? I thought that with a dynamic cast I could get it. The osgSim::DOFTransform node is a specialist node used to support OpenFlight databases, it's not used by any other loaders, so a .3ds model won't have any DOFTransform nodes in them, so you certainly won't be able to use dyanmic_cast to magically transform nodes loaded from anything other than an OpenFlight database, even then you'll need to go a search the loaded scene graph, using a custom NodeVisitor, for the DOFTransform nodes. What you most likely require is to simply decorate your loaded scene graph with a osg::MatrixTransform or osg::PositionAttitudeTransform node to place it where you want. See the osganimation example for an illustrtation of this. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] QUAD BUFFER Stereo and osgwindows
Hello I have a two-windows app. which uses the osgwindows example approach. Mi question is, could be possible to enable QUAD BUFFER stereo in both windows at the same time? Each of my windows are connected to a active stereo display, via the dual output of Quadro FX GPU I have tried to enable this feature by the viewer display settings, but I get an OpenGL error... Thanks In Advance -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18792#18792 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem with DOF Nodes
Hi Robert, thank you very much for your answer. My problem is that I need to translate an Helicopter (.3DS model), with a camera, in a scene and I need to can change its course or even stop it in real time pressing a key of the keyboard or something like that. If I use animationpath I can not control the movement of the helicopter, it is a loop loaded in the beginning of the execution. I saw tutorial 8 and I thought that it will resolve my problem. I will look for another way to do that, any idea is welcome... Thank you! Cheers, Felipe -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18794#18794 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem with DOF Nodes
Hi Felipe, On Wed, Oct 28, 2009 at 10:55 AM, Felipe Lemus yoindra...@hotmail.com wrote: thank you very much for your answer. My problem is that I need to translate an Helicopter (.3DS model), with a camera, in a scene and I need to can change its course or even stop it in real time pressing a key of the keyboard or something like that. If I use animationpath I can not control the movement of the helicopter, it is a loop loaded in the beginning of the execution. I saw tutorial 8 and I thought that it will resolve my problem. I will look for another way to do that, any idea is welcome... The osganimation example illustrates how to use a MatrixTransform/PositionAttitudeTransform as well as a AnimationPathCallback, if you ignore the AnimationPathCallback part and replace it by your own callback, or an update of the transforms in your main loop you can do anything you want. Please try to use a bit of initiative, the community can help you, but can't walk you through every single line of code. There are dozens of examples and tutorials, and the whole OSG code base that you can use a reference. The Quick Guide Book as also available as free download. Invest the time into learning about the things and you'll find the pointers you get here much more productive. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] SpeedTree Example for late version of OSG?
Hello Wyatt, I would like to integrated SpeedTree 5.0 into an osg application. Having searched the mailing list archives the most recent mention of a SpeedTree example that I found was over a year ago. Has anyone been using SpeedTree with OSG and possibly put together an example that would show how to use SpeedTree with a later version of OSG? Have you tried what that message said? Even if the most recent mention was a year ago, I doubt OSG has changed enough in one year that it won't work anymore. So why don't you try that and see if it works? If it doesn't, then you can always come back here with specific questions. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgWidget suggestions
On Wed, 2009-10-28 at 06:17 +, Himar Carmona wrote: Hi Jeremy, some days ago you asked about some feedback for osgWidget. Since i read your message i have been looking at osgWidget and i have some suggestions, comments about how its works and possible future lines of work. And no, i'm not using it, osgWidget came to late to me, so i leave it out (at the moment). I use osg for a project that's growing up, now i'm looking harder to it and osgWidget will be something I will use. First, i must say its a good job. As far as i have seen it looks promising. But, have you some documentation regarding its design and or future plans? So i don't spend hours thinking something you have already thought about! :) The first question i could ask is (read beyond the obvious): What is the very concrete objective of osgWidget? I'm not fooling here. I mean, its objective is to be a thin layer of abstraction to allows some basic ui programmability with osg or it is to be a complete ui framework for user interfaces on OSG? The first version I intended to be a full-blown UI NodeKit; far too ambitious. :) The second version will be a sensible, strong lightweight wrapper around the basics so that I can make something else to actually handle the complex bits of code (windowing, advanced grouping, etc), For example, a widget right now is hard-coded as 2D quad; this is pretty terrible design, but makes it easy to handle sizing issues. In the new version, widgets are just an abstract interface, and the library uses the bounding box to position them instead. Of course, this means that each widget must override a virtual resize method, but it allows for widgets of arbitrary geometric size and dimension. Are you still open to suggestions? PD: Your optimism is commandable! Good for you. I wish you the best! Keep going! Best regards, Himar. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Follow us on Twitter! http://twitter.com/emperorlinux +-+ | Jeremy Moles | Phone:1-888-651-6686| | Research Development | in GA:(770)-612-1205| |EmperorLinux, Inc.| Fax: (770)-612-1210| |900 Circle 75 Pkwy. | web: www.EmperorLinux.com | |Suite 1380| support: supp...@emperorlinux.com | |Atlanta, GA 30339 | email:jer...@emperorlinux.com | +-+ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] SpeedTree Example for late version of OSG?
Hi Wyatt, I would be very interested by this integration... Is there a possibility to have a free version of SpeedTree ? Pierre. Le mardi 27 octobre 2009 à 17:43 -0500, Wyatt Earp a écrit : I would like to integrated SpeedTree 5.0 into an osg application. Having searched the mailing list archives the most recent mention of a SpeedTree example that I found was over a year ago. Has anyone been using SpeedTree with OSG and possibly put together an example that would show how to use SpeedTree with a later version of OSG? Wyatt ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org Pierre BOURDIN I.M.E.R.I.R. Av. Pascot BP 90443 66004 PERPIGNAN tél: 04 68 56 84 95 fax: 04 68 55 03 86 email: bour...@imerir.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Improving multisampled FBO
Thanks.Building now, will test shortly. -Paul Wojciech Lewandowski wrote: Hi Paul, I have just submitted proposed changes to osg-submissions. Please, see [osg-submissions] DisplaySettings masks for implicit buffer attachments thread for details. Cheers, Wojtek Lewandowski ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Errors on svn trunk
osganimationtimeline fails to build on VC 2005. See attached error log. (FYI, several other of the plethora of osganimation* examples generate a lot of warnings about inheriting by dominance. These should be investigated and resolved.) -- Paul Martz Skew Matrix Software LLC _http://www.skew-matrix.com_ http://www.skew-matrix.com/ +1 303 859 9466 1-- Skipped Build: Project: wrappers, Configuration: Release Win32 -- 1Project not selected to build for this solution configuration 2-- Skipped Build: Project: uninstall, Configuration: Release Win32 -- 2Project not selected to build for this solution configuration 3-- Build started: Project: Examples osganimationtimeline, Configuration: Release Win32 -- 3Compiling... 3osganimationtimeline.cpp 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(64) : warning C4250: 'osgAnimation::AnimationUpdateCallbackT' : inherits 'osg::NodeCallback::osg::NodeCallback::cloneType' via dominance 3with 3[ 3T=osg::NodeCallback 3] 3F:\Projects\OSG\include\osg/NodeCallback(36) : see declaration of 'osg::NodeCallback::cloneType' 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(70) : see reference to class template instantiation 'osgAnimation::AnimationUpdateCallbackT' being compiled 3with 3[ 3T=osg::NodeCallback 3] 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(64) : warning C4250: 'osgAnimation::AnimationUpdateCallbackT' : inherits 'osg::NodeCallback::osg::NodeCallback::clone' via dominance 3with 3[ 3T=osg::NodeCallback 3] 3F:\Projects\OSG\include\osg/NodeCallback(36) : see declaration of 'osg::NodeCallback::clone' 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(64) : warning C4250: 'osgAnimation::AnimationUpdateCallbackT' : inherits 'osg::NodeCallback::osg::NodeCallback::isSameKindAs' via dominance 3with 3[ 3T=osg::NodeCallback 3] 3F:\Projects\OSG\include\osg/NodeCallback(36) : see declaration of 'osg::NodeCallback::isSameKindAs' 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(64) : warning C4250: 'osgAnimation::AnimationUpdateCallbackT' : inherits 'osg::NodeCallback::osg::NodeCallback::libraryName' via dominance 3with 3[ 3T=osg::NodeCallback 3] 3F:\Projects\OSG\include\osg/NodeCallback(36) : see declaration of 'osg::NodeCallback::libraryName' 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(64) : warning C4250: 'osgAnimation::AnimationUpdateCallbackT' : inherits 'osg::NodeCallback::osg::NodeCallback::className' via dominance 3with 3[ 3T=osg::NodeCallback 3] 3F:\Projects\OSG\include\osg/NodeCallback(36) : see declaration of 'osg::NodeCallback::className' 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(64) : warning C4250: 'osgAnimation::AnimationUpdateCallbackT' : inherits 'osg::StateAttributeCallback::osg::StateAttributeCallback::cloneType' via dominance 3with 3[ 3T=osg::StateAttributeCallback 3] 3F:\Projects\OSG\include\osg/StateAttributeCallback(31) : see declaration of 'osg::StateAttributeCallback::cloneType' 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(97) : see reference to class template instantiation 'osgAnimation::AnimationUpdateCallbackT' being compiled 3with 3[ 3T=osg::StateAttributeCallback 3] 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(64) : warning C4250: 'osgAnimation::AnimationUpdateCallbackT' : inherits 'osg::StateAttributeCallback::osg::StateAttributeCallback::clone' via dominance 3with 3[ 3T=osg::StateAttributeCallback 3] 3F:\Projects\OSG\include\osg/StateAttributeCallback(31) : see declaration of 'osg::StateAttributeCallback::clone' 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(64) : warning C4250: 'osgAnimation::AnimationUpdateCallbackT' : inherits 'osg::StateAttributeCallback::osg::StateAttributeCallback::isSameKindAs' via dominance 3with 3[ 3T=osg::StateAttributeCallback 3] 3F:\Projects\OSG\include\osg/StateAttributeCallback(31) : see declaration of 'osg::StateAttributeCallback::isSameKindAs' 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(64) : warning C4250: 'osgAnimation::AnimationUpdateCallbackT' : inherits 'osg::StateAttributeCallback::osg::StateAttributeCallback::libraryName' via dominance 3with 3[ 3T=osg::StateAttributeCallback 3] 3F:\Projects\OSG\include\osg/StateAttributeCallback(31) : see declaration of 'osg::StateAttributeCallback::libraryName' 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(64) : warning C4250: 'osgAnimation::AnimationUpdateCallbackT' : inherits 'osg::StateAttributeCallback::osg::StateAttributeCallback::className' via
Re: [osg-users] Errors on svn trunk
Hi Paul, Thanks for reporting the problems. Neither Cedric (author of osgAnimation this new example) nor I have access to a Windows systems to test against, from the errors nothing jumped out at me as what is the likely problem, perhaps Cedric might be able to have a better guess. Rather than guessing, perhaps yourself or fellow Windows dev might be able to spot the problem and propose a fix. Cheers, Robert. On Wed, Oct 28, 2009 at 4:31 PM, Paul Martz pma...@skew-matrix.com wrote: osganimationtimeline fails to build on VC 2005. See attached error log. (FYI, several other of the plethora of osganimation* examples generate a lot of warnings about inheriting by dominance. These should be investigated and resolved.) -- Paul Martz Skew Matrix Software LLC _http://www.skew-matrix.com_ http://www.skew-matrix.com/ +1 303 859 9466 1-- Skipped Build: Project: wrappers, Configuration: Release Win32 -- 1Project not selected to build for this solution configuration 2-- Skipped Build: Project: uninstall, Configuration: Release Win32 -- 2Project not selected to build for this solution configuration 3-- Build started: Project: Examples osganimationtimeline, Configuration: Release Win32 -- 3Compiling... 3osganimationtimeline.cpp 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(64) : warning C4250: 'osgAnimation::AnimationUpdateCallbackT' : inherits 'osg::NodeCallback::osg::NodeCallback::cloneType' via dominance 3 with 3 [ 3 T=osg::NodeCallback 3 ] 3 F:\Projects\OSG\include\osg/NodeCallback(36) : see declaration of 'osg::NodeCallback::cloneType' 3 F:\Projects\OSG\include\osgAnimation/UpdateCallback(70) : see reference to class template instantiation 'osgAnimation::AnimationUpdateCallbackT' being compiled 3 with 3 [ 3 T=osg::NodeCallback 3 ] 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(64) : warning C4250: 'osgAnimation::AnimationUpdateCallbackT' : inherits 'osg::NodeCallback::osg::NodeCallback::clone' via dominance 3 with 3 [ 3 T=osg::NodeCallback 3 ] 3 F:\Projects\OSG\include\osg/NodeCallback(36) : see declaration of 'osg::NodeCallback::clone' 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(64) : warning C4250: 'osgAnimation::AnimationUpdateCallbackT' : inherits 'osg::NodeCallback::osg::NodeCallback::isSameKindAs' via dominance 3 with 3 [ 3 T=osg::NodeCallback 3 ] 3 F:\Projects\OSG\include\osg/NodeCallback(36) : see declaration of 'osg::NodeCallback::isSameKindAs' 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(64) : warning C4250: 'osgAnimation::AnimationUpdateCallbackT' : inherits 'osg::NodeCallback::osg::NodeCallback::libraryName' via dominance 3 with 3 [ 3 T=osg::NodeCallback 3 ] 3 F:\Projects\OSG\include\osg/NodeCallback(36) : see declaration of 'osg::NodeCallback::libraryName' 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(64) : warning C4250: 'osgAnimation::AnimationUpdateCallbackT' : inherits 'osg::NodeCallback::osg::NodeCallback::className' via dominance 3 with 3 [ 3 T=osg::NodeCallback 3 ] 3 F:\Projects\OSG\include\osg/NodeCallback(36) : see declaration of 'osg::NodeCallback::className' 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(64) : warning C4250: 'osgAnimation::AnimationUpdateCallbackT' : inherits 'osg::StateAttributeCallback::osg::StateAttributeCallback::cloneType' via dominance 3 with 3 [ 3 T=osg::StateAttributeCallback 3 ] 3 F:\Projects\OSG\include\osg/StateAttributeCallback(31) : see declaration of 'osg::StateAttributeCallback::cloneType' 3 F:\Projects\OSG\include\osgAnimation/UpdateCallback(97) : see reference to class template instantiation 'osgAnimation::AnimationUpdateCallbackT' being compiled 3 with 3 [ 3 T=osg::StateAttributeCallback 3 ] 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(64) : warning C4250: 'osgAnimation::AnimationUpdateCallbackT' : inherits 'osg::StateAttributeCallback::osg::StateAttributeCallback::clone' via dominance 3 with 3 [ 3 T=osg::StateAttributeCallback 3 ] 3 F:\Projects\OSG\include\osg/StateAttributeCallback(31) : see declaration of 'osg::StateAttributeCallback::clone' 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(64) : warning C4250: 'osgAnimation::AnimationUpdateCallbackT' : inherits 'osg::StateAttributeCallback::osg::StateAttributeCallback::isSameKindAs' via dominance 3 with 3 [ 3 T=osg::StateAttributeCallback 3 ] 3 F:\Projects\OSG\include\osg/StateAttributeCallback(31) : see declaration of 'osg::StateAttributeCallback::isSameKindAs' 3F:\Projects\OSG\include\osgAnimation/UpdateCallback(64) : warning
[osg-users] Texture3D with OSG and shaders
Hi all! I have found some docs about animating a textured object using texture3D. So I have tried to do it myself but it doesn't seem to work, it freezes on a single noise 2D texture. I use Perlin Noise to build dynamically the texture. Then I pass it to the fragment shader. I managed to write meaningful texture coordinates but i'm not sure they are right. Then I just take the first two coordinates and i use a time varying third coordinate to move along the third dimension of the texture, making the effect of animation. (By the way, I feel that the textures generated by the perlin algorithm are not as beautiful as expected - and I can't manage to get the results published by some website with the same parameters - but it's far from being the main problem) I have tried to look in osg examples but it seems that it's designed for another purpous that doesn't match at all with mine so it doesn't bring me much except that I don't understand the texture coordinates. Thank you very much for your time :) Find all the code below: Perlin.h: Code: #ifndef PERLIN_H #define PERLIN_H //alpha: coefficient d'attenuation //beta: espacement : 10 //n: nombre d'harmoniques double PerlinNoise1D(double x,double alpha,double beta,int n); double PerlinNoise2D(double x,double y,double alpha,double beta,int n); double PerlinNoise3D(double x,double y,double z,double alpha,double beta,int n); double PerlinNoise3DABS(double x,double y,double z,double alpha,double beta,int n); #endif Perlin.cpp: Code: //Bruit de Perlin, Bruit cohérent //Pour plus d'information : //http://www.mrl.nyu.edu/~perlin/ #include stdlib.h #include stdio.h #include math.h #define B 0x100 #define BM 0xff #define N 0x1000 #define NP 12 /* 2^N */ #define NM 0xfff #define s_curve(t) ( t * t * (3. - 2. * t) ) #define lerp(t, a, b) ( a + t * (b - a) ) #define at2(rx,ry) ( rx * q[0] + ry * q[1] ) #define at3(rx,ry,rz) ( rx * q[0] + ry * q[1] + rz * q[2] ) static int p[B + B + 2]; static double g3[B + B + 2][3]; static double g2[B + B + 2][2]; static double g1[B + B + 2]; static int start = 1; #ifndef ABS #define ABS(x) ((x)0 ? (-x) : (x)) #endif void normalize2(double v[2]) { double s; s = sqrt(v[0] * v[0] + v[1] * v[1]); v[0] = v[0] / s; v[1] = v[1] / s; } void normalize3(double v[3]) { double s; s = sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); v[0] = v[0] / s; v[1] = v[1] / s; v[2] = v[2] / s; } void init(void) { int i, j, k; for (i = 0 ; i B ; i++) { p[i] = i; g1[i] = (double)((rand() % (B + B)) - B) / B; for (j = 0 ; j 2 ; j++) g2[i][j] = (double)((rand() % (B + B)) - B) / B; normalize2(g2[i]); for (j = 0 ; j 3 ; j++) g3[i][j] = (double)((rand() % (B + B)) - B) / B; normalize3(g3[i]); } while (--i) { k = p[i]; p[i] = p[j = rand() % B]; p[j] = k; } for (i = 0 ; i B + 2 ; i++) { p[B + i] = p[i]; g1[B + i] = g1[i]; for (j = 0 ; j 2 ; j++) g2[B + i][j] = g2[i][j]; for (j = 0 ; j 3 ; j++) g3[B + i][j] = g3[i][j]; } } double noise1(double arg) { int bx0, bx1; double rx0, rx1, sx, t, u, v, vec[1]; vec[0] = arg; if (start) { start = 0; init(); } t = vec[0] + N; bx0 = ((int)t) BM; bx1 = (bx0+1) BM; rx0 = t - (int)t; rx1 = rx0 - 1.; sx = s_curve(rx0); u = rx0 * g1[ p[ bx0 ] ]; v = rx1 * g1[ p[ bx1 ] ]; return(lerp(sx, u, v)); } double noise2(double vec[2]) { int bx0, bx1, by0, by1, b00, b10, b01, b11; double rx0, rx1, ry0, ry1, *q, sx, sy, a, b, t, u, v; int i, j; if (start) { start = 0; init(); } t = vec[0] + N; bx0 = ((int)t) BM; bx1 = (bx0+1) BM; rx0 = t - (int)t; rx1 = rx0 - 1.; t = vec[1] + N; by0 = ((int)t) BM; by1 = (by0+1) BM; ry0 = t - (int)t; ry1 = ry0 - 1.; i = p[ bx0 ]; j = p[ bx1 ]; b00 = p[ i + by0 ]; b10 = p[ j + by0 ]; b01 = p[ i + by1 ]; b11 = p[ j + by1 ]; sx = s_curve(rx0); sy = s_curve(ry0); q = g2[ b00 ] ; u = at2(rx0,ry0); q = g2[ b10 ] ; v = at2(rx1,ry0); a = lerp(sx, u, v); q = g2[ b01 ] ; u = at2(rx0,ry1); q = g2[ b11 ] ; v = at2(rx1,ry1); b = lerp(sx, u, v); return lerp(sy, a, b); } double noise3(double vec[3]) { int bx0, bx1, by0, by1, bz0, bz1, b00, b10, b01, b11; double rx0, rx1, ry0, ry1, rz0, rz1, *q, sy, sz, a, b, c, d, t, u, v; int i, j; if (start) { start = 0; init(); } t = vec[0] + N; bx0 = ((int)t) BM; bx1 = (bx0+1) BM; rx0 = t - (int)t; rx1 = rx0 - 1.; t = vec[1] + N; by0 = ((int)t) BM; by1 = (by0+1) BM; ry0 = t - (int)t; ry1 = ry0 - 1.; t = vec[2] + N; bz0 = ((int)t) BM; bz1 = (bz0+1) BM; rz0 = t - (int)t; rz1 = rz0 - 1.; i = p[ bx0 ]; j = p[ bx1 ]; b00 = p[ i + by0 ];
Re: [osg-users] Errors on svn trunk
Hi Robert, Paul, Rather than guessing, perhaps yourself or fellow Windows dev might be able to spot the problem and propose a fix. I can check it out when I come back from lunch, if Paul hasn't beaten me to it. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Texture3D with OSG and shaders
As a hint. I have found that the size of the written image is far from being right. It seems to be a 256*256*1 image rather than a 256*256*256 image. It weights 257ko which is nearly the same as 4*256*256 (4 for rgba) -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18810#18810 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] multiple root graphs?
I want to create a graph where some nodes have more than one parent, but every parent node doesn't necessary have a non-backtracking path back to the root node. Does this make sense? How about some bad ascii art: A | B C | / D A has been designated as the root but there is a node C that isn't a child of that root. Is this possible? Cory ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Texture3D with OSG and shaders
Sorry, I found out that it was one of the Perlin.cpp function that was the problem. I created 256 times the same image so i could not see the animation! Good evening ;) -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18812#18812 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] multiple root graphs?
OSG is a DAG http://www.vis-sim.com/imgdp/dagb.jpg Which means every node has at least one parent expect the Root node In your case 'C' would never get traversed with the standard OSG traversers unless you provide all your own traversal routines Gordon Product Manager 3d __ Gordon Tomlinson Email : gtomlinson @ overwatch.textron.com __ -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Cory Riddell Sent: Wednesday, October 28, 2009 1:48 PM To: OpenSceneGraph Users Subject: [osg-users] multiple root graphs? I want to create a graph where some nodes have more than one parent, but every parent node doesn't necessary have a non-backtracking path back to the root node. Does this make sense? How about some bad ascii art: A | B C | / D A has been designated as the root but there is a node C that isn't a child of that root. Is this possible? Cory ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] SpeedTree Example for late version of OSG?
Actually I haven't tried any of these for various reasons: According to the post with the most info, “There are serveral ways to do it: 1. alternative: Just use the opengl example from speedtree and wrap it with a custom drawable. Using this solution there are many pros: * easy to integrate cons: * your are using the texture loading/management of speedtree * you loose the ability of multithreading/multicontext stuff of osg, because the speedtree example uses CG in a non-multicontext version 2. alternative: Create a osg wrapper for CG (as custom stateattributes) in osg and use the example to build the appropiate osg geometry. pros: * no need to touch the speedtree shader * useable in multicontext/multithreaded environment. cons: * Integrating CG into osg is a daunting task. However CG does not make any guaranties about the opengl state after it has been applied, so you can't use it with other stateattributes or in a hierarchy of statesets. So I wouldn't recommend using CG at all in OSG. 3. alternative: Like above you port all the geometry to osg as well as the CG shaders to GLSL. Porting the shaders to GLSL is easy. I haven't done anything with shaders before, but if you take a look at Mike Weiblen GLSL quickrefernce it should be really easy to port the CG shader. pros: * now is pure osg, you don't have any custom drawable or wrappers in it, EXCEPT: SpeedWind - Speedtree provides a class for creating wind. Just build a basic wrapper which gets called in the update cycle. “ Further Comments I assume that the above methods involve SpeedTree prior to v5, which is what I am using. According to the SpeedTree website v5 includes a reorganization of the SDK. How much, I do not know, but maybe someone has experience with it and OSG. I assume that the above reference to CG means nvidia Cg? 3 Isn't an option because we want to integrate SpeedTree, not rewrite it. Our goal is to use SpeedTree not develop a copy. Having seen the source code, there is much more to it than porting geometry and shaders. Wyatt On Wed, Oct 28, 2009 at 7:48 AM, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: Hello Wyatt, I would like to integrated SpeedTree 5.0 into an osg application. Having searched the mailing list archives the most recent mention of a SpeedTree example that I found was over a year ago. Has anyone been using SpeedTree with OSG and possibly put together an example that would show how to use SpeedTree with a later version of OSG? Have you tried what that message said? Even if the most recent mention was a year ago, I doubt OSG has changed enough in one year that it won't work anymore. So why don't you try that and see if it works? If it doesn't, then you can always come back here with specific questions. J-S -- __ Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.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] Errors on svn trunk
Jean-Sébastien Guay wrote: I can check it out when I come back from lunch, if Paul hasn't beaten me to it. Thanks J-S. I'm deep into another task at the moment, getting on fine without osgAnimation (which I have never had occasion to use). Paul Martz Skew Matrix Software LLC _http://www.skew-matrix.com_ http://www.skew-matrix.com/ +1 303 859 9466 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Errors on svn trunk
Hi Paul, (FYI, several other of the plethora of osganimation* examples generate a lot of warnings about inheriting by dominance. These should be investigated and resolved.) Seems the dominance warnings are because the class inherits from two classes that define the same member... http://msdn.microsoft.com/en-us/library/6b3sy7ae%28VS.80%29.aspx J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Errors on svn trunk
Yes having 2 members could be a big issue errr uhmm ohh Gordon -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay Sent: Wednesday, October 28, 2009 2:23 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Errors on svn trunk Hi Paul, (FYI, several other of the plethora of osganimation* examples generate a lot of warnings about inheriting by dominance. These should be investigated and resolved.) Seems the dominance warnings are because the class inherits from two classes that define the same member... http://msdn.microsoft.com/en-us/library/6b3sy7ae%28VS.80%29.aspx J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.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] SpeedTree Example for late version of OSG?
Hi Wyatt, I assume that the above methods involve SpeedTree prior to v5, which is what I am using. According to the SpeedTree website v5 includes a reorganization of the SDK. How much, I do not know, but maybe someone has experience with it and OSG. I hope you get some answers about this, I personally have never used SpeedTree so I wouldn't know. But of course, in the mean time you can always research how much has changed between v5 and previous versions and see if their SDK provides any support/documentation/API for hooking it into a third party rendering engine... I assume that the above reference to CG means nvidia Cg? I assume so too. 3 Isn't an option because we want to integrate SpeedTree, not rewrite it. Our goal is to use SpeedTree not develop a copy. Having seen the source code, there is much more to it than porting geometry and shaders. Option 3 didn't imply rewriting SpeedTree. It's more akin to writing a new renderer for it. SpeedTree would do the simulation and whatever it does to generate the trees and their geometry, and you would take that geometry (or the description of the geometry, i.e. vertices, primitives, etc.) and copy/use them to OSG data structures to get them displayed as part of an OSG scene graph. As the poster of the quoted message mentioned, since OSG would do the rendering, you would need to reimplement the SpeedTree shaders in GLSL so that OSG could use them. This is very different from rewriting SpeedTree... I hope you don't think SpeedTree only does rendering of the trees, it does much more than that, and in fact the more difficult parts are generating the trees from specifications and tree types, making them react to wind, etc. and these would still be done by SpeedTree. Only the last step, rendering itself, would need to be reimplemented in OSG. Note that option 2 might be possible too, the osgNV nodekit provides support for Cg shaders in OSG, though it's been a while since I've heard any news about it so I don't know if it's up to date anymore or if the author(s) abandoned it in favor of OSG's built-in support for GLSL. Sorry, apart from that I can't really help. As I mentioned, I've never used SpeedTree myself nor integrated it into an OSG-based app. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] First pass at Optional compile paths now checked in.
Robert Osfield wrote: The door will also be open to adding OpenGL ES 1.1 support shortly after, and OpenGL 3.x support should not be too difficult either. These are areas where the community could particularly help out on as I don't yet have any experience with working on these OpenGL targets. If your interested in helping out with ES 1.1 and GL 3.x support then it's time to start reviewing the new code changes I've been checking in, and asking any questions that you feel need answered to help progress your efforts. Working on GL3 as of today. I have a few days available to start the investigation, and if things go well, I can table other work to keep plugging at GL3. I'll post questions if they come up. Paul Martz Skew Matrix Software LLC _http://www.skew-matrix.com_ http://www.skew-matrix.com/ +1 303 859 9466 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Errors on svn trunk
Hi Paul, osganimationtimeline fails to build on VC 2005. See attached error log. It builds for me. Perhaps you had a partial update, because osganimationtimeline.cpp revision 10697 seems to contain the modifications to include the necessary header to fix your error. About the warnings. I haven't used virtual inheritance, only read about it in books, but to me it looks like the fact that osgAnimation::AnimationUpdateCallbackBase inherits virtually from osg::Object should tell the compiler that that version of the methods take precedence over other classes inherited only publicly. So I think this warning is bogus. Before we decide to suppress warning C4250 though, could someone with more knowledge/experience than me check to see that it's all ok? Just to summarize, this is the situation: class Base : public virtual osg::Object {}; templateclass T class Derived : public Base, public T {}; (where T is also derived from osg::Object just as Base was - in this case T is osg::NodeCallback). The warning is saying that the same members are being inherited from Base and T, and I think the virtual qualifier when Base inherits from osg::Object should fix the ambiguity and should mean that the members from Base should win. Obviously the virtual seems to remove the ambiguity since this is a warning and not an error, so I think this warning is just a case of VC++ trying to warn the programmer of something he already knows... J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] Can I build a round earth with DEM?
Hi, ... I have created an earth model with VPB ( an ellipsoid with earth texture) by the instruction post in http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem. (osgdem --bluemarble-west -t land_shallow_topo_west.tif --bluemarble-east -t land_shallow_topo_east.tif -l 8 -o earth.ive -a earth.osga) Can I just add some small area of DEM in the suface of this round earth? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18801#18801 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgOcean] Is it possible to combine the effect of osgOcean to the terrain model which is build by VPB?
Hi, ... I have build some terrain model by VPB(VirtualPlanetBuilder) which including some area of ocean.Is it possible to combine the effect of osgOcean to the terrain model which is build by VPB? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18802#18802 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] First pass at Optional compile paths now checked in.
Hi Paul, On Wed, Oct 28, 2009 at 6:48 PM, Paul Martz pma...@skew-matrix.com wrote: Working on GL3 as of today. I have a few days available to start the investigation, and if things go well, I can table other work to keep plugging at GL3. Great news. A couple of tips to help you along the way/understand how I've gone about the GLES 1.1/GLES 2.0. First up the root CMakeLists.txt now has a series of controls that allow to disable various OpenGL features, these CMake controls set the #define's of the same name in the autogenerted include/osg/Config file: #define OSG_GLU_AVAILABLE #define OSG_GL1_AVAILABLE #define OSG_GL2_AVAILABLE /* #undef OSG_GL3_AVAILABLE */ /* #undef OSG_GLES1_AVAILABLE */ /* #undef OSG_GLES2_AVAILABLE */ #define OSG_GL_DISPLAYLISTS_AVAILABLE #define OSG_GL_MATRICES_AVAILABLE #define OSG_GL_VERTEX_FUNCS_AVAILABLE #define OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE #define OSG_GL_FIXED_FUNCTION_AVAILABLE In the case of GL3 you'll want to set the following CMake vars: OSG_GLU_AVAILABLE to OFF OSG_GL1_AVAILABLE to OFF OSG_GL2_AVAILABLE to OFF OSG_GL3_AVAILABLE to ON OSG_GLES1_AVAILABLE to OFF (default) OSG_GLES2_AVAILABLE to OFF (default) OSG_GL_DISPLAYLISTS_AVAILABLE to OFF OSG_GL_MATRICES_AVAILABLE to OFF OSG_GL_VERTEX_FUNCS_AVAILABLE to OFF OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE to OFF OSG_GL_FIXED_FUNCTION_AVAILABLE to OFF You may well need to modify include/osg/GL to pick up on the GL3 header if it's different than gl.h. Also have a look at the osgvertexattributes example, as it enables the aliasing of vertex attributes and projection/modelview projection matrix uniforms. The aliasing also renames the shader variables gl_Vertex/gl_Color/etc and gl_ProjectionMatrix/gl_ModelViewMatrix/etc. to osg_ equivilant and adds in uniform/attribute declarations for them, as well as populates the required for them. osgViewer will also need mods to support the GL3 context. I'm about to check in a series of mods to enable compilation of the all the OSG NodeKit, utility libs (osgUtil, osgDB, osgGA) and the plugins against OpenGLES 1.1 and OpenGLES 2.0. I haven't yet ported osgViewer to work with EGL yet, osgViewer save for the GraphicsWindow/PixelBuffer files all compile though. Given how close OpenGL 3.x and OpenGLES 2.0 are in feature set I would expect that it shouldn't require too many more changes to get things compiling against OpenGL 3.x. What changes will be required should be able to follow the approach I've taken for ES support. Thankfully the OpenGL code hasn't become spaghetti code, at least so far... :-) Once I get the EGL support added to osgViewer I'll be able to test runtime against OpenGL ES 2.0, which will mark the testing, debugging and learning process. I say learning process as doing without any the fixed function pipeline and coding everything with shaders will be interesting. The osgUtil::ShaderGen class will help a little (as the osgvertexattributes example illustrates) but there is still a lot of functionality that will be missing thanks to the lack of fixed function pipeline. Cheers, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Errors on svn trunk
Jean-Sébastien Guay wrote: osganimationtimeline fails to build on VC 2005. See attached error log. It builds for me. Perhaps you had a partial update, because osganimationtimeline.cpp revision 10697 seems to contain the modifications to include the necessary header to fix your error. Thanks. It must've been a partial update. Now rebuilding at r10699. I'll stay out of the multiple inheritance discussion. It's up to you all how to deal with it. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] First pass at Optional compile paths now checked in.
Robert Osfield wrote: In the case of GL3 you'll want to set the following CMake vars: OSG_GLU_AVAILABLE to OFF OSG_GL1_AVAILABLE to OFF OSG_GL2_AVAILABLE to OFF OSG_GL3_AVAILABLE to ON OSG_GLES1_AVAILABLE to OFF (default) OSG_GLES2_AVAILABLE to OFF (default) OSG_GL_DISPLAYLISTS_AVAILABLE to OFF OSG_GL_MATRICES_AVAILABLE to OFF OSG_GL_VERTEX_FUNCS_AVAILABLE to OFF OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE to OFF ?? I hope that's a cut and paste error. Vertex arrays are a part of GL3. Or maybe this CPP macro controls use of the deprecated part of vertex arrays: glVertexPointer, glNormalPointer, glPushClientAttrib, glPopClientAttrib, etc...? OSG_GL_FIXED_FUNCTION_AVAILABLE to OFF You may well need to modify include/osg/GL to pick up on the GL3 header if it's different than gl.h. I'll need to figure out what this means for OSG on Windows. (My OS X system is GL 2.1, so I'm doing this dev on Windows.) I've done all my GL3 development to date using GLEW to get the definitions. OSG has its own GLEW-like solution. I'm not sure what this will mean for OSG on GL3 yet. But without GLEW, this is not just a simple drop-in-a-header change. Also have a look at the osgvertexattributes example, as it enables the aliasing of vertex attributes and projection/modelview projection matrix uniforms. The aliasing also renames the shader variables gl_Vertex/gl_Color/etc and gl_ProjectionMatrix/gl_ModelViewMatrix/etc. to osg_ equivilant and adds in uniform/attribute declarations for them, as well as populates the required for them. osgViewer will also need mods to support the GL3 context. I'm about to check in a series of mods to enable compilation of the all the OSG NodeKit, utility libs (osgUtil, osgDB, osgGA) and the plugins against OpenGLES 1.1 and OpenGLES 2.0. I haven't yet ported osgViewer to work with EGL yet, osgViewer save for the GraphicsWindow/PixelBuffer files all compile though. OK. Currently I'm seeing build failures (with the GL3 setting) in osgFX and osgParticle because they are using glLoadMatrix (sic: no 'd' or 'f' suffix), which is defined in the GL header but not for the GL3 case. Perhaps your latest mods will fix this. Not really a big deal, as I'm not interested in the nodekits at the moment. Maximizing GL3 performance of OSG core is my primary concern. Given how close OpenGL 3.x and OpenGLES 2.0 are in feature set I would expect that it shouldn't require too many more changes to get things compiling against OpenGL 3.x. What changes will be required should be able to follow the approach I've taken for ES support. Thankfully the OpenGL code hasn't become spaghetti code, at least so far... :-) Do you have EGL context creation going yet? For GL3, I'm assuming I need to derive a new class from GraphicsContext to use the GL3 context creation syntax (or #defines in the existing GraphicsContext specializations). Once I get the EGL support added to osgViewer I'll be able to test runtime against OpenGL ES 2.0, which will mark the testing, debugging and learning process. I say learning process as doing without any the fixed function pipeline and coding everything with shaders will be interesting. It's a great experience in plain GL3, but then I wasn't trying to adapt a fixed-function-like layer over the top of OpenGL. I see what you mean by learning experience. The osgUtil::ShaderGen class will help a little (as the osgvertexattributes example illustrates) but there is still a lot of functionality that will be missing thanks to the lack of fixed function pipeline. Along these lines, I'm interested in looking at clip planes, which are handled differently in GL3/GLSL1.30 than they were in GL2/GLSL1.20. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Errors on svn trunk
Hi J-S, Try virtual public T in the derived class. Tom Jolley -Original Message- Before we decide to suppress warning C4250 though, could someone with more knowledge/experience than me check to see that it's all ok? Just to summarize, this is the situation: class Base : public virtual osg::Object {}; templateclass T class Derived : public Base, public T {}; (where T is also derived from osg::Object just as Base was - in this case T is osg::NodeCallback). The warning is saying that the same members are being inherited from Base and T, and I think the virtual qualifier when Base inherits from osg::Object should fix the ambiguity and should mean that the members from Base should win. Obviously the virtual seems to remove the ambiguity since this is a warning and not an error, so I think this warning is just a case of VC++ trying to warn the programmer of something he already knows... J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce negraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] TerrainManipulator Questions
Hi, I'm trying to use the TerrainManipulator class and I am scratching my head. Problem: I use a patch of terrain w/in a simple program and the terrainmanipulator works great. In another example of mine: I then add a sky-dome by simply putting a sphere around the terrain and painted the sphere with a pic of the sky. I then re-ran my application and the terrain manipulator basically stops zooming in once I get really close to the sphere which wraps my terrain. At that point, I can NEVER get close to the terrain again, ever! Does anyone know why? I even tried using the method, setNode(), w/in the terrain manipulator and that did not change things at all for me. ... Thank you! Cheers, Allen -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18826#18826 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] First pass at Optional compile paths now checked in.
Hi Paul, On Wed, Oct 28, 2009 at 8:57 PM, Paul Martz pma...@skew-matrix.com wrote: OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE to OFF ?? I hope that's a cut and paste error. Vertex arrays are a part of GL3. Or maybe this CPP macro controls use of the deprecated part of vertex arrays: glVertexPointer, glNormalPointer, glPushClientAttrib, glPopClientAttrib, etc...? No error, but the macro refers to glVertexPointer/glNormalPointer/glColorPointer. OpenGLES 2.0 has none of these, and I presume OpenGL 3.x is the same. I don't include the VertexAttrib arrays under the remite of the OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE. I understand that this name could be confused to include VertexAttrib arrays, but I couldn't come up with a name that differentiated this. Suggestions welcome. OSG_GL_FIXED_FUNCTION_AVAILABLE to OFF You may well need to modify include/osg/GL to pick up on the GL3 header if it's different than gl.h. I'll need to figure out what this means for OSG on Windows. (My OS X system is GL 2.1, so I'm doing this dev on Windows.) I've done all my GL3 development to date using GLEW to get the definitions. OSG has its own GLEW-like solution. I'm not sure what this will mean for OSG on GL3 yet. But without GLEW, this is not just a simple drop-in-a-header change. I have found that OpenGL ES 1.1 and 2.0 for the most part require disabling/avoiding old style gl calls, and have very few new functions, so I haven't need to come up with an new extension testing/setup. I would have though GL3 would be similar - should be for the most part just a case of including the GL3 header and then disabling/avoiding the functions that are no longer provided. OK. Currently I'm seeing build failures (with the GL3 setting) in osgFX and osgParticle because they are using glLoadMatrix (sic: no 'd' or 'f' suffix), which is defined in the GL header but not for the GL3 case. Perhaps your latest mods will fix this. Not really a big deal, as I'm not interested in the nodekits at the moment. Maximizing GL3 performance of OSG core is my primary concern. Could you do another svn update as I've now checked in my changes to the node kits, these all now compile cleanly under OpenGL ES 1.1 and 2.0, and shouldn't hit upon the above issue if you disable the macros appropriately Given how close OpenGL 3.x and OpenGLES 2.0 are in feature set I would expect that it shouldn't require too many more changes to get things compiling against OpenGL 3.x. What changes will be required should be able to follow the approach I've taken for ES support. Thankfully the OpenGL code hasn't become spaghetti code, at least so far... :-) Do you have EGL context creation going yet? Err... no that's what my next paragraph said... this is my task for tomorrow. For GL3, I'm assuming I need to derive a new class from GraphicsContext to use the GL3 context creation syntax (or #defines in the existing GraphicsContext specializations). I don't yet whether we'll need a seperate subclass of just hint in the GraphicsContext::Traits and/or #ifndef blocks. For EGL it's likely we'll need a completely different GraphicsWindow/PixelBuffer subclass, but for GL3 we might be able to get away with just a optional compile paths. Once I get the EGL support added to osgViewer I'll be able to test runtime against OpenGL ES 2.0, which will mark the testing, debugging and learning process. I say learning process as doing without any the fixed function pipeline and coding everything with shaders will be interesting. It's a great experience in plain GL3, but then I wasn't trying to adapt a fixed-function-like layer over the top of OpenGL. I see what you mean by learning experience. The osgUtil::ShaderGen class will help a little (as the osgvertexattributes example illustrates) but there is still a lot of functionality that will be missing thanks to the lack of fixed function pipeline. Along these lines, I'm interested in looking at clip planes, which are handled differently in GL3/GLSL1.30 than they were in GL2/GLSL1.20. Right now for OpenGL ES 1.1 and 2.0 I've just disabled clip planes, initially for GL3 I'd suggest we do the same. Further down the line I expect we'll need to map the StateAttribute's like osg::ClipPlane to OSG build-in uniforms and have the positional state aspects for the uniform values managed correctly. To do this I'm expecting that we'll need to refine the way that osg::State and osg::StateAttribute's interact when they provide the uniforms for the GL3 and GLES2 targets. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] runtime bug when loading obj model in OpenSceneGraph 2.8.2
My optimizer is only check for identical textures - i.e. materials that load the same image. I didn't check for materials without texture. Do you need to compare all properties of each material in order to find duplicate? Thanks, Dat On Wed, Oct 28, 2009 at 2:14 AM, Ulrich Hertlein u.hertl...@sandbox.de wrote: Hi Dat, On 27/10/09 11:53 AM, Ulrich Hertlein wrote: On 27/10/09 2:05 AM, Nguyen Tien Dat wrote: So I have read about .mtl and .obj files and understood what you meant. I created a program to optimize the model (http://cs.uiowa.edu/~tinguyen/OptimizeMtlFiles.rar) Oh and one more thing: you have a lot of identical materials without texture. Does your optimizer only check for identical textures? Cheers, /ulrich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Dat Tien Nguyen PhD student, Computer Science Department The University of Iowa, IA 52242 http://cs.uiowa.edu/~tinguyen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] First pass at Optional compile paths now checked in.
Robert Osfield wrote: Could you do another svn update as I've now checked in my changes to the node kits, these all now compile cleanly under OpenGL ES 1.1 and 2.0, and shouldn't hit upon the above issue if you disable the macros appropriately Thanks. Builds clean when set for GL3 on VS2009, at r10699. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org