[osg-users] maxTime( OpenGL, OSG )

2008-11-28 Thread Ümit Uzun
Hi OSG Users,

I have been playing OSG for a year. And so far I have started to learn
OpenGL formally. I mean I only stepped to Graphics World based on OpenGL
maxTime( OpenGL, OSG ) ~= 1 year.

So I wonder to know peoples OpenGL story on this site to guess how long do I
need time to learn Graphics Terminology based on OpenGL.

So what is your maxTime() function returned results to your main function ?
:)

Best Regards.

-- 
Ümit Uzun
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Multi-threading bug related to Registry

2008-11-28 Thread Smeenk, R.J.M. (Roland)
Robert,

Note that Rick responded to your question although to the osg-users
Digest mail so it will probably not show as a follow up in your e-mail
box. See
http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2
008-November/019505.html

Sorry for pushing you around, but I happen to be interested in the
outcome of this thread.

--
Roland 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Robert Osfield
 Sent: dinsdag 25 november 2008 15:08
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Multi-threading bug related to Registry
 
 Hi Rick,
 
 Just to confirm the issue, if you enable Registry caching of 
 imagery and use paged databases that have external image 
 files, then you get
 the below crash.   If you don't use the Registry cache what happens?
 
 How reliably does this crash occur?
 
 My hypothisis is that the object cache is being cleared by 
 another thread just at the wrong time for this particular 
 section of .ive plugin.  If it is correct then use of  
 Registry::readImage(...) that returns a Registry::ReadResult 
 rather than a Image* would be safe as ReadResult uses 
 ref_ptr internally.
 
 Robert.
 
 On Tue, Nov 25, 2008 at 1:49 PM, Rick Appleton 
 [EMAIL PROTECTED] wrote:
  Sorry for the delay on this.
 
  Here's some more information. Below is a complete callstack 
 which should be similar to when the issue happened. Basically 
 we are loading a Paged terrain database which uses IVE files 
 for data, and DDS textures for images. A quick search in OSG 
 reveals that osgDB::readImageFile is called from many plugin 
 loaders, so I suspect they would have the same issue.
 
 
 osg48-osgDBd.dll!osgDB::Registry::readImageImplementation(cons
 t 
 std::basic_stringchar,std::char_traitschar,std::allocatorc
 har   fileName=textures/TxMosaic.dds, const 
 osgDB::ReaderWriter::Options * options=0x01f0ceb8)  Line 1706C++
 osg48-osgDBd.dll!osgDB::Registry::readImage(const 
 std::basic_stringchar,std::char_traitschar,std::allocatorc
 har   fileName=textures/TxMosaic.dds, const 
 osgDB::ReaderWriter::Options * options=0x01f0ceb8)  Line 217 
 + 0x14 bytes  C++
osg48-osgDBd.dll!osgDB::readImageFile(const 
 std::basic_stringchar,std::char_traitschar,std::allocatorc
 har   filename=textures/TxMosaic.dds, const 
 osgDB::ReaderWriter::Options * options=0x01f0ceb8)  Line 43 + 
 0x1d bytes C++
 
 osgdb_ived.dll!ive::DataInputStream::readImage(std::basic_stri
ngchar,std::char_traitschar,std::allocatorchar  
filename=textures/TxMosaic.dds)  Line 950 + 0x44 bytesC++
 
 osgdb_ived.dll!ive::DataInputStream::readImage(ive::IncludeIma
 geMode mode=IMAGE_REFERENCE_FILE)  Line 1003 + 0x2c bytes C++
 osgdb_ived.dll!ive::DataInputStream::readImage()  
 Line 976 + 0xc bytes  C++
 
 osgdb_ived.dll!ive::Texture2D::read(ive::DataInputStream * 
 in=0x00dbec2c)  Line 54 + 0x8 bytes  C++
 
 osgdb_ived.dll!ive::DataInputStream::readStateAttribute()  
 Line 1159 + 0xc bytesC++
 
 osgdb_ived.dll!ive::StateSet::read(ive::DataInputStream * 
 in=0x00dbec2c)  Line 173 + 0x8 bytes  C++
 osgdb_ived.dll!ive::DataInputStream::readStateSet()  
 Line 1066  C++
 osgdb_ived.dll!ive::Node::read(ive::DataInputStream 
 * in=0x00dbec2c)  Line 124 + 0x8 bytes  C++
 osgdb_ived.dll!ive::Geode::read(ive::DataInputStream 
 * in=0x00dbec2c)  Line 67  C++
 osgdb_ived.dll!ive::DataInputStream::readNode()  
 Line 1507 + 0x2d bytes C++
 osgdb_ived.dll!ive::Group::read(ive::DataInputStream 
 * in=0x00dbec2c)  Line 74 + 0x8 bytes  C++
 osgdb_ived.dll!ive::DataInputStream::readNode()  
 Line 1499 + 0xc bytes  C++
 
 osgdb_ived.dll!ReaderWriterIVE::readNode(std::basic_istreamch
ar,std::char_traitschar   fin={...}, const 
osgDB::ReaderWriter::Options * options=0x01f0ceb8)  Line 98 + 
 0xb bytesC++
 osgdb_ived.dll!ReaderWriterIVE::readNode(const 
 std::basic_stringchar,std::char_traitschar,std::allocatorc
 har   file=veluwe.ive, const 
 osgDB::ReaderWriter::Options * options=0x01efeb88)  Line 69 + 
 0x23 bytes C++
 
 osg48-osgDBd.dll!osgDB::Registry::ReadNodeFunctor::doRead(osgD
B::ReaderWriter  rw={...})  Line 1374 + 0x40 bytes   C++
 osg48-osgDBd.dll!osgDB::Registry::read(const 
 osgDB::Registry::ReadFunctor  readFunctor={...})  Line 1527 
 + 0x22 bytes  C++
 
 osg48-osgDBd.dll!osgDB::Registry::readImplementation(const 
 osgDB::Registry::ReadFunctor  readFunctor={...}, bool 
 useObjectCache=true)  Line 1596 + 0x13 bytes  C++
 
 osg48-osgDBd.dll!osgDB::Registry::readNodeImplementation(const
  
 std::basic_stringchar,std::char_traitschar,std::allocatorc
 har   fileName=veluwe.ive, const 
 osgDB::ReaderWriter::Options * options=0x01efeb88)  Line 1814 
 + 0x57 bytes   C++
 osg48-osgDBd.dll!osgDB::Registry::readNode(const 
 std::basic_stringchar,std::char_traitschar,std::allocatorc
 har   

[osg-users] Character motion plugin (ReaderWriterBVH) in progress

2008-11-28 Thread Wang Rui
Hi all, hi Cedric,

I'm just working on a plugin to read Biovision hierarchical files (.BVH) to
generate character motion animations. BVH format is widely used in Character
Studio of 3dsmax, Motion builder and other software. The plugin is based on
the latest osgAnimation library in the SVN version of OSG and will return a
osgAnimation::AnimationManager pointer if using readNodeFile().

The plugin builds the Skeleton/Bone tree within the HIERARCHY section of
a .bvh file and Animate/Channel within the MOTION section. Each Bone object
has a Vec3LinearChannel and a QuatSphericalLinearChannel linked to perform
translating and rotating. I'm not very familiar with the osgAnimation
nodekit but glad to see this structure works for me.

I was wondering to support a BvhNode in my osgModeling peoject before, but
found it better be a plugin for animation. A problem is, how to bind the
geometry models to the skeleton. Maybe we could have a bindingToNode()
function in the Skeleton class to find geodes matching names of bones and
add them as bones' children?

Attachment are the incomplete source file and a sample motion file (which
acts like the osganimationskinning example), not tested on Linux. The plugin
will draw lines as bones at present and I will make it an optional
functionality later. Just build the osgdb_bvh file and run osgviewer
example.bvh to see the result.

My thanks to Cedric and Jememy for their great (especially robust) work, and
I wish this ReaderWriterBVH plugin would be sent to osg-submissions soon
after I review it in a few days. Some of the results seem to have small
problems while reading BVH motions of human characters.

Best regards,
Wang Rui
#include osg/Notify

#include osgDB/FileNameUtils
#include osgDB/FileUtils
#include osgDB/Registry

#include osgAnimation/Bone
#include osgAnimation/Skeleton
#include osgAnimation/AnimationManager

class BvhMotionBuilder : public osg::Referenced
{
public:
typedef std::pairosg::ref_ptrosgAnimation::Bone, int JointNode;
typedef std::vectorJointNode JointList;

BvhMotionBuilder() {}
virtual ~BvhMotionBuilder() {}

static BvhMotionBuilder* instance()
{
static osg::ref_ptrBvhMotionBuilder s_library = new BvhMotionBuilder;
return s_library.get();
}

void buildHierarchy( osgDB::Input fr, int level, osgAnimation::Bone* 
parent )
{
bool isRecognized = false;
if ( !parent ) return;

if ( fr.matchSequence(OFFSET %f %f %f) )
{
isRecognized = true;
++fr;

osg::Vec3 offset;
if ( fr.readSequence(offset) )
{
// Process OFFSET section
parent-setBindMatrixInBoneSpace( 
osg::Matrix::translate(offset) );
if ( parent-getNumParents()  level0 )
parent-getParent(0)-addChild( createRefGeometry(offset, 
0.1) );
}
}

if ( fr.matchSequence(CHANNELS %i) )
{
isRecognized = true;

// Process CHANNELS section
int noChannels;
fr[1].getInt( noChannels );
fr += 2;

for ( int i=0; inoChannels; ++i )
{
// Process each channel
std::string channelName;
fr.readSequence( channelName );
alterChannel( channelName, _joints.back().second );
}
}

if ( fr.matchSequence(End Site {) )
{
isRecognized = true;
fr += 3;

if ( fr.matchSequence(OFFSET %f %f %f) )
{
++fr;

osg::Vec3 offsetEndSite;
if ( fr.readSequence(offsetEndSite) )
{
// Process End Site section
osg::ref_ptrosgAnimation::Bone bone = new 
osgAnimation::Bone( parent-getName()+End );
bone-setBindMatrixInBoneSpace( 
osg::Matrix::translate(offsetEndSite) );
bone-setDataVariance( osg::Object::DYNAMIC );
parent-addChild( bone );

parent-addChild( createRefGeometry(offsetEndSite, 0.1) );
}
}
fr.advanceOverCurrentFieldOrBlock();
}

if ( fr.matchSequence(ROOT %w {) || fr.matchSequence(JOINT %w {) )
{
isRecognized = true;

// Process JOINT section
osg::ref_ptrosgAnimation::Bone bone = new osgAnimation::Bone( 
fr[1].getStr() );
bone-setDataVariance( osg::Object::DYNAMIC );
osgAnimation::AnimationUpdateCallback* cb =
dynamic_castosgAnimation::AnimationUpdateCallback*( 
bone-getUpdateCallback() );
if ( cb ) cb-setName( bone-getName() );
parent-addChild( bone );
_joints.push_back( JointNode(bone, 0) );

int entry = fr[1].getNoNestedBrackets();
fr += 3;
while ( !fr.eof()  

Re: [osg-users] Multi-threading bug related to Registry

2008-11-28 Thread Robert Osfield
HI Roland,

I did read the reply, and I have already reponded.

Robert.

On Fri, Nov 28, 2008 at 8:19 AM, Smeenk, R.J.M. (Roland)
[EMAIL PROTECTED] wrote:
 Robert,

 Note that Rick responded to your question although to the osg-users
 Digest mail so it will probably not show as a follow up in your e-mail
 box. See
 http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2
 008-November/019505.html

 Sorry for pushing you around, but I happen to be interested in the
 outcome of this thread.

 --
 Roland

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf
 Of Robert Osfield
 Sent: dinsdag 25 november 2008 15:08
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Multi-threading bug related to Registry

 Hi Rick,

 Just to confirm the issue, if you enable Registry caching of
 imagery and use paged databases that have external image
 files, then you get
 the below crash.   If you don't use the Registry cache what happens?

 How reliably does this crash occur?

 My hypothisis is that the object cache is being cleared by
 another thread just at the wrong time for this particular
 section of .ive plugin.  If it is correct then use of
 Registry::readImage(...) that returns a Registry::ReadResult
 rather than a Image* would be safe as ReadResult uses
 ref_ptr internally.

 Robert.

 On Tue, Nov 25, 2008 at 1:49 PM, Rick Appleton
 [EMAIL PROTECTED] wrote:
  Sorry for the delay on this.
 
  Here's some more information. Below is a complete callstack
 which should be similar to when the issue happened. Basically
 we are loading a Paged terrain database which uses IVE files
 for data, and DDS textures for images. A quick search in OSG
 reveals that osgDB::readImageFile is called from many plugin
 loaders, so I suspect they would have the same issue.
 
 
 osg48-osgDBd.dll!osgDB::Registry::readImageImplementation(cons
 t
 std::basic_stringchar,std::char_traitschar,std::allocatorc
 har   fileName=textures/TxMosaic.dds, const
 osgDB::ReaderWriter::Options * options=0x01f0ceb8)  Line 1706C++
 osg48-osgDBd.dll!osgDB::Registry::readImage(const
 std::basic_stringchar,std::char_traitschar,std::allocatorc
 har   fileName=textures/TxMosaic.dds, const
 osgDB::ReaderWriter::Options * options=0x01f0ceb8)  Line 217
 + 0x14 bytes  C++
osg48-osgDBd.dll!osgDB::readImageFile(const
 std::basic_stringchar,std::char_traitschar,std::allocatorc
 har   filename=textures/TxMosaic.dds, const
 osgDB::ReaderWriter::Options * options=0x01f0ceb8)  Line 43 +
 0x1d bytes C++
 
 osgdb_ived.dll!ive::DataInputStream::readImage(std::basic_stri
 ngchar,std::char_traitschar,std::allocatorchar  
 filename=textures/TxMosaic.dds)  Line 950 + 0x44 bytesC++
 
 osgdb_ived.dll!ive::DataInputStream::readImage(ive::IncludeIma
 geMode mode=IMAGE_REFERENCE_FILE)  Line 1003 + 0x2c bytes C++
 osgdb_ived.dll!ive::DataInputStream::readImage()
 Line 976 + 0xc bytes  C++
 
 osgdb_ived.dll!ive::Texture2D::read(ive::DataInputStream *
 in=0x00dbec2c)  Line 54 + 0x8 bytes  C++
 
 osgdb_ived.dll!ive::DataInputStream::readStateAttribute()
 Line 1159 + 0xc bytesC++
 
 osgdb_ived.dll!ive::StateSet::read(ive::DataInputStream *
 in=0x00dbec2c)  Line 173 + 0x8 bytes  C++
 osgdb_ived.dll!ive::DataInputStream::readStateSet()
 Line 1066  C++
 osgdb_ived.dll!ive::Node::read(ive::DataInputStream
 * in=0x00dbec2c)  Line 124 + 0x8 bytes  C++
 osgdb_ived.dll!ive::Geode::read(ive::DataInputStream
 * in=0x00dbec2c)  Line 67  C++
 osgdb_ived.dll!ive::DataInputStream::readNode()
 Line 1507 + 0x2d bytes C++
 osgdb_ived.dll!ive::Group::read(ive::DataInputStream
 * in=0x00dbec2c)  Line 74 + 0x8 bytes  C++
 osgdb_ived.dll!ive::DataInputStream::readNode()
 Line 1499 + 0xc bytes  C++
 
 osgdb_ived.dll!ReaderWriterIVE::readNode(std::basic_istreamch
 ar,std::char_traitschar   fin={...}, const 
 osgDB::ReaderWriter::Options * options=0x01f0ceb8)  Line 98 +
 0xb bytesC++
 osgdb_ived.dll!ReaderWriterIVE::readNode(const
 std::basic_stringchar,std::char_traitschar,std::allocatorc
 har   file=veluwe.ive, const
 osgDB::ReaderWriter::Options * options=0x01efeb88)  Line 69 +
 0x23 bytes C++
 
 osg48-osgDBd.dll!osgDB::Registry::ReadNodeFunctor::doRead(osgD
 B::ReaderWriter  rw={...})  Line 1374 + 0x40 bytes   C++
 osg48-osgDBd.dll!osgDB::Registry::read(const
 osgDB::Registry::ReadFunctor  readFunctor={...})  Line 1527
 + 0x22 bytes  C++
 
 osg48-osgDBd.dll!osgDB::Registry::readImplementation(const
 osgDB::Registry::ReadFunctor  readFunctor={...}, bool
 useObjectCache=true)  Line 1596 + 0x13 bytes  C++
 
 osg48-osgDBd.dll!osgDB::Registry::readNodeImplementation(const

 std::basic_stringchar,std::char_traitschar,std::allocatorc
 har   fileName=veluwe.ive, const
 osgDB::ReaderWriter::Options * options=0x01efeb88)  Line 1814
 + 0x57 bytes   C++
 osg48-osgDBd.dll!osgDB::Registry::readNode(const
 

Re: [osg-users] osgAudio / osgAL

2008-11-28 Thread Robert Osfield
Hi Sukender,

On Thu, Nov 27, 2008 at 10:07 PM, Sukender [EMAIL PROTECTED] wrote:
 And maybe we should have a look to some other libs too, such as SFML ( 
 http://www.sfml-dev.org )?

This just adds more dependencies...include OpenAL so I'm not sure it's
make things any simpler than just integrating with OpenAL ourselves.

 I would also try to keep things decoupled so items like a Manager
 would be something that is implementation dependent, rather that
 something that end user need worry about.

 Sorry I don't understand. Do you mean you're in favor of my second idea 
 (having a kind of priorirty for sounds that the plugin would use to 
 automatically turn on/off sounds to fit the limitation of the number of 
 sources)?

In my paragraph above I was referring to the desire to keep
implementation details including any managers that might be written

I don't have any strong opinions on the topic, others have far more
experience with using audio in scene graphs, I was hoping that they
would dive in and comment...


 Having a separate thread sounds fine to me. CPU is not used enough for audio! 
 Maybe a good occlusion computation would add immersion; so I think a separate 
 thread is better. Should there be audio update and cull/render traverals 
 for the viewer then?

Having the Viewer manage an audio traversal/and or threads for it
wouldn't be difficult.  Conceptually you render the audio in a similar
way to you manage graphics so the the cull/draw for graphics and
cull/play for audio could sit comfortably side by side.

 I'm also too busy to work on osgAudio, but I'd like to help as much as I can.

We'll if neither have the time, and as no one else has dived into this
topic to volunteer we will just have to be patient.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Videos of DBGS Trian3D

2008-11-28 Thread Stephan Kussmaul

Hi Jean-Sébastien,
Very nice stuff. I've looked through your sample databases, and it 
looks very good. I have a few questions:


* Is the representation of trees configurable? Some situations might 
need only a billboard, others a cross of quads, others a more detailed 
tree model (LODs with all three even?)
You can certainly place any object you like (see below concerning 
building placement) and we are currently working on a billboard modifier 
for automatic billboard generation. But we don't do automatic plant 
generation, if you want a tree with LODs going from high-res over quad 
to billboard, you will have to define this by hand.


* Why is the lowest LOD of your terrain a flat white quad? Couldn't it 
be a quad with the terrain texture at least? Or even a very low-poly 
version of the terrain, so we still get a general impression of the 
hills... It looks a bit weird when we zoom way out and it becomes a 
flat white plane.
I see your point. In general this quad should not be seen at all, as it 
is only displayed when the last LOD is switched out. Normally there 
should not be anything, but we needed a dummy object so that the pager 
would start his work. We don't want to put the low-res LOD in the master 
(as I think it is done in VPB), as our terrains might be very large. 
There might be a better way to do this- any advice is appreciated.


* Are the building models configurable too? If we have an in-house 
modeler, could he use his own building models (with LODs etc.) in 
Trian3D Builder?
Sure you can place any objects according to various policies. You may 
place objects as local geometries (make e.g. groups of 200 trees and 
switch them in/out together) , internal reference (tree is in the file 
but referenced), external reference (points to external file e.g. 
airport). For building models with LODs you will have to use a reference 
policy.


We (CM Labs) will have some people at I/ITSEC, so I've talked to them 
and they will go check your stuff out firsthand.

Great I will write you another e-mail personally.

Regards,
Stephan

--
-
Stephan Kussmaul
Geschaeftsfuehrender Gesellschafter / Managing Director
TrianGraphics GmbH
Schoenhauser Allee 45
10435 Berlin
Germany
Tel: +49 (0)30 48495565   FAX: +49 (0)30 48495581
Email: [EMAIL PROTECTED]
Web: www.triangraphics.de
-
Sitz der Gesellschaft / Corporate Headquarters:
TrianGraphics GmbH, Berlin
Registereintragung / Registration:
Amtsgericht Berlin-Charlottenburg HRB 93807 B
Geschaeftsfuehrer / Managing Directors:
Stephan Kussmaul, Mirco Nierenz, Volker Walkiewicz 


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] VPB: osgdem ignoring vertical multiplier

2008-11-28 Thread Robert Osfield
HI Alejandro,

I haven't tried the vertical exaggeration in osgdem/vpbmaster for a
long time so I can't comment on whether it works or not.  You'll need
to dive into the code to see if some code paths are missing.

As a general note, VPB works best generating osgTerrain based height
fields, enabled via the --terrain option, if you use this option then
you'll be able to vary the vertical scale at runtime via
osgTerrain::Terrain::setVerticalScale(..).  See of the
osgmultitexturecontrol example.

Robert.

On Thu, Nov 27, 2008 at 10:50 PM, Alejandro Aguilar Sierra
[EMAIL PROTECTED] wrote:
 Hello:

 I created a geotiff file with all necesary data. The resulting
 terrain, using osgdem, is correct.

 Now I'd like to exagerate the vertical scale in another model. I tried
 to force the vertical scale assigning a vertical multiplier -v 10.0
 but osgdem ignores it.

 Any hint?

 Thanks in advance.

 -- A.
 ___
 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] Videos of DBGS Trian3D

2008-11-28 Thread Can T. Oguz
Very cool demonstration!

I hope it goes as you wish!

Regards,

Can

2008/11/27 Stephan Kussmaul [EMAIL PROTECTED]

 Hi OSG Users,

 We have created a few new videos about our terrain generation software
 Trian3D. Maybe some of you like to see what we are doing with OSG. Here is
 the link to our website:

 www.triangraphics.de/index.php?1=Download2=Videosl=eng

 or if you prefer to watch them on YouTube (in modest quality though):

 www.youtube.com/user/TrianGraphics

 Any comments or suggestions are welcome. If anyone is interested in meeting
 me at the I/ITSEC, just let me know.

 Best regards and thanks to all OSG developers,

 Stephan

 --
 -
 Stephan Kussmaul
 Geschaeftsfuehrender Gesellschafter / Managing Director
 TrianGraphics GmbH
 Schoenhauser Allee 45
 10435 Berlin
 Germany
 Tel: +49 (0)30 48495565   FAX: +49 (0)30 48495581
 Email: [EMAIL PROTECTED]
 Web: www.triangraphics.de
 -
 Sitz der Gesellschaft / Corporate Headquarters:
 TrianGraphics GmbH, Berlin
 Registereintragung / Registration:
 Amtsgericht Berlin-Charlottenburg HRB 93807 B
 Geschaeftsfuehrer / Managing Directors:
 Stephan Kussmaul, Mirco Nierenz, Volker Walkiewicz
 ___
 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] maxTime( OpenGL, OSG )

2008-11-28 Thread Robert Osfield
Hi Umit,

My first experience with OpenGL was in the mid nineties, but prior to
this I used IrisGL which was SGI's predecessor - I started learning
this back in 92 at the same time I started using C++.  I'm still
learning both OpenGL and C++ :-)

The OSG... well I picked up and started coding on Don Burn's little sg
project that became the OSG back in 98.  I'm still learning about the
OSG now.

Robert.

On Fri, Nov 28, 2008 at 8:02 AM, Ümit Uzun [EMAIL PROTECTED] wrote:
 Hi OSG Users,

 I have been playing OSG for a year. And so far I have started to learn
 OpenGL formally. I mean I only stepped to Graphics World based on OpenGL
 maxTime( OpenGL, OSG ) ~= 1 year.

 So I wonder to know peoples OpenGL story on this site to guess how long do I
 need time to learn Graphics Terminology based on OpenGL.

 So what is your maxTime() function returned results to your main function ?
 :)

 Best Regards.

 --
 Ümit Uzun

 ___
 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] Processing model

2008-11-28 Thread Robert Osfield
Hi Forest,

The osgViewer's DrawThreadPerContext and
CullThreadPerCameraDrawThreadPerContext models both overlap the update
and cull with the draw dispatch.

As for you cull and draw times being large, it most likely down to a
poorly conditioned database.  There are lots and lots of tricks one
can do to optimize scene graphs - a topic that has been covered lots
of time on osg-users so have a dig through the archives.

Robert.

On Fri, Nov 28, 2008 at 8:21 AM, forest37 [EMAIL PROTECTED] wrote:
  hi all,
 I find that when I have a large scene to render,the cull and draw time
 is so long that the program can't be interactive.I an wondering whether
 there is a processing model which processes the cull and draw time
 simultaneity.That is to say the first frame's draw() runs in the second
 frame .there is a picture Figure 6 - Multithreaded phase model for
 multidisplay system with CULL and DRAW as separate threads in the article
 A New Processing Model for Multithreaded, Multidisplay Scene Graphs at
 http://andesengineering.com/OSG_ProducerArticles/OSGMP/index.html
 Is there a thread model in osg can achieve that?
 Thanks in advance
 best regards
 forest


 
 [广告] 重奖 悬赏kfc3v3 球衣
 ___
 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] maxTime( OpenGL, OSG )

2008-11-28 Thread webmaster


Hi Umit, 
 My first experience with OpenGL was in about 1992, the opengl version is 1.0 Beta,but prior to this I used IrisGL which was SGI's predecessor  Professional Graphics ternimation in VAX-11.
 zhuwan
 2008,11,28<[EMAIL PROTECTED]><[EMAIL PROTECTED]>原始邮件发件人:[EMAIL PROTECTED]发送时间:2008-11-28 17:11:57收件人:osg-users@lists.openscenegraph.org抄送人:(无)主题:Re: [osg-users] maxTime( OpenGL, OSG )

Hi Umit, My first experience with OpenGL was in the mid nineties, but prior to this I used IrisGL which was SGI's predecessor - I started learning this back in 92 at the same time I started using C++. I'm still learning both OpenGL and C++ :-) The OSG... well I picked up and started coding on Don Burn's little sg project that became the OSG back in 98. I'm still learning about the OSG now. Robert. On Fri, Nov 28, 2008 at 8:02 AM, Ümit Uzun [EMAIL PROTECTED] wrote: 
Hi OSG Users, I have been playing OSG for a year. And so far I have started to learn OpenGL formally. I mean I only stepped to Graphics World based on OpenGL maxTime( OpenGL, OSG ) ~= 1 year. So I wonder to know peoples OpenGL story on this site to guess how long do I need time to learn Graphics Terminology based on OpenGL. So what is your maxTime() function returned results to your main function ? :) Best Regards. -- Ümit Uzun ___ 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___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] maxTime( OpenGL, OSG )

2008-11-28 Thread webmaster


Hi Umit, 
 My first experience with OpenGL was in about 1992, the opengl version is 1.0 Beta,but prior to this I used IrisGL which was SGI's predecessor  Professional Graphics ternimation in VAX-11.
 zhuwan
 2008,11,28<[EMAIL PROTECTED]><[EMAIL PROTECTED]>Original MailFrom:[EMAIL PROTECTED]Send Time:2008-11-28 17:45:50To:osg-users@lists.openscenegraph.orgcc:(none)subject:Re: [osg-users] maxTime( OpenGL, OSG )


Hi Ümit,

I've started at '98; but there has been a long break from 2001 to 2008. Never left C++ but there's always something you don't know in C++. I feel like a newbee when it comes to OpenGL. OSG is a 6 month story for me. But I'm very glad I've started using it.

Regards,

Can
2008/11/28 Robert Osfield [EMAIL PROTECTED]
Hi Umit,My first experience with OpenGL was in the mid nineties, but prior tothis I used IrisGL which was SGI's predecessor - I started learningthis back in 92 at the same time I started using C++. I'm stilllearning both OpenGL and C++ :-)The OSG... well I picked up and started coding on Don Burn's little sgproject that became the OSG back in 98. I'm still learning about theOSG now.Robert.


On Fri, Nov 28, 2008 at 8:02 AM, Ümit Uzun [EMAIL PROTECTED] wrote: Hi OSG Users, I have been playing OSG for a year. And so far I have started to learn OpenGL formally. I mean I only stepped to Graphics World based on OpenGL maxTime( OpenGL, OSG ) ~= 1 year. So I wonder to know peoples OpenGL story on this site to guess how long do I need time to learn Graphics Terminology based on OpenGL. So what is your maxTime() function returned results to your main function ? :) Best Regards. -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___osg-users mailing listosg-users@lists.openscenegraph.orghttp://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___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] maxTime( OpenGL, OSG )

2008-11-28 Thread Can T. Oguz
Hi Ümit,

I've started at '98; but there has been a long break from 2001 to 2008.
Never left C++ but there's always something you don't know in C++. I feel
like a newbee when it comes to OpenGL. OSG is a 6 month story for me. But
I'm very glad I've started using it.

Regards,

Can
2008/11/28 Robert Osfield [EMAIL PROTECTED]

 Hi Umit,

 My first experience with OpenGL was in the mid nineties, but prior to
 this I used IrisGL which was SGI's predecessor - I started learning
 this back in 92 at the same time I started using C++.  I'm still
 learning both OpenGL and C++ :-)

 The OSG... well I picked up and started coding on Don Burn's little sg
 project that became the OSG back in 98.  I'm still learning about the
 OSG now.

 Robert.

 On Fri, Nov 28, 2008 at 8:02 AM, Ümit Uzun [EMAIL PROTECTED] wrote:
  Hi OSG Users,
 
  I have been playing OSG for a year. And so far I have started to learn
  OpenGL formally. I mean I only stepped to Graphics World based on OpenGL
  maxTime( OpenGL, OSG ) ~= 1 year.
 
  So I wonder to know peoples OpenGL story on this site to guess how long
 do I
  need time to learn Graphics Terminology based on OpenGL.
 
  So what is your maxTime() function returned results to your main function
 ?
  :)
 
  Best Regards.
 
  --
  Ümit Uzun
 
  ___
  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

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Texture2D rendering problem

2008-11-28 Thread Arisnova Arisnova
Hi all, I'm looking for a good advice to resolve a problem with a texture.
My object uses 4 texture layers, a diffuse map and another 3 decal textures
to represent a letter and optional visual complements. In a frontal point of
view the texture renders ok (snapTexture1.jpg), but as I move the camera to
a lateral view, a black margin appears (snaptexture2.jpg)
I tried to change the filter mode using LINEAR and NEAREST for MIN_FILTER
and MAG_FILTER, but the three decal textures are rendered in the same way.

Has anybody faced this problem before? Suggestion welcome, thanks in
advance,
Iván.
attachment: snapTexture1.jpgattachment: snapTexture2.jpg___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Texture2D rendering problem

2008-11-28 Thread Robert Osfield
Hi Arisonova,

There isn't enough info about how you are setting up your scene graph
to know precisely what the problem, and the image's aren't clear
enough.  So best I can do is make general suggestions.  First up is
learn about anisotropic filtering and clamp modes as these may well be
part of the answer to your problem.  The osgtexture2D examples shows
these in action.

Robert.

On Fri, Nov 28, 2008 at 10:14 AM, Arisnova Arisnova [EMAIL PROTECTED] wrote:
 Hi all, I'm looking for a good advice to resolve a problem with a texture.
 My object uses 4 texture layers, a diffuse map and another 3 decal textures
 to represent a letter and optional visual complements. In a frontal point of
 view the texture renders ok (snapTexture1.jpg), but as I move the camera to
 a lateral view, a black margin appears (snaptexture2.jpg)
 I tried to change the filter mode using LINEAR and NEAREST for MIN_FILTER
 and MAG_FILTER, but the three decal textures are rendered in the same way.

 Has anybody faced this problem before? Suggestion welcome, thanks in
 advance,
 Iván.


 ___
 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] How to compile OSG with Dev-C++ and 3rdParty source in Cmake!

2008-11-28 Thread YangXiao
Thanks Luigi and  Wang Rui. I'll download 3rdParty source.I now use eclipse(Qt 
+ Dev-C++), I'll integate  OSG and 3rdParty with in eclipse.
YangXiao.

--- 08年11月28日,周五, Luigi Calori [EMAIL PROTECTED] 写道:

发件人: Luigi Calori [EMAIL PROTECTED]
主题: Re: [osg-users] How to compile OSG with Dev-C++ and 3rdParty source in 
Cmake!
收件人: OpenSceneGraph Users osg-users@lists.openscenegraph.org
日期: 2008,1128,周五,6:19下午

I' m currently using CMake to build 3rdParty dependencies with VC7.1, if
you want to see if it is working for mingw, get either
http://3d.cineca.it/storage/packages/3rdPartySrc.zip ot
http://3d.cineca.it/storage/packages/3rdPartySrc_packed.zip
The latter require you unpack in place the original source zip.

Hope it helps

Luigi


Wang Rui ha scritto:
 Hi YangXiao
 Maybe you should try to build required 3rd dependence with mingw
 (which is the default compiler of Dev-Cpp) first, and then build OSG
 with CMake.

 Wang Rui
 2008/11/28 YangXiao [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]

 Hi Everyone:
 I already setup QT and Dev-C++ on my computer and integrate in
 Eclipse,But when i compile osg and 3rdParty ,I found only a Visual
 c++ 8 sp1 binary lib.
 How to compile OSG with Dev-C++ and 3rdParty source in Cmake?
 Someone can give me advices!
 Best regards.
 YangXiao




 好玩贺卡等你发,邮箱贺卡全新上线!

http://cn.rd.yahoo.com/mail_cn/tagline/card/*http://card.mail.cn.yahoo.com/
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 mailto: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
   

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



  ___ 
  好玩贺卡等你发,邮箱贺卡全新上线! 
http://card.mail.cn.yahoo.com/___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to compile OSG with Dev-C++ and 3rdParty source in Cmake!

2008-11-28 Thread Luigi Calori
I' m currently using CMake to build 3rdParty dependencies with VC7.1, if
you want to see if it is working for mingw, get either
http://3d.cineca.it/storage/packages/3rdPartySrc.zip ot
http://3d.cineca.it/storage/packages/3rdPartySrc_packed.zip
The latter require you unpack in place the original source zip.

Hope it helps

Luigi


Wang Rui ha scritto:
 Hi YangXiao
 Maybe you should try to build required 3rd dependence with mingw
 (which is the default compiler of Dev-Cpp) first, and then build OSG
 with CMake.

 Wang Rui
 2008/11/28 YangXiao [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]

 Hi Everyone:
 I already setup QT and Dev-C++ on my computer and integrate in
 Eclipse,But when i compile osg and 3rdParty ,I found only a Visual
 c++ 8 sp1 binary lib.
 How to compile OSG with Dev-C++ and 3rdParty source in Cmake?
 Someone can give me advices!
 Best regards.
 YangXiao


 
 好玩贺卡等你发,邮箱贺卡全新上线!
 
 http://cn.rd.yahoo.com/mail_cn/tagline/card/*http://card.mail.cn.yahoo.com/
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 mailto: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
   

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Determine texture memory allocation size

2008-11-28 Thread Art Tevs
Hi Jean-Sebastian,

this counter thing or other queries of texture memory require that one 
load/unload the texture to see the difference. However I would like to have a 
method similar to glGetTexParameter or so, which gives me direct result.

As far as I was bale to find additional info there is no such method in GL 
specifications ;( Hence my solution is just to compute the size based on 
internal format and resolution, using the implementation from osg::Image. For 
my purpose this seems to be enough. 

Thank you again.

Cheers,
art



--- Jean-Sébastien Guay [EMAIL PROTECTED] schrieb am Fr, 28.11.2008:

 Von: Jean-Sébastien Guay [EMAIL PROTECTED]
 Betreff: Re: [osg-users] Determine texture memory allocation size
 An: [EMAIL PROTECTED], OpenSceneGraph Users 
 osg-users@lists.openscenegraph.org
 Datum: Freitag, 28. November 2008, 2:11
 Hi Art, Gordon,
 
  Sorry Opengl does not provide any such function or
 capability, you have to
  track this on your own I'm afraid
 
 OpenGL doesn't, but if you install nVidia's
 instrumented drivers, there are a large number of counters
 you can query for low-level things like this.
 
 I'm not sure there's a counter for the memory used
 by a single texture, it might just be total texture memory
 used by a context. But you can always load the texture using
 osgviewer --image and then the total texture
 memory used by the context *is* the texture memory used by
 your texture! :-)
 
 But other than using these instrumented drivers (and I
 think they're only for Windows, but I'm not sure, so
 see their site to be sure) I don't know another way.
 
 Hope this helps,
 
 J-S
 -- __
 Jean-Sebastien Guay[EMAIL PROTECTED]
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] maxTime( OpenGL, OSG )

2008-11-28 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[EMAIL PROTECTED] wrote:
 
 
 Hi Umit,
 
My first experience with OpenGL was in about 1992, the opengl version
 is 1.0 Beta,but prior to this I used IrisGL which was SGI's predecessor
  Professional Graphics ternimation in VAX-11.
^^

Hats off to that!

Jan

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iD8DBQFJL+g7n11XseNj94gRAgoiAJ9G7/rL8gk4irC1OEJOywOTHAEavACgxV0s
jPPTxXl2ktkH/HWK2ZIwYmc=
=72dy
-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-users Digest, Vol 17, Issue 110

2008-11-28 Thread Robert Osfield
Hi Ivan,

Mailing list digest user are too often screwing up threading my doing
a reply to a digest post.  So... if you want support please reply to
the original post's subject.  I'm not going to reply to this broken
thread.

Robert.

On Fri, Nov 28, 2008 at 12:51 PM, Arisnova [EMAIL PROTECTED] wrote:
 -- Mensaje reenviado --
 From: Robert Osfield [EMAIL PROTECTED]
 To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
 Date: Fri, 28 Nov 2008 10:54:14 +
 Subject: Re: [osg-users] Texture2D rendering problem
 Hi Arisonova,

 There isn't enough info about how you are setting up your scene graph
 to know precisely what the problem, and the image's aren't clear
 enough.  So best I can do is make general suggestions.  First up is
 learn about anisotropic filtering and clamp modes as these may well be
 part of the answer to your problem.  The osgtexture2D examples shows
 these in action.

 Robert.


 Hi Robert,

 Is a basic osgViewer::Viewer with a simple scene graph with one light. The
 object is loaded from a osg file, and I mofify a StateSet to add thre more
 texture unit, these is the original stateSet:

 StateSet {
 UniqueID StateSet_2
 DataVariance STATIC
 rendering_hint TRANSPARENT_BIN
 renderBinMode USE
 binNumber 10
 binName DepthSortedBin
 GL_CULL_FACE ON
 GL_LIGHTING OVERRIDE|OFF
 0xba1 ON
 GL_BLEND ON
 Material {
   DataVariance STATIC
   ColorMode OFF
   ambientColor 0.941177 0.941177 0.941177 1
   diffuseColor 1 1 1 1
   specularColor 0 0 0 1
   emissionColor 0 0 0 1
   shininess 0
 }
 BlendFunc {
   DataVariance STATIC
   source SRC_ALPHA
   destination ONE_MINUS_SRC_ALPHA
 }
 textureUnit 0 {
   GL_TEXTURE_2D ON
   Texture2D {
 DataVariance STATIC
 file images\estudioCompleteMap.png
 wrap_s CLAMP_TO_EDGE
 wrap_t CLAMP_TO_EDGE
 wrap_r CLAMP_TO_EDGE
 min_filter LINEAR_MIPMAP_LINEAR
 mag_filter LINEAR
 maxAnisotropy 1
 borderColor 0 0 0 0
 borderWidth 0
 useHardwareMipMapGeneration TRUE
 unRefImageDataAfterApply FALSE
 internalFormatMode USE_ARB_COMPRESSION
 resizeNonPowerOfTwo TRUE
   }
 }
   }


 , then I add three decal textuers in this way:

   stateSet.setTextureAttributeAndModes(texId, new osg::Texture2D(image),
 osg::StateAttribute::ON);
   stateSet.setTextureAttribute(texId, new osg::TexEnv(osg::TexEnv::DECAL));


 Anyway, I'm going to play around with anisotropic filtering and the clamp
 modes as you suggest me.

 Best regards,
 Iván.

 ___
 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] Render Bin, Transparency, ...

2008-11-28 Thread Vincent Bourdier
Sorry to insist, but I am surprised to see no answer ?
Any suggestion or idea will be very appreciated.

thanks a lot.

Regards,
   Vincent

2008/11/28 Vincent Bourdier [EMAIL PROTECTED]

 Hi all,

 Looking in the archive I didn't found what I need, so this is the problem:

 I need to manage in the same scene : transparency nodes, skymap(s) (with
 transparency or not), normal (no-transparent) nodes.

 For the moment I apply on my skymaps the following code :

 osg::StateSet* state = myGeode-getOrCreateStateSet();

 //Set sky render after objects, not depending on frustrum
 // Set texture mode to REPLACE
 osg::ref_ptrosg::TexEnv te = new osg::TexEnv;
  te-setMode(osg::TexEnv::REPLACE);
  state-setTextureAttributeAndModes(0, te.get(),
 osg::StateAttribute::ON);

  // Turn off lighting and cull face
  state-setMode(GL_CULL_FACE, osg::StateAttribute::OFF);

  osg::ref_ptrosg::Depth depth = new osg::Depth(osg::Depth::LEQUAL,
 1.0, 1.0);
  state-setAttributeAndModes(depth.get(), osg::StateAttribute::ON);

  // Make pretty darn sure it is drawn first.(-1000) : it ensure that
 sky can be seen throw transparency surfaces
  state-setRenderBinDetails(-1000, RenderBin);

  myGeode-setCullingActive(false);


  But, I have some node with tranparency on the scene, and when I look the
 skymap, I see something not expected (see Attached file)

 Can you remember me what is the good rendering order ? and How to managed
 the skymaps and the transparent nodes 

 Thanks a lot,

 Regards,
Vincent.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg-users Digest, Vol 17, Issue 110

2008-11-28 Thread Arisnova

 -- Mensaje reenviado --
 From: Robert Osfield [EMAIL PROTECTED]
 To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
 Date: Fri, 28 Nov 2008 10:54:14 +
 Subject: Re: [osg-users] Texture2D rendering problem
 Hi Arisonova,

 There isn't enough info about how you are setting up your scene graph
 to know precisely what the problem, and the image's aren't clear
 enough.  So best I can do is make general suggestions.  First up is
 learn about anisotropic filtering and clamp modes as these may well be
 part of the answer to your problem.  The osgtexture2D examples shows
 these in action.

 Robert.


Hi Robert,

Is a basic osgViewer::Viewer with a simple scene graph with one light. The
object is loaded from a osg file, and I mofify a StateSet to add thre more
texture unit, these is the original stateSet:

StateSet {
UniqueID StateSet_2
DataVariance STATIC
rendering_hint TRANSPARENT_BIN
renderBinMode USE
binNumber 10
binName DepthSortedBin
GL_CULL_FACE ON
GL_LIGHTING OVERRIDE|OFF
0xba1 ON
GL_BLEND ON
Material {
  DataVariance STATIC
  ColorMode OFF
  ambientColor 0.941177 0.941177 0.941177 1
  diffuseColor 1 1 1 1
  specularColor 0 0 0 1
  emissionColor 0 0 0 1
  shininess 0
}
BlendFunc {
  DataVariance STATIC
  source SRC_ALPHA
  destination ONE_MINUS_SRC_ALPHA
}
textureUnit 0 {
  GL_TEXTURE_2D ON
  Texture2D {
DataVariance STATIC
file images\estudioCompleteMap.png
wrap_s CLAMP_TO_EDGE
wrap_t CLAMP_TO_EDGE
wrap_r CLAMP_TO_EDGE
min_filter LINEAR_MIPMAP_LINEAR
mag_filter LINEAR
maxAnisotropy 1
borderColor 0 0 0 0
borderWidth 0
useHardwareMipMapGeneration TRUE
unRefImageDataAfterApply FALSE
internalFormatMode USE_ARB_COMPRESSION
resizeNonPowerOfTwo TRUE
  }
}
  }


, then I add three decal textuers in this way:

  stateSet.setTextureAttributeAndModes(texId, new osg::Texture2D(image),
osg::StateAttribute::ON);
  stateSet.setTextureAttribute(texId, new osg::TexEnv(osg::TexEnv::DECAL));


Anyway, I'm going to play around with anisotropic filtering and the clamp
modes as you suggest me.

Best regards,
Iván.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] FBO OpenGL Error with new nVidia Driver

2008-11-28 Thread Kim C Bale
I've just noticed that I've been getting some errors  when I run
osgprerender and also in my own program that uses a lot of pre-render
cameras and FBOs..

 

Firstly I get:

 

Warning: detected OpenGL error 'out of memory' after RenderBin::draw(,)

 

Then the following printed continuously as the program is running:

 

RenderStage::drawInner(,) FBO status= 0x8cd7

Warning: detected OpenGL errorNo= 0x506 after RenderBin::draw(,)

 

I've tracked 0x506 to INVALID_FRAMEBUFFER_OPERATION_EXT which does seem
odd, given that I'm running osgprerender which is a well established
example.
 
I put this down to the new nVidia driver as it seems to have occurred
after that. Just wanted to know if anyone else was experiencing this.
 

I'm running Vista Business 32bit using an nVidia 8800GTS 512mb card,
driver version: 7.15.11.8048

*
To view the terms under which this email is distributed, please go to 
http://www.hull.ac.uk/legal/email_disclaimer.html
*___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Outline technique that doesn't triple (or worse) my frame time?

2008-11-28 Thread Morné Pistorius
Hi J-S,

Just as another datapoint, I also implemented outlining in a similar
way to osgFX::Effect.  All times stay the
same except draw which triples.  In my application, this doesn't
affect me too much and I still make 60 fps if an object is selected or
not, so I don't mind the jump that much, but I can see it being a
problem if you have a very flexible scene/selection strategy...

Cheers,
Morne


On Wed, Nov 26, 2008 at 2:40 PM, Jean-Sébastien Guay
[EMAIL PROTECTED] wrote:
 Hi Robert,

 I presume that you won't be selecting too many objects in the scene,
 so it's not like you'll be doubling the cost of the whole scene, and
 if there is only one object in the scene that you select you are
 unlikely to be breaking frame...

 Well, that assumption is one I can't make... Since this is an application
 similar to a modeling application, the user could load anything up. And yes,
 we support multi-select, so the user could conceivably select the whole
 scene.

 Now, of course if the user loads objects which bring their system to a
 crawl, I can't do anything to prevent that. However, if they load up objects
 and the app just barely make frame, and then selects one of them and it
 suddenly breaks frame, it makes our app look bad. It's a contrived example,
 but it could really happen. And that's supposing they only select that one
 object - they could select them all, and then the total frame time might
 triple (I haven't tested this, but my results with multiple objects seem to
 indicate that would be the result).

 Anyways, the more general question: why is the frame time so affected by
 such a simple effect? As I said, it's a two-pass effect, I would expect the
 time for the selected object(s) to double, but not more... And I disable
 lighting, blending, texturing for the second pass, so I would think that
 pass would be quicker than the first.

 Thanks,

 J-S
 --
 __
 Jean-Sebastien Guay[EMAIL PROTECTED]
   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] Effects of locale setting

2008-11-28 Thread Michael
Selon Robert Osfield [EMAIL PROTECTED]:


  I get 2
  glGetString( GL_VERSION ) returns 2.0.6958 Release

 OK, one bit of the jigsaw.  What happens to the
 osg::getGLVersionNumber() value if you can the locale?  For instance
 WxWidgets changes the locale by default I believe.


Hi Robert,

Sorry i didn't reply sooner (i lost internet access after problematic hardware
upgrade). Anyway the OpenGL version string on my machine is now
2.1.7769

In a wxWidgets-based viewer, osg::getGLVersionNumber() returns 2.1 under C,
fr_FR and [EMAIL PROTECTED] locales, but returns 2 when locale is fr_FR.UTF-8 
(without
wxWidgets it's always 2.1).

Michael
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] FBO OpenGL Error with new nVidia Driver

2008-11-28 Thread Kim C Bale
After much installing and uninstalling I've found it's also present in
the Vista 32-Bit GeForce releases 178.13, 178.24, 180.48.

 

175.19 work fine.

 

Should I be concerned about these errors?

 

K.

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kim C
Bale
Sent: 28 November 2008 13:33
To: OpenSceneGraph Users
Subject: [osg-users] FBO OpenGL Error with new nVidia Driver

 

I've just noticed that I've been getting some errors  when I run
osgprerender and also in my own program that uses a lot of pre-render
cameras and FBOs..

 

Firstly I get:

 

Warning: detected OpenGL error 'out of memory' after RenderBin::draw(,)

 

Then the following printed continuously as the program is running:

 

RenderStage::drawInner(,) FBO status= 0x8cd7

Warning: detected OpenGL errorNo= 0x506 after RenderBin::draw(,)

 

I've tracked 0x506 to INVALID_FRAMEBUFFER_OPERATION_EXT which does seem
odd, given that I'm running osgprerender which is a well established
example.
 
I put this down to the new nVidia driver as it seems to have occurred
after that. Just wanted to know if anyone else was experiencing this.
 

I'm running Vista Business 32bit using an nVidia 8800GTS 512mb card,
driver version: 7.15.11.8048

*
To view the terms under which this email is distributed, please go to 
http://www.hull.ac.uk/legal/email_disclaimer.html
*___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Processing model

2008-11-28 Thread Gordon Tomlinson
By default OSG 2.x uses a Draw thread and Cull thread per draw context, so
your already have multi-process unless you set tings to run single thread

 

As you do not define what a large scene, what frame rate you desire,  it’s
hard to say what the issue may be, and we have no idea of you hardware,
memory, graphics, cpu, other things, window size, etc

 

It highly likely you have a very flat scene graph that takes a lot of
culling,  you may simply have too much data for you systems capabilities,
too many textures , you may be expecting too high a frame rate etc.

 

I would suggest a search on the mailing list archives to look at discussion
on how to optimize  databases/models for real-time simulations there have
been a lot of these discussion and search the web for the same

 

Building Databases to run efficiently is a skill that has to be learned, and
has to take in to all the components of your system, Memory, Graphics Card,
Field of View, Near/Far Clip Plans, Screen(s) size(s), target frame rate,
What the card can realistically handle,  once you can quantify these things,
then you have a estimate of the number of polygons you CAN have per frame.
And this will chance for each different database

 

When I taught Vega Prime/Creator classes I had a really nice spread sheet
that you could place all these on other parameters in and it would tell you
want your polygon budget etc was, unfortunately I cannot distribute this..

 

 

 


__





Capture the magic of Christmas this year see
http://www.capturethemagic.com/ http://www.capturethemagic.com

__

Gordon Tomlinson 

 mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
IM:  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
 http://www.vis-sim.com/ www.vis-sim.com
http://www.gordontomlinson.com/ www.gordontomlinson.com 


__

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of forest37
Sent: Friday, November 28, 2008 3:21 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Processing model

 

 hi all,

I find that when I have a large scene to render,the cull and draw time
is so long that the program can't be interactive.I an wondering whether
there is a processing model which processes the cull and draw time
simultaneity.That is to say the first frame's draw() runs in the second
frame .there is a picture Figure 6 - Multithreaded phase model for
multidisplay system with CULL and DRAW as separate threads in the article
A New Processing Model for Multithreaded, Multidisplay Scene Graphs at
http://andesengineering.com/OSG_ProducerArticles/OSGMP/index.html

Is there a thread model in osg can achieve that?

Thanks in advance

best regards 

forest

 

 

  _  

[广告] 重奖  http://popme.163.com/link/004584_1120_7027.html 悬赏kfc3v3 球
衣

attachment: image001.gif
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Render Bin, Transparency, ...

2008-11-28 Thread Vincent Bourdier
Yes, you're right.

In france it was on 11.37am and 2.14pm ...

Hoping someone can help me, I'll go on something else.

Still waiting for you, and sorry for the inconvenience.

Regards,
Vincent.

2008/11/28 Gordon Tomlinson [EMAIL PROTECTED]

  Dude patience patience…



 your original post was 5.37am est. and then you post at 8.14am that your
 upset no one has replied, give things time most people in the US for one are
 not even online yet and it's a holiday for many



 And you have to remember there is NO guarantee any one will answer your
 question…



 See 
 http://www.catb.org/~esr/faqs/smart-questions.htmlhttp://www.catb.org/%7Eesr/faqs/smart-questions.html












 __

  *Capture the magic of Christmas this year see* *
 http://www.capturethemagic.com*

 __

 *Gordon Tomlinson *

 [EMAIL PROTECTED]
 IM: [EMAIL PROTECTED]
 *www.vis-sim.com www.gordontomlinson.com*


 __



 *From:* [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] *On Behalf Of *Vincent
 Bourdier
 *Sent:* Friday, November 28, 2008 8:14 AM
 *To:* osg
 *Subject:* Re: [osg-users] Render Bin, Transparency, ...



 Sorry to insist, but I am surprised to see no answer ?
 Any suggestion or idea will be very appreciated.

 thanks a lot.

 Regards,
Vincent

 2008/11/28 Vincent Bourdier [EMAIL PROTECTED]

 Hi all,

 Looking in the archive I didn't found what I need, so this is the problem:

 I need to manage in the same scene : transparency nodes, skymap(s) (with
 transparency or not), normal (no-transparent) nodes.

 For the moment I apply on my skymaps the following code :

 osg::StateSet* state = myGeode-getOrCreateStateSet();

 //Set sky render after objects, not depending on frustrum
 // Set texture mode to REPLACE
 osg::ref_ptrosg::TexEnv te = new osg::TexEnv;
  te-setMode(osg::TexEnv::REPLACE);
  state-setTextureAttributeAndModes(0, te.get(),
 osg::StateAttribute::ON);

  // Turn off lighting and cull face
  state-setMode(GL_CULL_FACE, osg::StateAttribute::OFF);

  osg::ref_ptrosg::Depth depth = new osg::Depth(osg::Depth::LEQUAL,
 1.0, 1.0);
  state-setAttributeAndModes(depth.get(), osg::StateAttribute::ON);

  // Make pretty darn sure it is drawn first.(-1000) : it ensure that
 sky can be seen throw transparency surfaces
  state-setRenderBinDetails(-1000, RenderBin);

  myGeode-setCullingActive(false);


  But, I have some node with tranparency on the scene, and when I look the
 skymap, I see something not expected (see Attached file)

 Can you remember me what is the good rendering order ? and How to managed
 the skymaps and the transparent nodes 

 Thanks a lot,

 Regards,
Vincent.



 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


image001.gif___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] maxTime( OpenGL, OSG )

2008-11-28 Thread Gordon Tomlinson
Started with  good old IrisGL back in the very early nineties on SGI
hardware, used SGI Performer 1.x and moved up to Opengl as it was rolled out

and used most scene graph technologies thru the years and of course worked
on Vega and Vega Prime when I was at MPI, now working solely

with OpenSceneGraph these days

 


__





Capture the magic of Christmas this year see
http://www.capturethemagic.com/ http://www.capturethemagic.com

__

Gordon Tomlinson 

[EMAIL PROTECTED]
IM: [EMAIL PROTECTED]
www.vis-sim.com http://www.vis-sim.com/  www.gordontomlinson.com
http://www.gordontomlinson.com/  


__

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ümit Uzun
Sent: Friday, November 28, 2008 3:03 AM
To: OpenSceneGraph Users
Subject: [osg-users] maxTime( OpenGL, OSG )

 

Hi OSG Users,

I have been playing OSG for a year. And so far I have started to learn
OpenGL formally. I mean I only stepped to Graphics World based on OpenGL
maxTime( OpenGL, OSG ) ~= 1 year.

So I wonder to know peoples OpenGL story on this site to guess how long do I
need time to learn Graphics Terminology based on OpenGL.

So what is your maxTime() function returned results to your main function ?
:)

Best Regards.

-- 
Ümit Uzun

attachment: image001.gif
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] maxTime( OpenGL, OSG )

2008-11-28 Thread Alejandro Aguilar Sierra
Hello:

I started in late eighties programming directly the VGA (I wrote a
primitive raytracer for the 256 color mode) and phigs (a opengl
predecessor). Then in the 90s I tried a bit OpenGL (I wrote a rubik
cube simulator). Then for many years I was no more than an occasional
3d graphics user (mainly for visualization and gamming, doom and quake
series).

It was until two or three years ago that I restarted to program 3d
graphics, first with Open Inventor, Open GL and now OSG and GLSL.

Regards,

-- A.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgPPU and CUDA ;) !!!

2008-11-28 Thread Art Tevs
Hi folks,

whoever is interested in a combination of CUDA and osgPPU is asked to test 
current svn version under the sandbox branch of osgPPU repository. The 
implementation depends on both patches, I have submitted before. As soon as 
this patches are either commited or rejected I will merge the sandbox with 
current trunk branch.

What is currently new in sandbox branch of osgPPU:
 - UnitInOutModule : loads a module (plugin) which is capable of processing 
input data of the Unit and create output data. In future release this can be 
extended to a plugin based Unit pipeline ;)

 - Unit : do now contain a possibility of using PBOs for GPU only transfers. 
Hence copying input texture to a PBO and back gives you a possibility to use 
the data in the PBO for further processing (think on modules/plugins e.g. CUDA 
plugin)

 - new example cuda: shows how to use a plugin (osgppu_cudakernel.so) to 
process the data. The plugin is a simple CUDA-Kernel which just blurs the 
incoming data

What you need for new CUDA test:
- at least CUDA 2.0 (nVidia drivers 177.80)
- CUDA capable hardware (at least GeForce 8x)
- both previous patches submitted to osg-submission before
  

Best regards and have fun ;) !!!

Art



  
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] FBO OpenGL Error with new nVidia Driver

2008-11-28 Thread Wojciech Lewandowski
Hi Kim,

Im curious which OSG version you use ? Could this be that you have dual view 
setup ? Maybe you have the same error Marco Jez reported recently. You may try 
to change OSG_MULTIMONITOR_MULTITHREAD_WIN32_NVIDIA_WORKAROUND and see if it 
helps.

Cheers,
Wojtek

  - Original Message - 
  From: Kim C Bale 
  To: OpenSceneGraph Users 
  Sent: Friday, November 28, 2008 3:42 PM
  Subject: Re: [osg-users] FBO OpenGL Error with new nVidia Driver


  After much installing and uninstalling I've found it's also present in the 
Vista 32-Bit GeForce releases 178.13, 178.24, 180.48.

   

  175.19 work fine.

   

  Should I be concerned about these errors?

   

  K.

   

  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kim C Bale
  Sent: 28 November 2008 13:33
  To: OpenSceneGraph Users
  Subject: [osg-users] FBO OpenGL Error with new nVidia Driver

   

  I've just noticed that I've been getting some errors  when I run osgprerender 
and also in my own program that uses a lot of pre-render cameras and FBOs..

   

  Firstly I get:

   

  Warning: detected OpenGL error 'out of memory' after RenderBin::draw(,)

   

  Then the following printed continuously as the program is running:

   

  RenderStage::drawInner(,) FBO status= 0x8cd7

  Warning: detected OpenGL errorNo= 0x506 after RenderBin::draw(,)

   

I've tracked 0x506 to INVALID_FRAMEBUFFER_OPERATION_EXT which does seem odd, 
given that I'm running osgprerender which is a well established example. I put 
this down to the new nVidia driver as it seems to have occurred after that. 
Just wanted to know if anyone else was experiencing this. I'm running Vista 
Business 32bit using an nVidia 8800GTS 512mb card, driver version: 7.15.11.8048



--


  
*
  To view the terms under which this email is distributed, please go to 
http://www.hull.ac.uk/legal/email_disclaimer.html
  
*


--


  ___
  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] maxTime( OpenGL, OSG )

2008-11-28 Thread Raymond de Vries

Hi Umit,

Take your time to get addicted to graphics :-) Me too, I have started in 
1992 or so with OpenGL on the oh so nice Silicon Graphics Indigo 
(http://www.sgizone.net/indigo/) with which they worked when they were 
creating Jurassic Park... Some years later I worked with CAVEs with 
Performer and OpenGL. Currently, I am also still using OpenGL and 
OpenSceneGraph.


I realized that it is very useful to understand the issues of 
videocards, and how they perform and thus influence performance. Also, I 
think it is always good to know pure OpenGL to work with OpenSceneGraph.


Have fun!

Regards
Raymond


Gordon Tomlinson wrote:


Started with  good old IrisGL back in the very early nineties on SGI 
hardware, used SGI Performer 1.x and moved up to Opengl as it was 
rolled out


and used most scene graph technologies thru the years and of course 
worked on Vega and Vega Prime when I was at MPI, now working solely


with OpenSceneGraph these days

 


__

*/Capture the magic of Christmas this year see/* 
*http://www.capturethemagic.com http://www.capturethemagic.com/*

__

/Gordon Tomlinson /

/[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]/
IM: /[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]/
/www.vis-sim.com http://www.vis-sim.com/ www.gordontomlinson.com 
http://www.gordontomlinson.com//


__

 

*From:* [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] *On Behalf Of 
*Ümit Uzun

*Sent:* Friday, November 28, 2008 3:03 AM
*To:* OpenSceneGraph Users
*Subject:* [osg-users] maxTime( OpenGL, OSG )

 


Hi OSG Users,

I have been playing OSG for a year. And so far I have started to learn 
OpenGL formally. I mean I only stepped to Graphics World based on 
OpenGL maxTime( OpenGL, OSG ) ~= 1 year.


So I wonder to know peoples OpenGL story on this site to guess how 
long do I need time to learn Graphics Terminology based on OpenGL.


So what is your maxTime() function returned results to your main 
function ? :)


Best Regards.

--
Ümit Uzun



___
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] maxTime( OpenGL, OSG )

2008-11-28 Thread Gordon Tomlinson
My GL days started in the 90's

My graphics started much earlier when I started working with such treasures
as Z80,Z81, Commodore 64/Vic20, Amstrad, 
BBC computer,Acorn, TI 99/4a etc Working on games for all of these flavours,
and those were the simple days of graphics :)

Eventually getting to play with $16m SGI super-rack systems :), it was great
I got paid to play with large SGI iron :)
Now my $400 card has more general graphics power than those $16m beasts,
apart from being able to handle and push data 
around it will be good when PC get the same speed and bandwidth that SGI's
could and still can push around


__


Capture the magic of Christmas this year see http://www.capturethemagic.com

__
Gordon Tomlinson 

[EMAIL PROTECTED]
IM: [EMAIL PROTECTED]
www.vis-sim.com www.gordontomlinson.com 

__

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Raymond de
Vries
Sent: Friday, November 28, 2008 10:05 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] maxTime( OpenGL, OSG )

Hi Umit,

Take your time to get addicted to graphics :-) Me too, I have started in 
1992 or so with OpenGL on the oh so nice Silicon Graphics Indigo 
(http://www.sgizone.net/indigo/) with which they worked when they were 
creating Jurassic Park... Some years later I worked with CAVEs with 
Performer and OpenGL. Currently, I am also still using OpenGL and 
OpenSceneGraph.

I realized that it is very useful to understand the issues of 
videocards, and how they perform and thus influence performance. Also, I 
think it is always good to know pure OpenGL to work with OpenSceneGraph.

Have fun!

Regards
Raymond


Gordon Tomlinson wrote:

 Started with  good old IrisGL back in the very early nineties on SGI 
 hardware, used SGI Performer 1.x and moved up to Opengl as it was 
 rolled out

 and used most scene graph technologies thru the years and of course 
 worked on Vega and Vega Prime when I was at MPI, now working solely

 with OpenSceneGraph these days

  



__

 */Capture the magic of Christmas this year see/* 
 *http://www.capturethemagic.com http://www.capturethemagic.com/*


__

 /Gordon Tomlinson /

 /[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]/
 IM: /[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]/
 /www.vis-sim.com http://www.vis-sim.com/ www.gordontomlinson.com 
 http://www.gordontomlinson.com//



__

  

 *From:* [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] *On Behalf Of 
 *Ümit Uzun
 *Sent:* Friday, November 28, 2008 3:03 AM
 *To:* OpenSceneGraph Users
 *Subject:* [osg-users] maxTime( OpenGL, OSG )

  

 Hi OSG Users,

 I have been playing OSG for a year. And so far I have started to learn 
 OpenGL formally. I mean I only stepped to Graphics World based on 
 OpenGL maxTime( OpenGL, OSG ) ~= 1 year.

 So I wonder to know peoples OpenGL story on this site to guess how 
 long do I need time to learn Graphics Terminology based on OpenGL.

 So what is your maxTime() function returned results to your main 
 function ? :)

 Best Regards.

 -- 
 Ümit Uzun

 

 ___
 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

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] View::computeIntersections with a node path

2008-11-28 Thread Tanguy Fautre
Hi,

Has anyone been able to successfully use
osgViewer::View::computeIntersections() taking a node path argument on a
non-trivial scenegraph?

I currently have a fairly complex scenegraph, but I only want a small
part of it to collide with computeIntersections. When I use
computeIntersections without the nodepath, everything works perfectly.
But as soon as I use the overload with the node path, I get an empty
intersection set. I'm pretty sure the node path I'm giving is correct.

Looking at the implementation of computeIntersections() with the node
path, the only thing that puzzles me is the use of
osg::computeWorldToLocal(nodePath) before computing the matrix inverse,
I'm not sure I fully understand why this is the case. It seems to me the
whole operation should be LocalToWorldMatrix * ViewMatrix *
ProjectionMatrix instead.

In any case, if anyone has a working example (which would show
computeIntersections() with a node path is working correctly, or help
finding the mistake I'm doing), it would be appreciated.


Regards,

Tanguy
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] maxTime( OpenGL, OSG )

2008-11-28 Thread Ümit Uzun
Hi GL Gurus,

That's all amazing stories :) When I learned about your histories and
experiences with GL I feel myself already born infant :) I will give my as
possible as much time to growing up myself, I hope I can get successful!

Thank you so much masters for share your experiences with us.
Best Regards.

2008/11/28 Gordon Tomlinson [EMAIL PROTECTED]

 My GL days started in the 90's

 My graphics started much earlier when I started working with such treasures
 as Z80,Z81, Commodore 64/Vic20, Amstrad,
 BBC computer,Acorn, TI 99/4a etc Working on games for all of these
 flavours,
 and those were the simple days of graphics :)

 Eventually getting to play with $16m SGI super-rack systems :), it was
 great
 I got paid to play with large SGI iron :)
 Now my $400 card has more general graphics power than those $16m beasts,
 apart from being able to handle and push data
 around it will be good when PC get the same speed and bandwidth that SGI's
 could and still can push around


 
 __


 Capture the magic of Christmas this year see
 http://www.capturethemagic.com

 
 __
 Gordon Tomlinson

 [EMAIL PROTECTED]
 IM: [EMAIL PROTECTED]
 www.vis-sim.com www.gordontomlinson.com

 
 __

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Raymond
 de
 Vries
 Sent: Friday, November 28, 2008 10:05 AM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] maxTime( OpenGL, OSG )

 Hi Umit,

 Take your time to get addicted to graphics :-) Me too, I have started in
 1992 or so with OpenGL on the oh so nice Silicon Graphics Indigo
 (http://www.sgizone.net/indigo/) with which they worked when they were
 creating Jurassic Park... Some years later I worked with CAVEs with
 Performer and OpenGL. Currently, I am also still using OpenGL and
 OpenSceneGraph.

 I realized that it is very useful to understand the issues of
 videocards, and how they perform and thus influence performance. Also, I
 think it is always good to know pure OpenGL to work with OpenSceneGraph.

 Have fun!

 Regards
 Raymond


 Gordon Tomlinson wrote:
 
  Started with  good old IrisGL back in the very early nineties on SGI
  hardware, used SGI Performer 1.x and moved up to Opengl as it was
  rolled out
 
  and used most scene graph technologies thru the years and of course
  worked on Vega and Vega Prime when I was at MPI, now working solely
 
  with OpenSceneGraph these days
 
 
 
 

 
 __
 
  */Capture the magic of Christmas this year see/*
  *http://www.capturethemagic.com http://www.capturethemagic.com/*
 

 
 __
 
  /Gordon Tomlinson /
 
  /[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]/
  IM: /[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 /
  /www.vis-sim.com http://www.vis-sim.com/ www.gordontomlinson.com
  http://www.gordontomlinson.com//
 
 

 
 __
 
 
 
  *From:* [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] *On Behalf Of
  *Ümit Uzun
  *Sent:* Friday, November 28, 2008 3:03 AM
  *To:* OpenSceneGraph Users
  *Subject:* [osg-users] maxTime( OpenGL, OSG )
 
 
 
  Hi OSG Users,
 
  I have been playing OSG for a year. And so far I have started to learn
  OpenGL formally. I mean I only stepped to Graphics World based on
  OpenGL maxTime( OpenGL, OSG ) ~= 1 year.
 
  So I wonder to know peoples OpenGL story on this site to guess how
  long do I need time to learn Graphics Terminology based on OpenGL.
 
  So what is your maxTime() function returned results to your main
  function ? :)
 
  Best Regards.
 
  --
  Ümit Uzun
 
  
 
  ___
  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

 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-- 
Ümit Uzun
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Videos of DBGS Trian3D

2008-11-28 Thread Jean-Sébastien Guay

Hello Stephan,

I see your point. In general this quad should not be seen at all, as it 
is only displayed when the last LOD is switched out. Normally there 
should not be anything, but we needed a dummy object so that the pager 
would start his work. We don't want to put the low-res LOD in the master 
(as I think it is done in VPB), as our terrains might be very large. 
There might be a better way to do this- any advice is appreciated.


No, VPB does not do this. All files are referred to by PagedLOD nodes. 
So even the first level is an external file, and the master is just a 
file that refers to the first level files. Then the first level files 
refer to the second level files, etc.


J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   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] FBO OpenGL Error with new nVidia Driver

2008-11-28 Thread Kim C Bale
Sorry yes, I'm using OSG 2.6, strangely enough it may well be linked to the 
dual monitor set up as you suggest.
 
I've just tested this at home on an identical machine but without the extra 
monitor using driver 178.13 and i don't get the error. 
 
I'll try what you suggest on monday, and post the results.
 
Cheers.
 
Kim.



From: [EMAIL PROTECTED] on behalf of Wojciech Lewandowski
Sent: Fri 28/11/2008 14:59
To: OpenSceneGraph Users
Subject: Re: [osg-users] FBO OpenGL Error with new nVidia Driver


Hi Kim,
 
Im curious which OSG version you use ? Could this be that you have dual view 
setup ? Maybe you have the same error Marco Jez reported recently. You may try 
to change OSG_MULTIMONITOR_MULTITHREAD_WIN32_NVIDIA_WORKAROUND and see if it 
helps.
 
Cheers,
Wojtek
 

- Original Message - 
From: Kim C Bale mailto:[EMAIL PROTECTED]  
To: OpenSceneGraph Users mailto:osg-users@lists.openscenegraph.org  
Sent: Friday, November 28, 2008 3:42 PM
Subject: Re: [osg-users] FBO OpenGL Error with new nVidia Driver


After much installing and uninstalling I've found it's also present in 
the Vista 32-Bit GeForce releases 178.13, 178.24, 180.48.

 

175.19 work fine.

 

Should I be concerned about these errors?

 

K.

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kim C 
Bale
Sent: 28 November 2008 13:33
To: OpenSceneGraph Users
Subject: [osg-users] FBO OpenGL Error with new nVidia Driver

 

I've just noticed that I've been getting some errors  when I run 
osgprerender and also in my own program that uses a lot of pre-render cameras 
and FBOs..

 

Firstly I get:

 

Warning: detected OpenGL error 'out of memory' after RenderBin::draw(,)

 

Then the following printed continuously as the program is running:

 

RenderStage::drawInner(,) FBO status= 0x8cd7

Warning: detected OpenGL errorNo= 0x506 after RenderBin::draw(,)

 

I've tracked 0x506 to INVALID_FRAMEBUFFER_OPERATION_EXT which does seem 
odd, given that I'm running osgprerender which is a well established example.
 
I put this down to the new nVidia driver as it seems to have occurred 
after that. Just wanted to know if anyone else was experiencing this.
 

I'm running Vista Business 32bit using an nVidia 8800GTS 512mb card, 
driver version: 7.15.11.8048








*
To view the terms under which this email is distributed, please go to 
http://www.hull.ac.uk/legal/email_disclaimer.html

*
 







___
osg-users mailing list
osg-users@lists.openscenegraph.org

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


winmail.dat*
To view the terms under which this email is distributed, please go to 
http://www.hull.ac.uk/legal/email_disclaimer.html
*___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please test SVN of OpenSceneGraph in pre for 2.7.6 dev release

2008-11-28 Thread Robert Osfield
Hi All,

I've merged Jeremy's and Cedric's updates of osgWidget and
osgAnimation into svn/trunk.  This does mean we'll need another round
of testing before I can tag 2.7.6.  Assistance on this much
appreciated ;-)

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Outline technique that doesn't triple (or worse) my frame time?

2008-11-28 Thread Jean-Sébastien Guay

Hello Morné,


Just as another datapoint, I also implemented outlining in a similar
way to osgFX::Effect.  All times stay the
same except draw which triples.  In my application, this doesn't
affect me too much and I still make 60 fps if an object is selected or
not, so I don't mind the jump that much, but I can see it being a
problem if you have a very flexible scene/selection strategy...


Yes, well, for now I've decided to just live with it, though I've been 
able to lower the times a bit by fixing a very stooopid bug!


When adding the effect, we were not removing the child from its original 
parent. So if the graph looked like this before:


parent
  |
  |
child

After adding the effect it looked like this:

parent
  |   \
  |  effect
  |   /
child

Since the effect actually renders the child twice, because of not 
removing the child from its original parent, it was being rendered a 
total of 3 times, which explains the tripling of timings!


I've fixed this, so now after adding the effect the only parent of the 
child node is the effect, and when removing the effect I re-add the 
child to the parent. The times are closer to double now (though still 
slightly higher than double - 0.4 becomes 0.9 - which I can't explain, 
since the outline pass disables most things, so it should theoretically 
be faster than the original render I would think)


I just want to say in my defense that that code wasn't written by me! 
(though I've made that mistake in the past too)


J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   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] Determine texture memory allocation size

2008-11-28 Thread Jean-Sébastien Guay

Hi Art,

As far as I was bale to find additional info there is no such method in GL specifications ;( Hence my solution is just to compute the size based on internal format and resolution, using the implementation from osg::Image. For my purpose this seems to be enough. 


It was not clear to me that you didn't want to load the texture... In 
that case, then yes, that's probably the best you can do.


Although, if you just want to know how much space that texture will take 
to know in advance whether you should load it or not, then you can 
always do a pre-process where you have a program that loads the 
textures, checks the counters to see the real texture memory usage, and 
writes that to a file. Then in your main program check the size from the 
file before loading.


J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   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: Partial terrain with vpbmaster, why?

2008-11-28 Thread Alejandro Aguilar Sierra
Hi,

Building the same terrain, osgdem creates it complete but vpbmaster
does just the first left chunk. Why? Am I missing some parameter?

I used these commands, respectively:

osgdem -d fv.tif -t fv_tx.tif -l 5 -v 20 -o fv.ive
Elapsed time = 70.969066

vpbmaster -d fv.tif --layer 0 -t fv_tx.tif --layer 1 -t fv_gmt.tif
--terrain -o fv2.ive
Total elapsed time = 1.818129

All images are geotiff created with gdal from DEM data (etopo1) and
height/palette tables.

Thanks in advance and regards.

-- A.
attachment: with_osgdem.jpgattachment: with_vpbmaster.jpg___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Performance query : Drawing lots of instances of a vertex array

2008-11-28 Thread David Spilling
Dear All,

I have a geometry with a simple heightfield type vertex array; I'm also
using VBO. I want to repeat that VBO in quite a lot of places.

The heighfield can be considered as a terrain tile (e.g. 100m x 100m) ,
with which I want to tile a much larger area (e.g. 1km x 1km).

The method I have so far implemented is to have the following scenegraph:

 Group
 /   |  \
/|\
G1G2G3
\   | /
 \  |   /
   Tile with VBO and vertex shader

where G1..Gn are simple groups which set a tile_offset uniform. The vertex
shader on the tile uses the tile_offset to modify the vertexes for each
tile. This all works OK.

However, I am concerned that this is not the best route for high performance
when the tile count is quite high. e.g. is it better for G1...Gn to be
matrix transforms (presumably not, although an easy thing for me to test).
Is this a good example for the geometry instancing extensions?

So, does anybody have any good advice for doing this kind of thing in a
better way within OSG? Pointers or examples (or even hints) would be
appreciated...

Thanks in advance,

David
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please test SVN of OpenSceneGraph in pre for 2.7.6 dev release

2008-11-28 Thread Alberto Luaces
Robert,

El Viernes 28 Noviembre 2008ES 16:53:42 Robert Osfield escribió:
 Hi All,

 I've merged Jeremy's and Cedric's updates of osgWidget and
 osgAnimation into svn/trunk.  This does mean we'll need another round
 of testing before I can tag 2.7.6.  Assistance on this much
 appreciated ;-)

The osgAnimation update reverted the fix we had set on the SVN about the 
cmath inclusion on include/osgAnimation/Timeline:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg02481.html

Alberto
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please test SVN of OpenSceneGraph in pre for 2.7.6 dev release

2008-11-28 Thread Ümit Uzun
Hi Robert,

I have tried and it is Ok on XP SP2 VisualStudio2003 Cmake2.6

Only there is a warning in osganimationskinning.exe;
An update callback has no name, it means it can link only with  named
Target,
often an error

Best Regards.

2008/11/28 Alberto Luaces [EMAIL PROTECTED]

 Robert,

 El Viernes 28 Noviembre 2008ES 16:53:42 Robert Osfield escribió:
  Hi All,
 
  I've merged Jeremy's and Cedric's updates of osgWidget and
  osgAnimation into svn/trunk.  This does mean we'll need another round
  of testing before I can tag 2.7.6.  Assistance on this much
  appreciated ;-)

 The osgAnimation update reverted the fix we had set on the SVN about the
 cmath inclusion on include/osgAnimation/Timeline:


 http://www.mail-archive.com/[EMAIL PROTECTED]/msg02481.html

 Alberto
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-- 
Ümit Uzun
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Performance query : Drawing lots of instances of avertex array

2008-11-28 Thread Paul Martz
I'm working on a similar problem: rendering a large vector field as several
arrows, all with different positions and orientations. If I multiparent the
Geometry to several PAT nodes, the cull time cost is quite high.
 
I'm looking at adding support for ARB_draw_instanced to reduce both the cull
and draw time. Right now, I'm attacking it as a new PrimitiveSet,
DrawArraysInstanced, which works essentially like the DrawArrays
PrimitiveSet but emits a glDrawArraysInstancedARB() command to effect the
rendering. Making some progress, but it's not there yet (and I'll also have
to add support for glDrawElementsInstancedARB). I expect I'll contribute
this back to OSG if I get it running.
 
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com http://www.skew-matrix.com/ 
+1 303 859 9466



  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David
Spilling
Sent: Friday, November 28, 2008 9:22 AM
To: OpenSceneGraph Users
Subject: [osg-users] Performance query : Drawing lots of instances of
avertex array


Dear All,
 
I have a geometry with a simple heightfield type vertex array; I'm also
using VBO. I want to repeat that VBO in quite a lot of places.
 
The heighfield can be considered as a terrain tile (e.g. 100m x 100m) ,
with which I want to tile a much larger area (e.g. 1km x 1km).
 
The method I have so far implemented is to have the following scenegraph:
 
 Group
 /   |  \
/|\
G1G2G3
\   | /
 \  |   /
   Tile with VBO and vertex shader
 
where G1..Gn are simple groups which set a tile_offset uniform. The vertex
shader on the tile uses the tile_offset to modify the vertexes for each
tile. This all works OK.
 
However, I am concerned that this is not the best route for high performance
when the tile count is quite high. e.g. is it better for G1...Gn to be
matrix transforms (presumably not, although an easy thing for me to test).
Is this a good example for the geometry instancing extensions?
 
So, does anybody have any good advice for doing this kind of thing in a
better way within OSG? Pointers or examples (or even hints) would be
appreciated...
 
Thanks in advance,

David

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] VPB: Partial terrain with vpbmaster, why?

2008-11-28 Thread Robert Osfield
Hi Alehandro,

I can't see how I or others can really answer your question.  The best
I can do is point out that your command lines are different, so...
this might have an effect.  Try using the same command lines.

Robert.

On Fri, Nov 28, 2008 at 4:17 PM, Alejandro Aguilar Sierra
[EMAIL PROTECTED] wrote:
 Hi,

 Building the same terrain, osgdem creates it complete but vpbmaster
 does just the first left chunk. Why? Am I missing some parameter?

 I used these commands, respectively:

 osgdem -d fv.tif -t fv_tx.tif -l 5 -v 20 -o fv.ive
 Elapsed time = 70.969066

 vpbmaster -d fv.tif --layer 0 -t fv_tx.tif --layer 1 -t fv_gmt.tif
 --terrain -o fv2.ive
 Total elapsed time = 1.818129

 All images are geotiff created with gdal from DEM data (etopo1) and
 height/palette tables.

 Thanks in advance and regards.

 -- A.

 ___
 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] Please test SVN of OpenSceneGraph in pre for 2.7.6 dev release

2008-11-28 Thread Robert Osfield
HI Alberto,

Fix now re-instanted and checked in.

Robert.

On Fri, Nov 28, 2008 at 4:32 PM, Alberto Luaces [EMAIL PROTECTED] wrote:
 Robert,

 El Viernes 28 Noviembre 2008ES 16:53:42 Robert Osfield escribió:
 Hi All,

 I've merged Jeremy's and Cedric's updates of osgWidget and
 osgAnimation into svn/trunk.  This does mean we'll need another round
 of testing before I can tag 2.7.6.  Assistance on this much
 appreciated ;-)

 The osgAnimation update reverted the fix we had set on the SVN about the
 cmath inclusion on include/osgAnimation/Timeline:

 http://www.mail-archive.com/[EMAIL PROTECTED]/msg02481.html

 Alberto
 ___
 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] Please test SVN of OpenSceneGraph in pre for 2.7.6 dev release

2008-11-28 Thread Alberto Luaces
Hi Robert,

thank you, Cygwin compiles SVN ok again :)

Alberto

El Viernes 28 Noviembre 2008ES 18:14:20 Robert Osfield escribió:
 HI Alberto,

 Fix now re-instanted and checked in.

 Robert.

 On Fri, Nov 28, 2008 at 4:32 PM, Alberto Luaces [EMAIL PROTECTED] wrote:
  Robert,
 
  El Viernes 28 Noviembre 2008ES 16:53:42 Robert Osfield escribió:
  Hi All,
 
  I've merged Jeremy's and Cedric's updates of osgWidget and
  osgAnimation into svn/trunk.  This does mean we'll need another round
  of testing before I can tag 2.7.6.  Assistance on this much
  appreciated ;-)
 
  The osgAnimation update reverted the fix we had set on the SVN about the
  cmath inclusion on include/osgAnimation/Timeline:
 
  http://www.mail-archive.com/[EMAIL PROTECTED]/msg0
 2481.html
 
  Alberto
  ___
  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


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Performance query : Drawing lots of instances of avertex array

2008-11-28 Thread David Spilling
Paul,

If this was raw OpenGL, I'd be tempted to set up my heightfield as a display
list, and then change the modelview matrix for each call to the display
list. I'm not quite sure how to force similar behaviour in OSG other than to
set up the scenegraph with multiple PATs.

I'm working on a similar problem: rendering a large vector field as several
 arrows, all with different positions and orientations. If I multiparent
 the Geometry to several PAT nodes, the cull time cost is quite high.


I have the notion that cull times can be improved by not letting the cull
traverse go across the PATs. The parent of the PATs probably knows something
that could limit the set of PATs that actually needs to be traversed in the
draw. In my application that's certainly true - the top Group gets the
view/projection matrices, and since each tile is the same size, can decide
which of it's children really need drawing without having to check the
bounding spheres of its many PAT children.

Unfortunately, my heightfield does sometimes change and so I haven't really
pursued the tradeoff between the cost of display list compiles and other
techniques.

I'm looking at adding support for ARB_draw_instanced to reduce both the cull
 and draw time


If you get anything working, I'd be delighted to test it in my context, time
permitting (by then I will have probably got the codepaths for the various
other techniques going).

David
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please test SVN of OpenSceneGraph in pre for 2.7.6 dev release

2008-11-28 Thread Jean-Sébastien Guay

Hi Robert,


I've merged Jeremy's and Cedric's updates of osgWidget and
osgAnimation into svn/trunk.  This does mean we'll need another round
of testing before I can tag 2.7.6.  Assistance on this much
appreciated ;-)


Builds fine on Windows Vista, VC++ 2005, CMake 2.6.1.

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   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] Calculating the volume of a model through OSG

2008-11-28 Thread Dusten Sobotta
These algorithms have been very helpful; thanks everyone :)

-Dusten

2008/11/27 Middleton, Colin (GE EntSol, Intelligent Platforms) 
[EMAIL PROTECTED]



 Another simple way of calculating the volume of a arbitary closed 3d mesh
 is

 Choose an arbitary point ( let's call it o )
 For each triangle with vertices ( a,b,c )
 Calculate the volume of the tetrahedron ( a,b,c,o ) using a scalar triple
 product ( ((b-a)x(c-a)).(o-a)/3 ).
 Add the volumes of all of the tetrahedrons together, some of these volume
 will be negative and some will be positive, depending on whether the
 triangle is facing the arbitary point or not. These negative volumes cancel
 out the positive ones, leaving only the enclosed area.

 This relies on the 2 assumptions:-
 1) All of the triangles in the 3d object have the same winding order,
 otherwise the volumes' sign cannot be trusted.
 2) The object has no holes.

 If the object has holes then the placing of the arbitary point will affect
 the volume of the object, a triangular hole will mean that the volume of a
 tetrahedron between the hole and the arbitary point will be missed in the
 calcalation. As a result of this placing it in the centroid of the 3d object
 is probably the best plan.

 I hope this helps.

 Colin.

  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf
  Of Alberto Luaces
  Sent: 27 November 2008 08:42
  To: OpenSceneGraph Users
  Subject: Re: [osg-users] Calculating the volume of a model through OSG
 
  Hi,
 
  in addition to Janusz pointers, if you need also the rest of
  the mass properties, you could take a look at this famous paper:
 
  http://www.cs.berkeley.edu/~jfc/mirtich/massProps.html
 
  Alberto
 
  El Jueves 27 Noviembre 2008ES 09:09:34 [EMAIL PROTECTED] escribió:
   Dusten:
  
   You might find these two helpful:
  
   accurate: http://tetgen.berlios.de/
   approximate  simple:
   http://www.gamedev.net/reference/articles/article2247.asp
  
   The second one could be easily added to osg I guess.
   Janusz
  
   Dnia Wed, 26 Nov 2008 23:47:57 -0600, Dusten Sobotta napisał(a):
Hello,
   
Manually modifying various attributes of models is quite tedious,
and tends to set back the development of games.  To work
  around this
issue, I'd like to implement a feature to calculate the
  volume of an
in-game model, so that given a surface attribute such as
  'wood' or
'metal', (which have pre-defined density values), the mass of an
object can be computed and later exported. Might anyone have an
example for finding the approximate volume of an object
  through OSG?
   
   
Thanks in advance,
   
Dusten
___
osg-users mailing list
osg-users@lists.openscenegraph.org
   
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegrap
h.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-opensce
  negraph.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


[osg-users] Performing parent/child occlusion culling

2008-11-28 Thread Dusten Sobotta
Hello,

How might I enable parent/child culling, such that the world geometry of a
primary (parent) object determines which small objects (children) are culled
out of the scene?  For example, there may be hundereds or thousands of
small  objects in my scene, that wouldn't occlude much of anything.  Only
the world geometry with large, static walls should be used during the
culling process to reduce computation time.  From what I understand about
OSG's implementation of occlusion culling however, this can't be
accomplished with a single, large model used for the static world
geometry--as the camera is always within the bounding box.

Might anyone have some recommendations?


Thanks in advance,

Dusten
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Performing parent/child occlusion culling

2008-11-28 Thread Jean-Sébastien Guay

Hello Dusten,

From what I 
understand about OSG's implementation of occlusion culling however, this 
can't be accomplished with a single, large model used for the static 
world geometry--as the camera is always within the bounding box.


OSG's culling is hierarchical, so if you organize your scene correctly 
this will be done automatically. A very flat graph of large numbers of 
objects is really bad, but a really deep graph is bad too, so you need 
to experiment.


Say you're making a building, you could build a room, then parent all 
rooms to form a floor, then parent all floors to form the building, then 
add the outside walls.


When the viewer is in a room, for example, OSG will start at the top of 
the graph, see that the bounds of the building as a whole are in view, 
descend into the floors, cull away any floors whose bounds are not in 
view, descend into the others, cull away any rooms whose bounds are not 
in view, and render just the rooms whose bounds are in view (which 
should hopefully be just the room you're in). It will also cull away 
things that are behind the viewer or outside their field of view, so 
walls and furniture behind you will be culled away.


Including your small objects into that hierarchy so that they're 
parented to the right parent will lower draw times too. However, if you 
have a very large number of small objects, you will want to cluster them 
below a common Group parent, so that if the whole group's bounds are not 
visible then it will be culled in one shot instead of testing each small 
object's bounds individually. A symptom that indicates you should do 
that is if your cull times are very high but your draw times are normal. 
How many small objects to cluster together is a balancing act that you 
should experiment with, as performance will depend on your hardware and 
the current bottleneck in your pipeline.


There has been lots said in the past about how to properly balance a 
scene graph, have a look through the archives. In general, it's called 
conditioning a scene graph, and a scene graph that is badly balanced 
is also called badly conditioned, so you might want to search on those 
terms.


Hope this helps,

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   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] TexEnv and BLEND

2008-11-28 Thread Martin Großer
Hello,

I used an object of osg::TexEnv and the mode Blend. But I don't know how
the texture color and the object color are combined?

Mode: add - object color + texture color
decal - object color - texture color
modulate - object color * texture color
blend - object color ??? texture color

Can everybody explain the mode Blend??

Cheers,

Martin

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Performing parent/child occlusion culling

2008-11-28 Thread Dusten Sobotta
Hello,

I understand how this can be accomplished if a user is given a lot of
control over the scene graph during map/level creation, but what I'm aiming
for is the ability to load in a .3ds model (or otherwise) for level geometry
and let the user place various prefabs such as crates, trees, cars, etc into
the world; then, the composite level is exported to a .lua script so that it
can be loaded again with all of the static and dynamic objects intact.  The
issue is of course, that I cannot possibly compete with blender or 3dsMax as
a modeling program, and I shouldn't attempt to either.  The users of this
engine should be able to use existing, non-proprietary modeling software to
create levels or items for their game.  I believe it would be too complex to
implement an automatic or user-friendly way to disassemble an existing set
of level geometry, only to re-assemble with parenting.

A certain degree of the parent/child culling you mentioned is already
implemented.  For example, multiple 'levels' can be laid out on a grid for
on-the-fly level streaming--each level being a parent to the static and
dynamic objects contained within them.  But it would be -very- tedious for a
level designer to heavily subdivide his or her model for culling purposes.
Is there some way to use a 'precise' bounding box on a single node,
that takes the level geometry's lowest LOD for occlusion culling
operations?  At least this would allow detail objects to be culled away if
the camera was 'in' the level, as it usually is.


Thanks for your time,

Dusten

On Fri, Nov 28, 2008 at 3:33 PM, Jean-Sébastien Guay 
[EMAIL PROTECTED] wrote:

 Hello Dusten,

 From what I understand about OSG's implementation of occlusion culling
 however, this can't be accomplished with a single, large model used for the
 static world geometry--as the camera is always within the bounding box.


 OSG's culling is hierarchical, so if you organize your scene correctly this
 will be done automatically. A very flat graph of large numbers of objects is
 really bad, but a really deep graph is bad too, so you need to experiment.

 Say you're making a building, you could build a room, then parent all rooms
 to form a floor, then parent all floors to form the building, then add the
 outside walls.

 When the viewer is in a room, for example, OSG will start at the top of the
 graph, see that the bounds of the building as a whole are in view, descend
 into the floors, cull away any floors whose bounds are not in view, descend
 into the others, cull away any rooms whose bounds are not in view, and
 render just the rooms whose bounds are in view (which should hopefully be
 just the room you're in). It will also cull away things that are behind the
 viewer or outside their field of view, so walls and furniture behind you
 will be culled away.

 Including your small objects into that hierarchy so that they're parented
 to the right parent will lower draw times too. However, if you have a very
 large number of small objects, you will want to cluster them below a common
 Group parent, so that if the whole group's bounds are not visible then it
 will be culled in one shot instead of testing each small object's bounds
 individually. A symptom that indicates you should do that is if your cull
 times are very high but your draw times are normal. How many small objects
 to cluster together is a balancing act that you should experiment with, as
 performance will depend on your hardware and the current bottleneck in your
 pipeline.

 There has been lots said in the past about how to properly balance a scene
 graph, have a look through the archives. In general, it's called
 conditioning a scene graph, and a scene graph that is badly balanced is
 also called badly conditioned, so you might want to search on those terms.

 Hope this helps,

 J-S
 --
 __
 Jean-Sebastien Guay[EMAIL PROTECTED]
   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] Please test SVN of OpenSceneGraph in pre for 2.7.6 dev release

2008-11-28 Thread Cedric Pinson

Hi,
It's not a bug, it's an example i will need to update. For this example 
it's not a problem but if you have it in a program it could.

I will fix it to avoid this message.

Cheers,
Cedric

Ümit Uzun wrote:

Hi Robert,

I have tried and it is Ok on XP SP2 VisualStudio2003 Cmake2.6

Only there is a warning in osganimationskinning.exe;
An update callback has no name, it means it can link only with  
named Target,

often an error

Best Regards.

2008/11/28 Alberto Luaces [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]

Robert,

El Viernes 28 Noviembre 2008ES 16:53:42 Robert Osfield escribió:
 Hi All,

 I've merged Jeremy's and Cedric's updates of osgWidget and
 osgAnimation into svn/trunk.  This does mean we'll need another
round
 of testing before I can tag 2.7.6. http://2.7.6.  Assistance
on this much
 appreciated ;-)

The osgAnimation update reverted the fix we had set on the SVN
about the
cmath inclusion on include/osgAnimation/Timeline:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg02481.html

Alberto
___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto:osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




--
Ümit Uzun


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  


--
+33 (0) 6 63 20 03 56  Cedric Pinson mailto:[EMAIL PROTECTED] 
http://www.plopbyte.net


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] TexEnv and BLEND

2008-11-28 Thread Ulrich Hertlein

Hi Martin,

On 29/11/08 8:46 AM, Martin Großer wrote:

I used an object of osg::TexEnv and the mode Blend. But I don't know how
the texture color and the object color are combined?

Mode: add -  object color + texture color
decal -  object color - texture color


That would be subtract; decal modulates color according to texture alpha.


modulate -  object color * texture color
blend -  object color ??? texture color

Can everybody explain the mode Blend??


The long version (and authoritative) is the Red Book (or man glTexEnv).

The short version (for a RGBA texture) is:
 C = Cfrag * (1-Ctex) + Cconst * Ctex
 A = Afrag * Atex

Basically, for the color channels, the texture color defines the blend factor between the 
fragment color (e.g. as determined by lighting or vertex color) and Cconst, the texture 
environment color.  The texture alpha channel modulates the fragment alpha.


Cheers,
/ulrich

PS: Please don't hijack threads.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org