Re: [osg-users] osgEarth processing problems
Hi, Today I tried again. Here is the detail: I generated a ive file using the Boston tif materials and VPB. The VPB parameter command line is: -t boston-10m-utm19n-meters.tif -d boston-dem-downtown-5m-utm19n-meters.tif --TERRAIN -l 4 -v 3 -o Boston.ive Note: I used–TERRAIN in my command line for using the vpb driver of osgEarth. The generated terrain is shown in Fig. 1 and Fig. 2. Then I viewed the ive file using .earth file (modified by vpb_earth_bayarea.earth; Boston.ive and its related subtiles are located in my D partition of hard disk ). The ive file is as follows: !-- osgEarth Sample This example pulls imagery and dems from an online VirtualPlanetBuilder generated database. -- map name=Virtual Planet Builder model type=geocentric image name=imagery layer 0 driver=vpb urld:\Boston.ive/url primary_split_level5/primary_split_level secondary_split_level11/secondary_split_level /image heightfield name=dem driver=vpb urld:\Boston.ive/url /heightfield !-- cache pathcache/path /cache -- /map Then I view the .earth file using osgviewer, but nothing is in the scene (in Fig.3 ). Could anyone tell me what is the problem? Thank you. Thank you! Cheers, ting -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30745#30745 Attachments: http://forum.openscenegraph.org//files/nothing_174.jpg http://forum.openscenegraph.org//files/boston_terrain_212.jpg http://forum.openscenegraph.org//files/boston_255.jpg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG in Delta3D
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/14/2010 06:20 PM, Sanat Talmaki wrote: Hi, I am interested in adding Collision Detection to my current OSG application. And after going through a number of threads on this topic, the common theme was use Delta 3D. So my question is: Can I use my current OSG code as is, in Delta 3D and then just add other features (like collision detection) to the app ? Or does my osg code need to change to allow me to use it in Delta3D ? Thank You. Hello, Pretty much no - you need to rewrite your application using Delta's tools, otherwise Delta will not know about your code. Delta is not a library like OSG, it is a whole game engine. However, as Tony said, you do not need to use Delta for collision detection. osgBullet is one possibility, on the wiki there are examples of other engines as well (ODE, Havoc, PhysX, etc): http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials (look at the bottom, under External examples). In general, you need to define the physics body, usually by setting up the mass or some matrices and then the collision body - bounding volume of your mesh (inaccurate but fast) or the mesh itself (accurate but slow). The update of the engine data is typically done by a callback attached to your OSG node somewhere. Regards, Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org/ iD8DBQFMZ+3Jn11XseNj94gRAvOmAKDx/s0jLiP/k2Z5NfrtjI/+fIjvmgCg5iFK aP7YLCogOyigQSna9PTopRg= =ApJ5 -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG in Delta3D
Hi Tony,Jan I did go through delta 3d's tutorials and found that it had a lot more than I might need for now. Plus I felt it was much simpler to set up a scene and go from there in osg or maybe that's just because I have been using osg. I will look at osgBullet and integrate it. Thanks Sincerely, Sanat -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30747#30747 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg::Array
Hi, Ok. There are some unobvious things with indices array. The first thing, that confused me is there are index arrays for all data types(vertex/normal/texcoord/fogcoord), so which one should i use for interleaved array? The second thing is how to access IndexArray directly. I mean the way as in your example with vertices. I've tried to take indexarray from getVertexIndices() to osg::IndexArray* _indices, but it crashes on temp-getVertexIndices()-getNumElements(); The copy cycle looks like this: Code: for(int k = 0; k _numIndices; k++) { indices[i][k] = (*_indices).index(k); } there i - mesh index, and indices is 2-dimensional int array i din't see, if it works, because crash occures much earlier. Thank you! Cheers, Igor -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30748#30748 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Proximity Queries between objects
Hi, I am interested in knowing if there is some tool in osg that I can use to perform proximity queries between a pair of objects. I looked at osgbullet. But it offers a lot more than what I basically need. One approach that I have thought of is using distance formula between the PATs-position of the two objects. But with this, I won't get the object edge to object edge distance (i think) So, I wanted to know if there is some way in OSG I can compute the shortest distance between the boundaries of two objects. Thank You. Sincerely, Sanat -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30749#30749 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg::Array
Hello Igor, Ok. There are some unobvious things with indices array. I'll have to defer to someone else on the list for the behavior of index arrays. I don't use them generally, as they are not optimal on today's real-time pipelines and force OSG to use OpenGL slow paths. But obviously, if you are reading data that has index arrays then you need to be able to handle them, but I can't help you, sorry. Someone else on the list might be able to. Another way to go might be to convert the indexed geometry to non-indexed, I think there may be a class in the osgUtil::Optimizer that does this. Sorry I can't help you further, 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] Proximity Queries between objects
Hello Sanat, So, I wanted to know if there is some way in OSG I can compute the shortest distance between the boundaries of two objects. Well, in OSG you have access to an approximated bounding sphere and bounding box of your geometry (these may be very approximate though, i.e. they may not closely match the actual geometry). You can easily calculate the distance between two boxes or even more easily between two spheres. But I would look into using some physics engine for this anyways, even if it offers more than what you need at present, because it's likely you'll need what it offers eventually... It's really a matter of using the best tool for the job, and physics/collision detection engines are specialized at that sort of stuff. Hope this helps, 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] osg::Array
Hi, Oh, i thought indexed vbo is fastest. I just wanna try alternate, faster method. Also, my target of using osg - is make LightWave bones\animation import. I believe, i need indices for bones. Am i wrong? Thank you! Cheers, Igor -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30752#30752 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org