plib-users Mailing List for PLIB (Page 22)
Brought to you by:
sjbaker
You can subscribe to this list here.
2000 |
Jan
|
Feb
(24) |
Mar
(54) |
Apr
(29) |
May
(58) |
Jun
(29) |
Jul
(675) |
Aug
(46) |
Sep
(40) |
Oct
(102) |
Nov
(39) |
Dec
(40) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(45) |
Feb
(23) |
Mar
(30) |
Apr
(64) |
May
(28) |
Jun
(61) |
Jul
(55) |
Aug
(35) |
Sep
(24) |
Oct
(23) |
Nov
(21) |
Dec
(67) |
2002 |
Jan
(98) |
Feb
(23) |
Mar
(13) |
Apr
(23) |
May
(43) |
Jun
(45) |
Jul
(54) |
Aug
(5) |
Sep
(56) |
Oct
(17) |
Nov
(53) |
Dec
(26) |
2003 |
Jan
(67) |
Feb
(36) |
Mar
(22) |
Apr
(35) |
May
(26) |
Jun
(35) |
Jul
(10) |
Aug
(49) |
Sep
(17) |
Oct
(3) |
Nov
(30) |
Dec
(10) |
2004 |
Jan
(12) |
Feb
(18) |
Mar
(52) |
Apr
(50) |
May
(22) |
Jun
(13) |
Jul
(16) |
Aug
(23) |
Sep
(21) |
Oct
(29) |
Nov
(6) |
Dec
(26) |
2005 |
Jan
(9) |
Feb
(19) |
Mar
(13) |
Apr
(19) |
May
(12) |
Jun
(8) |
Jul
(6) |
Aug
(10) |
Sep
(22) |
Oct
(3) |
Nov
(6) |
Dec
(17) |
2006 |
Jan
(10) |
Feb
(8) |
Mar
(5) |
Apr
(5) |
May
(6) |
Jun
(8) |
Jul
(8) |
Aug
(13) |
Sep
(2) |
Oct
(1) |
Nov
(9) |
Dec
(6) |
2007 |
Jan
(3) |
Feb
(4) |
Mar
(12) |
Apr
(2) |
May
(6) |
Jun
|
Jul
(22) |
Aug
|
Sep
(9) |
Oct
(13) |
Nov
|
Dec
|
2008 |
Jan
(1) |
Feb
(6) |
Mar
(2) |
Apr
(4) |
May
(15) |
Jun
(28) |
Jul
(8) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2009 |
Jan
(5) |
Feb
(5) |
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
(2) |
Apr
(7) |
May
(4) |
Jun
(2) |
Jul
(5) |
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
|
2011 |
Jan
(7) |
Feb
(2) |
Mar
(1) |
Apr
|
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
(1) |
Nov
(4) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Steve B. <sjb...@ai...> - 2004-08-11 01:23:24
|
Justin Geo Zaun wrote: > I'm sure I'm missing something, but I would like to add some more > shapes to my application. I'de like a pyramid first and it should work > basically like ssgaCube does. I've looked through the code but can't > find code for the cube. I was wondering if anyone had an example class > I could look at? Well, the code for the cube is in plib/src/ssgAux/ssgaShapes.{cxx,h} There is an example of the use of an ssgaCube in plib/examples/src/ssg/water/water.cxx ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |
From: Justin G. Z. <jz...@ca...> - 2004-08-10 23:45:15
|
I'm sure I'm missing something, but I would like to add some more shapes to my application. I'de like a pyramid first and it should work basically like ssgaCube does. I've looked through the code but can't find code for the cube. I was wondering if anyone had an example class I could look at? Justin |
From: Michael W. <mic...@ti...> - 2004-08-10 18:21:45
|
Hi Nick, I have multiplied all sky and clouds parameter with 0.001,alo the span parameter. . I have found in the source for building the clouds the parameter scale = 4000. Do you know what it's mean. Best regards Michael ----- Original Message ----- From: "Nick McEvoy" <nic...@ka...> To: <pli...@li...> Sent: Tuesday, August 10, 2004 5:19 AM Subject: sec:uRe: [Plib-users] ssgaSky and Scaling ofthe scene > What are your sky settings ? > > Example: > sky->build(80000, 80000, nplanets, planet_data, nstars, star_data); > sky->addCloud(*"data/scattered.rgba"*, /// texture > / 80000, /// span > / 3000, /// elevation, > / 100, /// thickness > / 100); /// transition > > /I assume you have reduced the h_radius & v_radius parameters for build(), > thus have you also reduced the addCloud() 'span' parameter ? > > Cheers, > Nick > > Michael Wessels wrote: > > >Hi all, > >I am using ssgSky to build the sky in my simulation. I have build it from > >the sky-example of plib. > >My problem is now: > >The scene is build in the dimension 'kilometer' and the sky and his objects > >in demension 'meter'. The sky looks very good. But my airplane never can fly > >over the clouds. > >If I reduce the scaling of the sky and his objects to the dimension > >'kilometer' the clouds come to near and not scattered. > > > >How can I combine the dimension 'kilometer' in the scene with the dimension > >'meter' of the sky ? > > > >Michael > > > > > > > >------------------------------------------------------- > >This SF.Net email is sponsored by OSTG. Have you noticed the changes on > >Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, > >one more big change to announce. We are now OSTG- Open Source Technology > >Group. Come see the changes on the new OSTG site. www.ostg.com > >_______________________________________________ > >plib-users mailing list > >pli...@li... > >https://lists.sourceforge.net/lists/listinfo/plib-users > > > > > > > > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > plib-users mailing list > pli...@li... > https://lists.sourceforge.net/lists/listinfo/plib-users |
From: Nick M. <nic...@ka...> - 2004-08-10 04:10:46
|
What are your sky settings ? Example: sky->build(80000, 80000, nplanets, planet_data, nstars, star_data); sky->addCloud(*"data/scattered.rgba"*, /// texture / 80000, /// span / 3000, /// elevation, / 100, /// thickness / 100); /// transition /I assume you have reduced the h_radius & v_radius parameters for build(), thus have you also reduced the addCloud() 'span' parameter ? Cheers, Nick Michael Wessels wrote: >Hi all, >I am using ssgSky to build the sky in my simulation. I have build it from >the sky-example of plib. >My problem is now: >The scene is build in the dimension 'kilometer' and the sky and his objects >in demension 'meter'. The sky looks very good. But my airplane never can fly >over the clouds. >If I reduce the scaling of the sky and his objects to the dimension >'kilometer' the clouds come to near and not scattered. > >How can I combine the dimension 'kilometer' in the scene with the dimension >'meter' of the sky ? > >Michael > > > >------------------------------------------------------- >This SF.Net email is sponsored by OSTG. Have you noticed the changes on >Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, >one more big change to announce. We are now OSTG- Open Source Technology >Group. Come see the changes on the new OSTG site. www.ostg.com >_______________________________________________ >plib-users mailing list >pli...@li... >https://lists.sourceforge.net/lists/listinfo/plib-users > > |
From: Michael W. <mic...@ti...> - 2004-08-06 20:19:00
|
Hi all, I am using ssgSky to build the sky in my simulation. I have build it from the sky-example of plib. My problem is now: The scene is build in the dimension 'kilometer' and the sky and his objects in demension 'meter'. The sky looks very good. But my airplane never can fly over the clouds. If I reduce the scaling of the sky and his objects to the dimension 'kilometer' the clouds come to near and not scattered. How can I combine the dimension 'kilometer' in the scene with the dimension 'meter' of the sky ? Michael |
From: <ra...@EE...> - 2004-08-03 22:55:43
|
Hi, I would like to use such features as menu tabs that have entries which expand rightwards, ie the puPopupMenu's puOneshot will call another puPopupMenu with more options. For example, in internet explorer, the View->Text Size expands rightwards to enable you to select more options. I am having trouble getting the x and y coordinates of the puOneshot which I want to expand rightwards. What I am doing now is calling the GetFirstChild() of the puMenuBar, then searching through the list: while (next!=NULL) { next = next->getNextObject(); ... more code ... } After finding the appropriate object (I check by comparing the legend field to what I want to search for, ie if (strcmp(next->getLegend(), search_legend)==0) break; then I call the next->getPosition() and next->getSize() and calculate the appropriate place to set the puPopupMenu, ie using popup_menu->setPosition(...) Right now the coordinates I am getting back are x=246 and y=-24, I am not sure what kind of coordinate system the PUI lib uses, but the popUpMenu is not appearing in the right place. I am completely new to GLUT, OpenGL, so maybe I have missed something obvious. Any suggestions on what I can do or change to get this functionality? Thanks alot for any help! Rach Liu |
From: cedric <ced...@so...> - 2004-07-29 19:47:32
|
On Thursday 29 July 2004 19:10, Thomas Rebien wrote: > On Thursday 29 July 2004 21:03, cedric wrote: > > i tried to build plib, but i was unsuccesful. > > > > /usr/include/GL/glx.h:39:22: X11/Xlib.h: No such file or directory > > /usr/include/GL/glx.h:40:23: X11/Xutil.h: No such file or directory > > Looks like you are missing the X11 header files. > If you have them installed in some nonstandard directory, try setting > > export CPPFLAGS=-I<path to X11 include dir> > > and excecute ./configure again. > > Regards, > > Thomas > > > ------------------------------------------------------- > This SF.Net email is sponsored by OSTG. Have you noticed the changes on > Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, > one more big change to announce. We are now OSTG- Open Source Technology > Group. Come see the changes on the new OSTG site. www.ostg.com > _______________________________________________ > plib-users mailing list > pli...@li... > https://lists.sourceforge.net/lists/listinfo/plib-users To get it in the archives: export CPPFLAGS='-I /usr/X11R6/include/' Thanks! cedric -- The only dumb question is the one omitted De enige domme vraag is degene die niet gesteld wordt |
From: Thomas R. <tho...@gm...> - 2004-07-29 19:08:29
|
On Thursday 29 July 2004 21:03, cedric wrote: > i tried to build plib, but i was unsuccesful. > /usr/include/GL/glx.h:39:22: X11/Xlib.h: No such file or directory > /usr/include/GL/glx.h:40:23: X11/Xutil.h: No such file or directory Looks like you are missing the X11 header files. If you have them installed in some nonstandard directory, try setting export CPPFLAGS=-I<path to X11 include dir> and excecute ./configure again. Regards, Thomas |
From: Steve W. <st...@sh...> - 2004-07-29 19:07:39
|
On Thu, 29 Jul 2004, cedric wrote: > /usr/include/GL/glx.h:39:22: X11/Xlib.h: No such file or directory > /usr/include/GL/glx.h:40:23: X11/Xutil.h: No such file or directory Looks like your worst problem is the lack of the X11-devel headers. I'd fix that first, and see what else goes wrong after that... |
From: cedric <ced...@so...> - 2004-07-29 17:01:39
|
Hi all, i tried to build plib, but i was unsuccesful. my specs: [_plib@lfs ~/plib-1.8.3]$ gcc -v Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/specs Configured with: ../gcc-3.3.2/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ : (reconfigured) ../gcc-3.3.2/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ Thread model: posix gcc version 3.3.2 [_plib@lfs ~/plib-1.8.3]$ uname -a Linux lfs 2.6.7 #1 Sat Jun 26 14:30:34 Local time zone must be set--see zic manu i686 GenuineIntel unknown GNU/Linux [_plib@lfs ~/plib-1.8.3]$ The error: make[2]: Entering directory `/storage/home/_plib/plib-1.8.3/src/pui' source='pu.cxx' object='pu.o' libtool=no \ depfile='.deps/pu.Po' tmpdepfile='.deps/pu.TPo' \ depmode=gcc3 /bin/sh ../../depcomp \ g++ -DPACKAGE=\"plib\" -DVERSION=\"1.8.3\" -DHAVE_LIBPTHREAD=1 -DHAVE_LIBGL=1 -D HAVE_LIBDL=1 -DSTDC_HEADERS=1 -I. -I. -I../../src/sg -I../../src/fnt -I../../s rc/util -g -O2 -Wall -c -o pu.o `test -f pu.cxx || echo './'`pu.cxx In file included from pu.cxx:31: /usr/include/GL/glx.h:39:22: X11/Xlib.h: No such file or directory /usr/include/GL/glx.h:40:23: X11/Xutil.h: No such file or directory In file included from pu.cxx:31: /usr/include/GL/glx.h:51: error: syntax error before `;' token /usr/include/GL/glx.h:52: error: syntax error before `;' token /usr/include/GL/glx.h:53: error: syntax error before `;' token /usr/include/GL/glx.h:54: error: syntax error before `;' token /usr/include/GL/glx.h:55: error: syntax error before `;' token /usr/include/GL/glx.h:56: error: syntax error before `;' token <snip for size> /usr/include/GL/glx.h:192: error: parse error before `,' token /usr/include/GL/glx.h:192: error: `glXReleaseTexImageARB' declared as function returning a function /usr/include/GL/glx.h:193: error: `Display' was not declared in this scope /usr/include/GL/glx.h:193: error: `dpy' was not declared in this scope /usr/include/GL/glx.h:193: error: parse error before `,' token /usr/include/GL/glx.h:193: error: `glXDrawableAttribARB' declared as function returning a function /usr/include/GL/glx.h:208: error: syntax error before `*' token distcc[3669] ERROR: compile on localhost failed make[2]: *** [pu.o] Error 1 make[2]: Leaving directory `/storage/home/_plib/plib-1.8.3/src/pui' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/storage/home/_plib/plib-1.8.3/src' make: *** [all-recursive] Error 1 Did i provide enough information? Regards, cedric -- The only dumb question is the one omitted De enige domme vraag is degene die niet gesteld wordt |
From: Nick M. <nic...@ds...> - 2004-07-26 00:33:44
|
Thats good news !!! I wish you luck in your simulation ! Cheers, Nick Michael Wessels wrote: >Hi Nick, > >I have found the solution. In a part of my code for initialisation of OpenGL >I had the the statements >glEnableClientState(GL_VERTEX_ARRAY); >glEnableClientState(GL_NORMAL_ARRAY); > >I deleted these lines and now all runs well. > >Best regards > >Michael > > |
From: Paolo L. <p.l...@ci...> - 2004-07-23 08:50:55
|
Juhana Sadeharju wrote: > ... > Do all this discussion mean that there is no standard > scenegraph nor good object/scenegraph loader which Tyler > could have used in the first place? Try looking at http://lib3ds.sourceforge.net/. It is a library which loads a 3DS model file with a single call, returning a (very complex) structure with all information/data read. Then one have to walk down this structure and generate <your-scenegraph> nodes accordingly. It's something similar to the work to use Plib/SSG just as a model loader. > How SSG compares to www.opensg.org or www.openscenegraph.{org,com}? Lib3DS is *the* 3DS loader in OpenSceneGraph, don't know about OpenSG. An accurate comparison with Plib/SSG is out of my capability, yet I think SSG is generally simpler to use, it has a neat interface, employes, yet doesn't stress, the OO paradigm, thus allowing non-top skilled programmers to approach it with easy and success. On my opinion having too much resources in a large library leads to disorientation at startup, making you feeling to miss the better way to do your task. Nevertheless Plib/SSG has a lot of useful possibilities behind the scenes (i.e. no need to complicate the first approach), and can/will certainly be improved. Regarding loaders SSG is second to none, yet uses its own 3DS loader instead of Lib3DS. The OpenFlight loader is also very good, but the format itself is probably not devoted to low-budget games. Not to mention the ability to save all the scene content in a single .ssg file, which is then very efficient to load despite of the large size, and allows to distribute an application in a compact, quite close, way. Greetings - Paolo |
From: Juhana S. <ko...@ni...> - 2004-07-22 17:59:12
|
>From: "Tyler Ohlsen" <Xa...@ho...> > >That being said, it would be nice to have the option to use someone >else's scene graph library. Not that yours is lacking in anything, but >the option is nice. That is simple with a scenegraph-to-scenegraph converter. The problem cases such as LODs and billboards need to be stored as LODs and billboards of the other scenegraph. No camera matrix required here. Neither scenegraphs cannot be rendered directly if they contain the problem cases. Otherwise the scenegraph with, e.g., bounding boxes/spheres is still good to have. Do all this discussion mean that there is no standard scenegraph nor good object/scenegraph loader which Tyler could have used in the first place? How SSG compares to www.opensg.org or www.openscenegraph.{org,com}? Juhana -- http://music.columbia.edu/mailman/listinfo/linux-graphics-dev for developers of open source graphics software |
From: Steve B. <sjb...@ai...> - 2004-07-16 09:20:16
|
Manuel Pecero Rodr=EDguez wrote: > Ok, but I need to change the state (I need an state selector for this=20 > object) and if I make it with an ssgEntity * I cannot do it becouse wit= h=20 > the ssgEntity class you cannot acces to the ssgLeaf states without a=20 > casting. isn=B4t it? Ah! OK - I see the cause of your confusion. The ssgLoad function(s) don't generate a single leaf node - they generate= an entire sub-tree of branch nodes with numerous leaf nodes under them. In order to change the states of ALL of those leaf nodes you have to do one of two things. EITHER: 1) After you load the model, traverse the tree structure by testing each node to see whether it's a leaf or a branch (use 'isAKindOf()) If it's a leaf, change it's state. If it's a branch use getNumKids()= and getKid(n) to find all of it's child nodes - and call the tree tra= verser recursively for each of them. 2) You can use a callback function (it's provided in the ssgLoaderOptions= ) that calls your code as the model is being loaded in order that you c= an allocate your own ssgSimpleState nodes instead of the loader doing it= for you. Which of these things to do depends on the context and what other things you may need to change in the model that was loaded. ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++= -----END GEEK CODE BLOCK----- |
From: Steve B. <sjb...@ai...> - 2004-07-16 08:34:34
|
Tyler Ohlsen wrote: > Loading from a 3D file into a scene graph is one implementation, you > don't have to do it that way. I agree that it makes a lot of sense and > that most 3D applications are greatly improved by using scene graphs. > That being said, it would be nice to have the option to use someone > else's scene graph library. Not that yours is lacking in anything, but > the option is nice. What other kind of data structure could you load a 3D model into? A big pile of unstructured polygons and vertices I suppose - but that isn't going to make rendering very easy - and it throws away a lot of valuable information from the source model. >>SSG lets you set both the modelview and projection matrix directly. >> >>It's hard to imagine what "your own camera" could be that SSG couldn't >> already handle. > > Again, this was a matter of preference. I would like to use my own > camera if I could (without doing a hack to convert my camera's > orientation representation to ssg's camera orientation every frame). What hack? Just call the SSG function to pass your camera's data (heading, pitch, roll, x, y, z) into SSG. That's *ONE* line of code! It couldn't be much simpler! >>No - because SSG needs to know that those matrices are in order to >>do field-of-view culling, Range-switched nodes and such. OK - we >>*could* read those matrices back from OpenGL in order to find out >>what your camera code set them to - but reading things back from >>OpenGL is something to be avoided at all costs. > > But if you're not using ssg as your scene graph (just as a model loader) > then you don't want it to do view culling. Then ssg doesn't need to > know the current state of these matrices at all. OK - so if you aren't using SSG to render the scene and you don't want the loaders to load into SSG's scene graph - then why the heck are you using SSG? > glNewList(iListID, GL_COMPILE); > glPushMatrix(); > glRotatef(-90, 1,0,0); //ssgRawDraw allows for regular > opengl transforms > glScalef(0.25f, 0.25f, 0.25f); > ssgRawDraw(oModel); > glPopMatrix(); > glEndList(); But this mythical 'ssgRawDraw' function has to traverse the scene graph because the scene graph may contain transforms, selectors, animations and level-of-detail nodes that the loader created for us. Let's look at just one of those things by way of example: Level of detail nodes (ssgRangeSelector). This is something that has been created by the loader from information in the model file. It is a model that has one polygonal representation when it's close to the eye - and a simpler one when it's further away. If you ignore the presence of that node in the file and just render all the polygons mindlessly then you'll see TWO copies of the model being drawn at once - one of which looks really bad when it's close to the eyepoint because it's made of so few polygons - and the other of which will overload your system because it's drawn with so many polygons - even when it's 10 miles away from the camera. So in that case, you **MUST** traverse the scene graph that the loader built for you or the scene won't look right. Now - in order to decide which of those two models to draw, your rendering code (marked here in your example as 'ssgRawDraw') **MUST** be able to figure out the range from the object to the camera. However, it has no way to do that because you only gave the camera matrix to OpenGL - you didn't tell the renderer. The *ONLY* way that ssgRawDraw could possibly figure out that range would be to do a glGetMatrix. The trouble with glGetMatrix is that it (potentially) stalls the graphics pipe...this could make it UNBELIEVABLY slow. So - the rational way to do it is to have your application pass the camera matrix into SSG so that it knows where the camera is without having to read it out of OpenGL....and that's what we have. There simply isn't any other way to make this work. There are other nodes that need this information - ssgCutout for example. Then there is the issue of field-of-view culling. In a typical application, the camera's field of view is something like 60x40 degrees. That means that we are only rendering about a tenth of the objects in the scene on a 'typical' setup. If your 'ssgRawDraw' isn't doing field-of-view culling then it's going to run something like ten times slower than ssgCullAndDraw for the same scene. However, the only way you can possibly do field of view culling is if you know where the camera is...same problem. It is UTTERLY trivial to modify any program that computes a camera position and passes it to OpenGL to pass that position into SSG instead. Truly - it can't take you more than 5 lines of code. Heck - you could even to a glGetMatrix yourself if you couldn't figure any other way. When you take that little baby step, everything else runs at least 10x faster than what you propose - and it also gets things like level-of-detail and billboards right. ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |
From: Tyler O. <Xa...@ho...> - 2004-07-15 17:41:41
|
> Tyler Ohlsen wrote: > > I'm looking at using plib as a model loader for a flight simulator > > type application I'm making, but that's all I want plib for. (I don't > > want to use plib as my scene graph library) > > The problem with 3D file loaders is that they have to load the model into > some kind of data structure. The name for that data structure is a > "Scene Graph". Hence, loaders for 3D file formats cannot exist wihout > a scene graph. Since rendering stuff out of that scene graph is an > easily automatable process - and since it makes a lot of sense to use > a C++ class hierarchy to do the work, it follows that the renderer and > the file loader are tightly knitted together. > > Tossing out the renderer in order to get the loaders is not generally a good idea. Loading from a 3D file into a scene graph is one implementation, you don't have to do it that way. I agree that it makes a lot of sense and that most 3D applications are greatly improved by using scene graphs. That being said, it would be nice to have the option to use someone else's scene graph library. Not that yours is lacking in anything, but the option is nice. > > I've played around with the simple scene graph module and I see that > > calling ssgCullAndDraw throws out the existing projection and > > modelview matrices forcing you to use ssg's camera. I would like to > > use my own camera and not have to use ssg's camera at all. > > SSG lets you set both the modelview and projection matrix directly. > > It's hard to imagine what "your own camera" could be that SSG couldn't already handle. Again, this was a matter of preference. I would like to use my own camera if I could (without doing a hack to convert my camera's orientation representation to ssg's camera orientation every frame). > > Is there a way to call a draw method of an ssgRoot object that does > > not throw out the these matrices and leaves the view culling up to the > > application (it just draws around the current zero point like > > glutSolidTeapot and such)? > > No - because SSG needs to know that those matrices are in order to > do field-of-view culling, Range-switched nodes and such. OK - we > *could* read those matrices back from OpenGL in order to find out > what your camera code set them to - but reading things back from > OpenGL is something to be avoided at all costs. > > So it's better for you tell use what you want them to be and let > us send them to OpenGL...that's no different from you sending them > to OpenGL - but this is more efficient. But if you're not using ssg as your scene graph (just as a model loader) then you don't want it to do view culling. Then ssg doesn't need to know the current state of these matrices at all. > > If there doesn't exist such a method, would > > there be an interest for me to create one for you all? > > I don't see any conceivable need for that - but if you > can come up with something convincing, we could certainly consider it. I dug into ssg and came up with the following code. First is an example usage of what this function gives the application programmer. This function has made the integration of ssg (just as a model loader and not a scene graph) into my application much easier. It may not be the most efficient way to do it, but it's not too bad (I know that each leaf's opengl state is forced). Example Usage: --------------------------------- int LoadModel(const char* szFile) { int iListID = glGenLists(1); ssgEntity* oModelEntity = ssgLoad(szFile); ssgRoot* oModel = new ssgRoot; oModel->addKid(oModelEntity); glNewList(iListID, GL_COMPILE); glPushMatrix(); glRotatef(-90, 1,0,0); //ssgRawDraw allows for regular opengl transforms glScalef(0.25f, 0.25f, 0.25f); ssgRawDraw(oModel); glPopMatrix(); glEndList(); delete oModel; delete oModelEntity; return iListID; } void RenderModel(int iListID) { glCallList(iListID); } --------------------------------- You are welcome to integrate this code into plib if you wish. Also, if you have any suggestions of changes I would be glad to hear them. Implementation: ----- ssg.h ----- void ssgRawDraw ( ssgBranch *root ) ; class ssgEntity : public ssgBase { ... virtual void raw_draw ( bool translucent_objects ) = 0 ; ... } class ssgLeaf : public ssgEntity { ... virtual void raw_draw ( bool translucent_objects ) ; ... } class ssgBranch : public ssgEntity { ... virtual void raw_draw ( bool translucent_objects ) ; ... } class ssgTransform : public ssgBaseTransform { ... virtual void raw_draw ( bool translucent_objects ) ; ... } ------- ssg.cxx ------- void ssgRawDraw ( ssgBranch *r ) { r->raw_draw(false); r->raw_draw(true); } ------------- ssgBranch.cxx ------------- void ssgBranch::raw_draw ( bool translucent_objects ) { for ( ssgEntity *e = getKid ( 0 ) ; e != NULL ; e = getNextKid() ) e -> raw_draw ( translucent_objects ) ; } ---------------- ssgTransform.cxx ---------------- void ssgTransform::raw_draw ( bool translucent_objects ) { glPushMatrix () ; glMultMatrixf ( (float *) transform ) ; for ( ssgEntity *e = getKid ( 0 ) ; e != NULL ; e = getNextKid() ) e -> raw_draw ( translucent_objects ) ; glPopMatrix () ; } ----------- ssgLeaf.cxx ----------- void ssgLeaf::raw_draw ( bool translucent_objects ) { if (isTranslucent() != translucent_objects) return; if (hasState()) getState()->force(); draw_geometry () ; } ----------- Thanks for creating a great library =) Tyler Ohlsen |
From: <m_p...@ya...> - 2004-07-15 14:40:08
|
Ok, but I need to change the state (I need an state selector for this object) and if I make it with an ssgEntity * I cannot do it becouse with the ssgEntity class you cannot acces to the ssgLeaf states without a casting. isn´t it? Thank you. Steve Baker <sjb...@ai...> wrote: Manuel Pecero Rodríguez wrote: > So, in order to add a ssgLeaf to the tree of a Scene I make a > ssgVtxTable *dtl; Then I load on it an ac file with the function > grssgLoadAC3D(const char *filename, const ssgLoaderOptions *options). No, no, no! You need something like: ssgEntity *br = ssgLoad ( filename, options ) ) ; if ( br == NULL ) /* some kind of error message */ ; scene -> addKid ( br ) ; Where: 'scene' is some kind of ssgBranch node - maybe the ssgRoot at the top of your tree. ---------------------------- Steve Baker ------------------------- HomeEmail: WorkEmail: HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idG21&alloc_id040&op=click _______________________________________________ plib-users mailing list pli...@li... https://lists.sourceforge.net/lists/listinfo/plib-users --------------------------------- [input] [input] [input] |
From: Steve B. <sjb...@ai...> - 2004-07-15 00:14:46
|
Manuel Pecero Rodr=EDguez wrote: > So, in order to add a ssgLeaf to the tree of a Scene I make a=20 > ssgVtxTable *dtl; Then I load on it an ac file with the function=20 > grssgLoadAC3D(const char *filename, const ssgLoaderOptions *options). No, no, no! You need something like: ssgEntity *br =3D ssgLoad ( filename, options ) ) ; if ( br =3D=3D NULL ) /* some kind of error message */ ; scene -> addKid ( br ) ; Where: 'scene' is some kind of ssgBranch node - maybe the ssgRoot at the top of your tree. ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++= -----END GEEK CODE BLOCK----- |
From: <m_p...@ya...> - 2004-07-14 19:45:15
|
Hi everybody. I´ve a problem and I dont know how to resolve it. I don´t have a lot of experience with PLIB and I thought that maybe someone had this problem before. So, in order to add a ssgLeaf to the tree of a Scene I make a ssgVtxTable *dtl; Then I load on it an ac file with the function grssgLoadAC3D(const char *filename, const ssgLoaderOptions *options). Till there is everything ok. I can load the ac file in my scene whith out problem, but if I want to acces to the state of the dtl (It doesn´t mind if I use dtl->getState() or dtl->setState(ssgState*)) my program breaks. My code is something like that: char *acname; ssgVtxTable *dtl= new ssgVtxTable; void *hndl = grTrackHandle; dtl= (ssgVtxTable *)grssgLoadAC3D(acname, NULL); /* in acname is the path of the ac file*/ dtl->setState(.....); It compiles and the program runs but it crashes. thank you --------------------------------- [input] [input] [input] |
From: Steve B. <sjb...@ai...> - 2004-07-09 00:35:15
|
Tyler Ohlsen wrote: > I'm looking at using plib as a model loader for a flight simulator type > application I'm making, but that's all I want plib for. (I don't want > to use plib as my scene graph library) The problem with 3D file loaders is that they have to load the model into some kind of data structure. The name for that data structure is a "Scene Graph". Hence, loaders for 3D file formats cannot exist wihout a scene graph. Since rendering stuff out of that scene graph is an easily automatable process - and since it makes a lot of sense to use a C++ class hierarchy to do the work, it follows that the renderer and the file loader are tightly knitted together. Tossing out the renderer in order to get the loaders is not generally a good idea. > I've played around with the simple scene graph module and I see that > calling ssgCullAndDraw throws out the existing projection and modelview > matrices forcing you to use ssg's camera. I would like to use my own > camera and not have to use ssg's camera at all. SSG lets you set both the modelview and projection matrix directly. It's hard to imagine what "your own camera" could be that SSG couldn't already handle. > Is there a way to call a draw method of an ssgRoot object that does not > throw out the these matrices and leaves the view culling up to the > application (it just draws around the current zero point like > glutSolidTeapot and such)? No - because SSG needs to know that those matrices are in order to do field-of-view culling, Range-switched nodes and such. OK - we *could* read those matrices back from OpenGL in order to find out what your camera code set them to - but reading things back from OpenGL is something to be avoided at all costs. So it's better for you tell use what you want them to be and let us send them to OpenGL...that's no different from you sending them to OpenGL - but this is more efficient. > If there doesn't exist such a method, would > there be an interest for me to create one for you all? I don't see any conceivable need for that - but if you can come up with something convincing, we could certainly consider it. ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |
From: Tyler O. <Xa...@ho...> - 2004-07-08 19:19:34
|
I'm looking at using plib as a model loader for a flight simulator type application I'm making, but that's all I want plib for. (I don't want to use plib as my scene graph library) I've played around with the simple scene graph module and I see that calling ssgCullAndDraw throws out the existing projection and modelview matrices forcing you to use ssg's camera. I would like to use my own camera and not have to use ssg's camera at all. Is there a way to call a draw method of an ssgRoot object that does not throw out the these matrices and leaves the view culling up to the application (it just draws around the current zero point like glutSolidTeapot and such)? If there doesn't exist such a method, would there be an interest for me to create one for you all? Thanks, Tyler |
From: Nick M. <nic...@ds...> - 2004-07-01 04:00:39
|
Michael Wessels wrote: >I have tried the sky example and it runs well. > > great ! well if the example works then maybe there is a bug in your code ? >The difference in my code is, that the function sky->build(...) is called in >a different file as the function sky->preDraw(() . > > are you sure the 'sky' objects in both files are pointing to the same object (i.e. are the pointers the same) ? >If I'am using the functions init_graphics and redraw of the example sky in >my code.Tthe scenery with the sky is rendered then well but in another >window than my simulation is running. > >Where comes the problem from? > > without seeing your code its difficult to say what is going wrong. Cheers, Nick |
From: Michael W. <mic...@ti...> - 2004-06-29 20:16:24
|
Hi Nick, I have tried the sky example and it runs well. The difference in my code is, that the function sky->build(...) is called in a different file as the function sky->preDraw(() . If I'am using the functions init_graphics and redraw of the example sky in my code.Tthe scenery with the sky is rendered then well but in another window than my simulation is running. Where comes the problem from? Best regards ----- Original Message ----- From: "Nick McEvoy" <nic...@ds...> To: <pli...@li...> Sent: Monday, June 28, 2004 6:46 AM Subject: Re: [Plib-users] Buiding Sky using the functions in ssgaSky > Michael Wessels wrote: > > >Hi all, > >with the new function build in ssgaSky I tried to create the sky in my > >simulation. > >The code was compiled and linked with VC++ 6.2 . > >But in the execution of > >sky->preDraw() : > > it runs in the following error > >"Nicht abgefangene Ausnahme in FDS.exe: 0xC0000005: Access Violation" > >at the function > > glDrawArrays ( gltype, 0, num_vertices ) ; > >in > >void ssgVtxTable::draw_geometry () > >{ > >........ > >........ > > glDrawArrays ( gltype, 0, num_vertices ) ; > >........ > >........ > >} > >The parameter num_vertices has the value 0 . > > > >What is going wrong ? > > > > > Weird ! My answer is ... I don't know. :-( > > Have you tried the sky example (/plib/examples/src/ssg/sky/) ? Does it > work ? > > If the sky example code works ... what are the differences with how you > use ssgaSky in your project ? > > Cheers, > Nick > > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > plib-users mailing list > pli...@li... > https://lists.sourceforge.net/lists/listinfo/plib-users |
From: Nick M. <nic...@ds...> - 2004-06-28 04:51:35
|
Michael Wessels wrote: >Hi all, >with the new function build in ssgaSky I tried to create the sky in my >simulation. >The code was compiled and linked with VC++ 6.2 . >But in the execution of >sky->preDraw() : > it runs in the following error >"Nicht abgefangene Ausnahme in FDS.exe: 0xC0000005: Access Violation" >at the function > glDrawArrays ( gltype, 0, num_vertices ) ; >in >void ssgVtxTable::draw_geometry () >{ >........ >........ > glDrawArrays ( gltype, 0, num_vertices ) ; >........ >........ >} >The parameter num_vertices has the value 0 . > >What is going wrong ? > > Weird ! My answer is ... I don't know. :-( Have you tried the sky example (/plib/examples/src/ssg/sky/) ? Does it work ? If the sky example code works ... what are the differences with how you use ssgaSky in your project ? Cheers, Nick |
From: Michael W. <mic...@ti...> - 2004-06-27 18:57:15
|
Hi all, with the new function build in ssgaSky I tried to create the sky in my simulation. The code was compiled and linked with VC++ 6.2 . But in the execution of sky->preDraw() : it runs in the following error "Nicht abgefangene Ausnahme in FDS.exe: 0xC0000005: Access Violation" at the function glDrawArrays ( gltype, 0, num_vertices ) ; in void ssgVtxTable::draw_geometry () { ........ ........ glDrawArrays ( gltype, 0, num_vertices ) ; ........ ........ } The parameter num_vertices has the value 0 . What is going wrong ? Best regards Michael |