[osg-users] What status of osgManipulator::Constraint?

2011-05-25 Thread Mikhail I. Izmestev

Hi,

I have discovered some problems with osgManipulator::Constraint such as 
methods which will never called:

bool constrain(TranslateInLineCommand command) const
bool constrain(TranslateInPlaneCommand command) const
bool constrain(Scale1DCommand command) const
bool constrain(Scale2DCommand command) const
bool constrain(ScaleUniformCommand command) const

Some bugs in osgManipulatro::Dragger's methods addConstraint and 
removeConstraint.


So is osgManipulator::Constraint deprecated or it needed in submissions?

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


Re: [osg-users] [vpb] Virtual Planet Builder

2011-05-25 Thread Robert Osfield
Hi Abhishek,

The VPB svn/trunk fixes this issue.  As Chris says these defines were
once provided but then were deprecated so we had to update our sources
to handle this.

Robert.

On Tue, May 24, 2011 at 7:19 PM, abhishek agarwal
abhishek0agar...@gmail.com wrote:
 Hi,
 i'm new @ vpb..
 i was trying to install vpb0.9.10 on ubuntu10.10
 when i make then it shows following errors


 bhishek@abhishek-T12Eg:~/VirtualPlanetBuilder$ make
 Scanning dependencies of target vpb
 [  3%] Building CXX object src/vpb/CMakeFiles/vpb.dir/BuildLog.o
 [  6%] Building CXX object src/vpb/CMakeFiles/vpb.dir/BuildOperation.o
 [  9%] Building CXX object src/vpb/CMakeFiles/vpb.dir/BuildOptions.o
 [ 12%] Building CXX object src/vpb/CMakeFiles/vpb.dir/BuildOptionsIO.o
 [ 15%] Building CXX object src/vpb/CMakeFiles/vpb.dir/Commandline.o
 [ 18%] Building CXX object src/vpb/CMakeFiles/vpb.dir/DatabaseBuilder.o
 [ 21%] Building CXX object src/vpb/CMakeFiles/vpb.dir/DatabaseBuilderIO.o
 [ 24%] Building CXX object src/vpb/CMakeFiles/vpb.dir/DataSet.o
 [ 27%] Building CXX object src/vpb/CMakeFiles/vpb.dir/Date.o
 [ 30%] Building CXX object src/vpb/CMakeFiles/vpb.dir/Destination.o
 [ 33%] Building CXX object src/vpb/CMakeFiles/vpb.dir/ExtrudeVisitor.o
 [ 36%] Building CXX object src/vpb/CMakeFiles/vpb.dir/FileCache.o
 [ 39%] Building CXX object src/vpb/CMakeFiles/vpb.dir/FileDetails.o
 [ 42%] Building CXX object src/vpb/CMakeFiles/vpb.dir/FileUtils.o
 [ 45%] Building CXX object src/vpb/CMakeFiles/vpb.dir/FilePathManager.o
 [ 48%] Building CXX object src/vpb/CMakeFiles/vpb.dir/GeospatialDataset.o
 [ 51%] Building CXX object src/vpb/CMakeFiles/vpb.dir/HeightFieldMapper.o
 [ 54%] Building CXX object src/vpb/CMakeFiles/vpb.dir/MachinePool.o
 [ 57%] Building CXX object src/vpb/CMakeFiles/vpb.dir/ObjectPlacer.o
 [ 60%] Building CXX object src/vpb/CMakeFiles/vpb.dir/PropertyFile.o
 /home/abhishek/VirtualPlanetBuilder/src/vpb/PropertyFile.cpp: In constructor 
 ‘vpb::FileProxy::FileProxy(const std::string)’:
 /home/abhishek/VirtualPlanetBuilder/src/vpb/PropertyFile.cpp:51: error: 
 ‘S_IREAD’ was not declared in this scope
 /home/abhishek/VirtualPlanetBuilder/src/vpb/PropertyFile.cpp:51: error: 
 ‘S_IWRITE’ was not declared in this scope
 make[2]: *** [src/vpb/CMakeFiles/vpb.dir/PropertyFile.o] Error 1
 make[1]: *** [src/vpb/CMakeFiles/vpb.dir/all] Error 2
 make: *** [all] Error 2
 abhishek@abhishek-T12Eg:~/VirtualPlanetBuilder$



 can you help me ?
 waiting for reply.
 Thank you!

 Cheers,
 abhishek

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=39672#39672





 ___
 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] What status of osgManipulator::Constraint?

2011-05-25 Thread Robert Osfield
Hi Mikhail,

I'm not the original author of osgManipulator, and alas, the original
author hasn't contributed since submitting, so it's now down the us to
maintain it.  I did some updates to it last year to fix some issue,
but can't claim to be an expert and certainly can't off the top of my
head make too much sense of your email just based on method names.  I
also don't know if you are referring to svn/trunk, 2.9.x or a previous
stable release.  I would suggest moving to svn/trunk or a recent 2.9.x
dev release for discussion purposes as these contain the improvements
I made.

Robert.

On Wed, May 25, 2011 at 7:13 AM, Mikhail I. Izmestev
izmmish...@gmail.com wrote:
 Hi,

 I have discovered some problems with osgManipulator::Constraint such as
 methods which will never called:
 bool constrain(TranslateInLineCommand command) const
 bool constrain(TranslateInPlaneCommand command) const
 bool constrain(Scale1DCommand command) const
 bool constrain(Scale2DCommand command) const
 bool constrain(ScaleUniformCommand command) const

 Some bugs in osgManipulatro::Dragger's methods addConstraint and
 removeConstraint.

 So is osgManipulator::Constraint deprecated or it needed in submissions?

 Mikhail.
 ___
 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] What status of osgManipulator::Constraint?

2011-05-25 Thread Mikhail I. Izmestev

Hi Robert,

Yes, I'm talking about latest svn/trunk version.

Bug in Dragger::addConstraint using = instead ==

void Dragger::addConstraint(Constraint* constraint)
{
// check to make sure constaint hasn't already been attached.
for(Constraints::iterator itr = _constraints.begin();
itr != _constraints.end();
++itr)
{
if (*itr = constraint) return;
}

_constraints.push_back(constraint);
}

same bug in Dragger::removeConstraint.

About constrain methods of Constraint class, Dragger::dispatch can only 
call bool constrain(MotionCommand) const


void Dragger::dispatch(MotionCommand command)
{
// apply any constraints
for(Constraints::iterator itr = _constraints.begin();
itr != _constraints.end();
++itr)
{
(*itr)-constrain(command);
}

// move self
getParentDragger()-receive(command);


for(DraggerCallbacks::iterator itr = 
getParentDragger()-getDraggerCallbacks().begin();

itr != getParentDragger()-getDraggerCallbacks().end();
++itr)
{
(*itr)-receive(command);
}
}

Same feature/bug with DraggerCallback::receive methods.

Mikhail.

25.05.2011 10:52, Robert Osfield wrote:

Hi Mikhail,

I'm not the original author of osgManipulator, and alas, the original
author hasn't contributed since submitting, so it's now down the us to
maintain it.  I did some updates to it last year to fix some issue,
but can't claim to be an expert and certainly can't off the top of my
head make too much sense of your email just based on method names.  I
also don't know if you are referring to svn/trunk, 2.9.x or a previous
stable release.  I would suggest moving to svn/trunk or a recent 2.9.x
dev release for discussion purposes as these contain the improvements
I made.

Robert.

On Wed, May 25, 2011 at 7:13 AM, Mikhail I. Izmestev
izmmish...@gmail.com  wrote:

Hi,

I have discovered some problems with osgManipulator::Constraint such as
methods which will never called:
bool constrain(TranslateInLineCommand  command) const
bool constrain(TranslateInPlaneCommand  command) const
bool constrain(Scale1DCommand  command) const
bool constrain(Scale2DCommand  command) const
bool constrain(ScaleUniformCommand  command) const

Some bugs in osgManipulatro::Dragger's methods addConstraint and
removeConstraint.

So is osgManipulator::Constraint deprecated or it needed in submissions?

Mikhail.
___
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] What status of osgManipulator::Constraint?

2011-05-25 Thread Robert Osfield
Hi Mikhail,

Thanks for the explanation.  Could you post fixes to osg-submissions
so I can review them and merge the bug fixes.

I'm not yet clear on the disaptch issue, is it that any sublcass from
MotionCommand will be ast to MotionCommand and then handled by all the
contraints as a MotionCommand rather than the subclass?  If so then
this is a design issue rather than a local bug.

Cheers,
Robert.

On Wed, May 25, 2011 at 8:08 AM, Mikhail I. Izmestev
izmmish...@gmail.com wrote:
 Hi Robert,

 Yes, I'm talking about latest svn/trunk version.

 Bug in Dragger::addConstraint using = instead ==

 void Dragger::addConstraint(Constraint* constraint)
 {
    // check to make sure constaint hasn't already been attached.
    for(Constraints::iterator itr = _constraints.begin();
        itr != _constraints.end();
        ++itr)
    {
        if (*itr = constraint) return;
    }

    _constraints.push_back(constraint);
 }

 same bug in Dragger::removeConstraint.

 About constrain methods of Constraint class, Dragger::dispatch can only call
 bool constrain(MotionCommand) const

 void Dragger::dispatch(MotionCommand command)
 {
    // apply any constraints
    for(Constraints::iterator itr = _constraints.begin();
        itr != _constraints.end();
        ++itr)
    {
        (*itr)-constrain(command);
    }

    // move self
    getParentDragger()-receive(command);


    for(DraggerCallbacks::iterator itr =
 getParentDragger()-getDraggerCallbacks().begin();
        itr != getParentDragger()-getDraggerCallbacks().end();
        ++itr)
    {
        (*itr)-receive(command);
    }
 }

 Same feature/bug with DraggerCallback::receive methods.

 Mikhail.

 25.05.2011 10:52, Robert Osfield wrote:

 Hi Mikhail,

 I'm not the original author of osgManipulator, and alas, the original
 author hasn't contributed since submitting, so it's now down the us to
 maintain it.  I did some updates to it last year to fix some issue,
 but can't claim to be an expert and certainly can't off the top of my
 head make too much sense of your email just based on method names.  I
 also don't know if you are referring to svn/trunk, 2.9.x or a previous
 stable release.  I would suggest moving to svn/trunk or a recent 2.9.x
 dev release for discussion purposes as these contain the improvements
 I made.

 Robert.

 On Wed, May 25, 2011 at 7:13 AM, Mikhail I. Izmestev
 izmmish...@gmail.com  wrote:

 Hi,

 I have discovered some problems with osgManipulator::Constraint such as
 methods which will never called:
 bool constrain(TranslateInLineCommand  command) const
 bool constrain(TranslateInPlaneCommand  command) const
 bool constrain(Scale1DCommand  command) const
 bool constrain(Scale2DCommand  command) const
 bool constrain(ScaleUniformCommand  command) const

 Some bugs in osgManipulatro::Dragger's methods addConstraint and
 removeConstraint.

 So is osgManipulator::Constraint deprecated or it needed in submissions?

 Mikhail.
 ___
 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] What status of osgManipulator::Constraint?

2011-05-25 Thread Mikhail I. Izmestev

Hi Robert,

25.05.2011 11:53, Robert Osfield wrote:

Hi Mikhail,

Thanks for the explanation.  Could you post fixes to osg-submissions
so I can review them and merge the bug fixes.

I'm not yet clear on the disaptch issue, is it that any sublcass from
MotionCommand will be ast to MotionCommand and then handled by all the
contraints as a MotionCommand rather than the subclass?  If so then
this is a design issue rather than a local bug.


For example you can take a look to RotateCylinderDragger, it create 
Rotate3DCommand and pass it to dispatch method.


Only for that reason I believed that Constraint is deprecated.



Cheers,
Robert.

On Wed, May 25, 2011 at 8:08 AM, Mikhail I. Izmestev
izmmish...@gmail.com  wrote:

Hi Robert,

Yes, I'm talking about latest svn/trunk version.

Bug in Dragger::addConstraint using = instead ==

void Dragger::addConstraint(Constraint* constraint)
{
// check to make sure constaint hasn't already been attached.
for(Constraints::iterator itr = _constraints.begin();
itr != _constraints.end();
++itr)
{
if (*itr = constraint) return;
}

_constraints.push_back(constraint);
}

same bug in Dragger::removeConstraint.

About constrain methods of Constraint class, Dragger::dispatch can only call
bool constrain(MotionCommand) const

void Dragger::dispatch(MotionCommand  command)
{
// apply any constraints
for(Constraints::iterator itr = _constraints.begin();
itr != _constraints.end();
++itr)
{
(*itr)-constrain(command);
}

// move self
getParentDragger()-receive(command);


for(DraggerCallbacks::iterator itr =
getParentDragger()-getDraggerCallbacks().begin();
itr != getParentDragger()-getDraggerCallbacks().end();
++itr)
{
(*itr)-receive(command);
}
}

Same feature/bug with DraggerCallback::receive methods.

Mikhail.

25.05.2011 10:52, Robert Osfield wrote:


Hi Mikhail,

I'm not the original author of osgManipulator, and alas, the original
author hasn't contributed since submitting, so it's now down the us to
maintain it.  I did some updates to it last year to fix some issue,
but can't claim to be an expert and certainly can't off the top of my
head make too much sense of your email just based on method names.  I
also don't know if you are referring to svn/trunk, 2.9.x or a previous
stable release.  I would suggest moving to svn/trunk or a recent 2.9.x
dev release for discussion purposes as these contain the improvements
I made.

Robert.

On Wed, May 25, 2011 at 7:13 AM, Mikhail I. Izmestev
izmmish...@gmail.comwrote:


Hi,

I have discovered some problems with osgManipulator::Constraint such as
methods which will never called:
bool constrain(TranslateInLineCommandcommand) const
bool constrain(TranslateInPlaneCommandcommand) const
bool constrain(Scale1DCommandcommand) const
bool constrain(Scale2DCommandcommand) const
bool constrain(ScaleUniformCommandcommand) const

Some bugs in osgManipulatro::Dragger's methods addConstraint and
removeConstraint.

So is osgManipulator::Constraint deprecated or it needed in submissions?

Mikhail.
___
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 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] What status of osgManipulator::Constraint?

2011-05-25 Thread Robert Osfield
Hi Mikhail,

On Wed, May 25, 2011 at 9:10 AM, Mikhail I. Izmestev
izmmish...@gmail.com wrote:
 For example you can take a look to RotateCylinderDragger, it create
 Rotate3DCommand and pass it to dispatch method.

I'm afraid this doesn't explain what the problem is.  Could you please
explain the mechanics of the problem rather than just throw out
various class names as I can't second guess what problems you have
identified.

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


Re: [osg-users] What status of osgManipulator::Constraint?

2011-05-25 Thread Mikhail I. Izmestev

25.05.2011 12:29, Robert Osfield wrote:

Hi Mikhail,

On Wed, May 25, 2011 at 9:10 AM, Mikhail I. Izmestev
izmmish...@gmail.com  wrote:

For example you can take a look to RotateCylinderDragger, it create
Rotate3DCommand and pass it to dispatch method.


I'm afraid this doesn't explain what the problem is.  Could you please
explain the mechanics of the problem rather than just throw out
various class names as I can't second guess what problems you have
identified.

Robert.


Ok, Constraint class have methods

virtual bool constrain(MotionCommand) const
virtual bool constrain(TranslateInLineCommand command) const
virtual bool constrain(TranslateInPlaneCommand command) const
virtual bool constrain(Scale1DCommand command) const
virtual bool constrain(Scale2DCommand command) const
virtual bool constrain(ScaleUniformCommand command) const


And DraggerCallback class have methods

virtual bool receive(const MotionCommand)
virtual bool receive(const TranslateInLineCommand command)
virtual bool receive(const TranslateInPlaneCommand command)
virtual bool receive(const Scale1DCommand command)
virtual bool receive(const Scale2DCommand command)
virtual bool receive(const ScaleUniformCommand command)
virtual bool receive(const Rotate3DCommand command)

piece of code of RotateCylinderDragger::handle
code
...
osg::ref_ptrRotate3DCommand cmd = new Rotate3DCommand();
cmd-setStage(MotionCommand::MOVE);
cmd-setLocalToWorldAndWorldToLocal(_startLocalToWorld,_startWorldToLocal);
cmd-setRotation(rotation);

// Dispatch command.
dispatch(*cmd);
...
/code

As you can see there is used Rotate3DCommand, what we would expect from 
DraggerCallback attached to this Dragger, call of

bool receive(const Rotate3DCommand command)
or
bool receive(const MotionCommand)
?

Now see dispatch method
void Dragger::dispatch(MotionCommand command)
{
// apply any constraints
for(Constraints::iterator itr = _constraints.begin();
itr != _constraints.end();
++itr)
{
(*itr)-constrain(command);
}

// move self
getParentDragger()-receive(command);


for(DraggerCallbacks::iterator itr = 
getParentDragger()-getDraggerCallbacks().begin();

itr != getParentDragger()-getDraggerCallbacks().end();
++itr)
{
(*itr)-receive(command);
}
}

and we see what would be called
bool receive(const MotionCommand)

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


Re: [osg-users] What status of osgManipulator::Constraint?

2011-05-25 Thread Robert Osfield
HI Mikhail,

So the problem is the the Rotate3DCommnd is being upcast to the base
class MotionCommand and then never the Constraint and DraggerCallbacks
only have their constrain(MotionCommand)/recive(MotionCommand)
methods called rather than the original subclass method i,e,
constain(Rotate3DCommand) and recive(Rotate3DCommand)?

If so then the problem looks to be one that would need tackling via a
double dispatch vistor pattern solution like used in
osg::Node::accept(NodeVisitor)/osg::NodeVisitor::apply(Node).  I am
on the right track?

Robert.

On Wed, May 25, 2011 at 10:09 AM, Mikhail I. Izmestev
izmmish...@gmail.com wrote:
 25.05.2011 12:29, Robert Osfield wrote:

 Hi Mikhail,

 On Wed, May 25, 2011 at 9:10 AM, Mikhail I. Izmestev
 izmmish...@gmail.com  wrote:

 For example you can take a look to RotateCylinderDragger, it create
 Rotate3DCommand and pass it to dispatch method.

 I'm afraid this doesn't explain what the problem is.  Could you please
 explain the mechanics of the problem rather than just throw out
 various class names as I can't second guess what problems you have
 identified.

 Robert.

 Ok, Constraint class have methods

 virtual bool constrain(MotionCommand) const
 virtual bool constrain(TranslateInLineCommand command) const
 virtual bool constrain(TranslateInPlaneCommand command) const
 virtual bool constrain(Scale1DCommand command) const
 virtual bool constrain(Scale2DCommand command) const
 virtual bool constrain(ScaleUniformCommand command) const


 And DraggerCallback class have methods

 virtual bool receive(const MotionCommand)
 virtual bool receive(const TranslateInLineCommand command)
 virtual bool receive(const TranslateInPlaneCommand command)
 virtual bool receive(const Scale1DCommand command)
 virtual bool receive(const Scale2DCommand command)
 virtual bool receive(const ScaleUniformCommand command)
 virtual bool receive(const Rotate3DCommand command)

 piece of code of RotateCylinderDragger::handle
 code
 ...
 osg::ref_ptrRotate3DCommand cmd = new Rotate3DCommand();
 cmd-setStage(MotionCommand::MOVE);
 cmd-setLocalToWorldAndWorldToLocal(_startLocalToWorld,_startWorldToLocal);
 cmd-setRotation(rotation);

 // Dispatch command.
 dispatch(*cmd);
 ...
 /code

 As you can see there is used Rotate3DCommand, what we would expect from
 DraggerCallback attached to this Dragger, call of
 bool receive(const Rotate3DCommand command)
 or
 bool receive(const MotionCommand)
 ?

 Now see dispatch method
 void Dragger::dispatch(MotionCommand command)
 {
    // apply any constraints
    for(Constraints::iterator itr = _constraints.begin();
        itr != _constraints.end();
        ++itr)
    {
        (*itr)-constrain(command);
    }

    // move self
    getParentDragger()-receive(command);


    for(DraggerCallbacks::iterator itr =
 getParentDragger()-getDraggerCallbacks().begin();
        itr != getParentDragger()-getDraggerCallbacks().end();
        ++itr)
    {
        (*itr)-receive(command);
    }
 }

 and we see what would be called
 bool receive(const MotionCommand)

 Mikhail.
 ___
 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] What status of osgManipulator::Constraint?

2011-05-25 Thread Mikhail I. Izmestev

Hi Robert,

25.05.2011 13:25, Robert Osfield wrote:

HI Mikhail,

So the problem is the the Rotate3DCommnd is being upcast to the base
class MotionCommand and then never the Constraint and DraggerCallbacks
only have their constrain(MotionCommand)/recive(MotionCommand)
methods called rather than the original subclass method i,e,
constain(Rotate3DCommand) and recive(Rotate3DCommand)?


Yes, it is.


If so then the problem looks to be one that would need tackling via a
double dispatch vistor pattern solution like used in
osg::Node::accept(NodeVisitor)/osg::NodeVisitor::apply(Node).  I am
on the right track?


Yes, you are right.

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


[osg-users] Change oagAnimation channels properties

2011-05-25 Thread Aitor Ardanza
Hi,

I'm working with morphing, and I need to add a property of intensity.
I thought it as follows:

Code:

osgAnimation::FloatLinearChannel* channel0 = new 
osgAnimation::FloatLinearChannel;
channel0-getOrCreateSampler()-getOrCreateKeyframeContainer()-push_back(osgAnimation::FloatKeyframe(0,0.0));
channel0-getOrCreateSampler()-getOrCreateKeyframeContainer()-push_back(osgAnimation::FloatKeyframe(0.5,intensity));
 //intensity 0-1
channel0-getOrCreateSampler()-getOrCreateKeyframeContainer()-push_back(osgAnimation::FloatKeyframe(1.0,0.0));
channel0-setTargetName();
channel0-setName(0);
animList[num].get()-getChannels().clear();
animList[num].get()-addChannel(channel0);
animList[num].get()-computeDuration();



But if I change the channel to animation in this way, the animation stops 
working.
Any other way to do this?

Thank you!

Cheers,
Aitor

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39694#39694





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


[osg-users] osgtext::text 2lines?

2011-05-25 Thread Christoph Gill
Hi,
i want to add a second line to a osgtext::text and tried it with \n, br and 
[br] but nothing will work. So I'm looking for a funktion to do this.
I Add a std::string as Text to my Text an would like to place the linebreak in 
it.

Thanks for your help

Cheers,
Christoph

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39695#39695





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


[osg-users] Zip plugin

2011-05-25 Thread Thomas Hogarth
Hi Robert

I just checked out the latest trunk and when trying to run cmake got an
error that zipArchive.h and cpp where missing from the zip plugin. I checked
the folder and they were indeed missing. just a heads up


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


Re: [osg-users] [vpb] model placing using osgdem

2011-05-25 Thread Vijeesh Theningaledathil
Hi  Mr. Glenn

Do you mean to create a .earth file that loads the terrain and model files. I 
tried that today. But it doesn't get loaded. Also I want to know in detail how 
the earth file will be, if a model  to be added. 


Thank you!

Cheers,
Vijeesh

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39698#39698





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


Re: [osg-users] Maya2OSG patches

2011-05-25 Thread Ryan Pavlik
The replacement of that inline function with a macro removes the type-safety
offered by C++ and makes the code more accident prone.  I did the
static-casts with the multiple parameters because the parameters to the
function aren't necessarily always the same type. Looking into it further, a
single parameter, which is manually specified when in doubt, seems to be the
smartest solution, since it makes it explicit at the point of the call what
precision is being used when it is ambiguous. I've attached files for an
updated function which combines the best of all solutions so far: template
function with a single parameter, body uses osg::absolute to simplify
expression, and one explicit specification of the template parameter in
calling code. Simpler and more explicit all around, I think - hopefully this
will be acceptable. It build cleanly here: windows, vc9, maya 2012 x64

Ryan

On Tue, May 24, 2011 at 5:20 PM, Javier Taibo javier.ta...@gmail.comwrote:

  Thanks for the fixes. Changes are now committed to svn trunk.

  About the second issue, it seems a much complicated piece of code
 for what it's doing. I suggest this lighter and cleaner alternative
 instead of a template with three different typename parameters and the
 huge expression with four static_cast.

 #define inTolerance(base, match, tolerance) (
 osg::absolute((base)-(match))  tolerance )

  However, this part of the code was written by Peter Particle, so
 I'll redirect to him both proposals.

  Meanwhile, can you test if it is working for you right now?


  Regards,


 On Tue, May 24, 2011 at 11:08 PM, Ryan Pavlik rpav...@iastate.edu wrote:
  The changes to osgpreview.cpp are for the first issue, while the changes
 to
  utility.h are for the second way of solving the second issue.
  Ryan
 
  On Tue, May 24, 2011 at 12:59 PM, Javier Taibo javier.ta...@gmail.com
  wrote:
 
   Hi Ryan,
 
   Thank you for the patches. Can you send the whole files instead of
  patches, please? You can zip all files together to make it easy.
 
   Thank you!
 
 
   Best Regards,
 
 
  On Tue, May 24, 2011 at 7:28 PM, Ryan Pavlik rpav...@iastate.edu
 wrote:
   Hello all,
   I've attached small patches to two issues I've found with Maya2OSG.
   One allows it to build successfully with the current 2.8 branch -
 there
   are
   some manipulators not available in this branch so we just disable them
   by
   checking the osg version.
   The other issue was ambiguity in calling inTolerance, preventing me
 from
   building successfully on VC9 x64.  I solved this two different ways:
   take
   your pick of which way you prefer.
  
   I've made inTolerance a template function with a single parameter type
   and
   explicitly specified the template parameter in the one case.
   (fix-vc9-build)
   inTolerance is a template function with three parameter types, and
   static_casts all arguments to the type of the tolerance parameter
 before
   doing math.  This one doesn't require explicit template param
   specification,
   and seems more correct to me, or at least more explicit in how it
   works. I
   personally prefer this one. (alternate-fix-build)
  
   These patches were made against the latest svn trunk of maya2osg using
   tortoisesvn.
   Ryan
   --
   Ryan Pavlik
   HCI Graduate Student
   Virtual Reality Applications Center
   Iowa State University
  
   rpav...@iastate.edu
   http://academic.cleardefinition.com
  
   ___
   osg-users mailing list
   osg-users@lists.openscenegraph.org
  
  
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
 
 
 
  --
  Javier Taibo
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 
  --
  Ryan Pavlik
  HCI Graduate Student
  Virtual Reality Applications Center
  Iowa State University
 
  rpav...@iastate.edu
  http://academic.cleardefinition.com
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 



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




-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
#ifndef _ANIMATION_H_
#define _ANIMATION_H_


#include utility.h


// - Maya ---
#include maya/MTime.h
//#include maya/MDagNode.h
//#include maya/MDagPath.h
#include maya/MIntArray.h
#include maya/MPlugArray.h
#include maya/MAnimControl.h
#include maya/MDoubleArray.h
#include maya/MObjectArray.h
#include maya/MStringArray.h


// - OSG 

Re: [osg-users] osgtext::text 2lines?

2011-05-25 Thread Jeremy Moles
On Wed, 2011-05-25 at 12:25 +0200, Christoph Gill wrote:
 Hi,
 i want to add a second line to a osgtext::text and tried it with \n, br and 
 [br] but nothing will work. So I'm looking for a funktion to do this.
 I Add a std::string as Text to my Text an would like to place the linebreak 
 in it.
 
 Thanks for your help

I'm 100% sure this works. There's something else going on with your
code. Can you paste a small example?

 Cheers,
 Christoph
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=39695#39695
 
 
 
 
 
 ___
 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] osg Widget image transparent

2011-05-25 Thread daniele argiolas
thank you very much, solved! :)

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39703#39703





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


Re: [osg-users] Change osgAnimation channels properties

2011-05-25 Thread Aitor Ardanza
Ok, I've managed to do as follows:

Code:

template typename ChannelType, typename ContainerType
void setKeyFrameValues(ChannelType* pChannel,float value, double time)
{
ContainerType* kfc  = pChannel-getSamplerTyped()-getKeyframeContainerTyped();
if(!kfc){return;}

int closestFrame = -1;
double closestDiff = 9.99f;
//loop all the keys
for(unsigned int i=0; ikfc-size(); i++)
{
double diff = fabs(time - (*kfc)[i].getTime());
if( diff  closestDiff){
closestFrame = i;
closestDiff = diff;
}
}

(*kfc)[closestFrame].setValue(value);

...

for (unsigned int i = 0; i  
m_animationManager-getAnimationList()[id]-getChannels().size(); i++) 
{
osgAnimation::Channel* pChannel = 
m_animationManager-getAnimationList()[id]-getChannels()[i].get();
osgAnimation::FloatLinearChannel* pFlc = 
dynamic_castosgAnimation::FloatLinearChannel*(pChannel);
if (pFlc)
{
setKeyFrameValues/osgAnimation::FloatLinearChannel, 
osgAnimation::FloatKeyframeContainer(pFlc, intensity, time);
continue;
}
}
}




But, for example, for an animation loaded from a fbx file, how can I change  
Vec2CubicBezierChannel channels?

Thank you!

Cheers,
Aitor

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39705#39705





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


Re: [osg-users] [vpb] Virtual Planet Builder

2011-05-25 Thread abhishek agarwal
Hi,
Thank you Chris  Robert 
I changed S_IREAD to S_IRUSR  S_IWRITE to S_IWUSR .. and it worked..

Now i'm stuck wid new problem...

abhishek@abhishek-T12Eg:~$ osgdem --xx 10 --yy 10 -t ps_texture_16k.tif \ --xx 
10 --yy 10 -d ps_height_16k.tif \ -l 8 -v 0.1 -o puget.ive pegout.osga
osgdem: error while loading shared libraries: libvpb.so.10: cannot open shared 
object file: No such file or directory
abhishek@abhishek-T12Eg:~$ osgdem
osgdem: error while loading shared libraries: libvpb.so.10: cannot open shared 
object file: No such file or directory
abhishek@abhishek-T12Eg:~$ 
 

can u help me??
thank you
waiting for reply

Thank you!

Cheers,
abhishek

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39708#39708





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


Re: [osg-users] VBO incosistencies between 2.8 and 2.912

2011-05-25 Thread Robert Osfield
Hi Dimi,

I have now recreated the issue on my system using your example.  I
used the attached CMakeLists.txt to compile, this might help others
recreate the problem as well.

As for the cause of the problem I can't yet say.  Unfortunately I've
run out of working day so will need to come back to this tomorow.

Robert.

On Thu, May 19, 2011 at 2:21 PM, dimi christop dimi_chris...@yahoo.com wrote:
 Hi Robert,

 this is exactly what I did, I called dirty on the vertexArray which is passed
 each frame
 to the geometry using
 geom-setVertexArray(vcoords);
 vcoords-dirty();

 The problem was that, it screws up all other attached geometry arrays like
 (colors, normals, texcoords) which do not change

 This behavior does not occur when the geometry is not specified as VBO or in
 2.8.
 I can try to call dirty on all arrays whether they change or not, but it does
 not seem logical.

 I attach a small example which show the problem (along with the makefile). The
 example
 changes vertexArrays of a VBO geometry (a cube) at runtime using 2 different
 vertexArrays.
 You should see a pulsating colored, textured cube if it runs fine.
 Commenting/Uncommenting the dirty calls make, or disabling the VBO makes it
 clear.

 Dimi




 - Original Message 
 From: Robert Osfield robert.osfi...@gmail.com
 To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
 Sent: Thu, May 19, 2011 3:52:06 PM
 Subject: Re: [osg-users] VBO incosistencies between 2.8 and 2.912

 Hi Dimi,

 The buffer object support in the OSG has been revamped and in theory
 should be robust and flexible... but like all code there is a chance
 for regressions so wide spread testing it neccessary.  Whether in this
 instance there is an actual bug, or just a different behaviour I can't
 say as I haven't tested your code.

 As a quick test I would suggest calling dirty on each array your modiy.

 Robert.

 On Thu, May 19, 2011 at 1:37 PM, dimi christop dimi_chris...@yahoo.com 
 wrote:
 Hi,

 I recently upgraded my code base to 2.912 (Linux, GTX 280) , unfortunately my
 GPU morphing code stopped working.
 I use VBO, GLSL and vertex attributes to copy the changing morph shapes and 
 do
 the interpolation on the GPU.

 After searching for the problem I found that when I declared a geometry as 
 VBO
     // Disable Display lists and setup Vertex Buffer Objects
    geom-setUseDisplayList (false);
      geom-setUseVertexBufferObjects(true);
      osg::VertexBufferObject* df = geom-getOrCreateVertexBufferObject();
      df-setUsage (GL_STREAM_DRAW);


 the subsequent commands during the update which changed the vertexArray had 
 no
 effect and produced random triangles on the screen.
 geom-setVertexArray(vcoords);

 Because of the many morph shapes, I have many vertex arrays preallocated and
 pass them to the geometry based on a time. I do not copy assign to the vertex
 array of the geometry for speed reasons.
 As I said in the 2.8 version everything worked fine.
 When change the code to issued a dirty on the vertex arrays
 vcoords-dirty()
 the shape morphed correctly but the color, normal, texcoord arrays (which do
not
 morph) did not show up correctly.

 Has anyone any idea what changed between the 2.8-2.912 versions. I was under
the
 impression that issuing a setVertexArray command
 calls dirty() at least on the geometry array.
 Is it therefore mandatory to issue a dirty() call for all arrays (color,
normal,
 texcoords) assigned to the geometry?

 Please note then when I disable the VBO usage, a single dirty() call on the
 vertexarray works and the other arrays show up normal.

 Thank you in advance
 Dimi
 ___
 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


cmake_minimum_required(VERSION 2.6)

PROJECT(vbotest)

SET(CMAKE_MODULE_PATH ${vbotest_SOURCE_DIR};${CMAKE_MODULE_PATH})

FIND_PACKAGE(OpenThreads)
FIND_PACKAGE(osg)
FIND_PACKAGE(osgDB)
FIND_PACKAGE(osgViewer)

SET(SOURCES
osggpumorph.cpp
)

INCLUDE_DIRECTORIES(${OPENTHREADS_INCLUDE_DIR} ${OSG_INCLUDE_DIR})

LINK_DIRECTORIES(${OSG_LIB_DIR})

ADD_EXECUTABLE(vbotest ${SOURCES})

TARGET_LINK_LIBRARIES(vbotest ${OSG_LIBRARY} ${OSGVIEWER_LIBRARY} 
${OPENTHREADS_LIBRARY})
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [vpb] Virtual Planet Builder

2011-05-25 Thread Chris 'Xenon' Hanson
On 5/25/2011 10:40 AM, abhishek agarwal wrote:
 abhishek@abhishek-T12Eg:~$ osgdem --xx 10 --yy 10 -t ps_texture_16k.tif \ 
 --xx 10 --yy 10 -d ps_height_16k.tif \ -l 8 -v 0.1 -o puget.ive pegout.osga
 osgdem: error while loading shared libraries: libvpb.so.10: cannot open 
 shared object file: No such file or directory
 abhishek@abhishek-T12Eg:~$ osgdem
 osgdem: error while loading shared libraries: libvpb.so.10: cannot open 
 shared object file: No such file or directory
 abhishek@abhishek-T12Eg:~$ 

  It can't find the libvpb.so.10 file. You need to figure out where this file 
is, and
where VPB is searching for it.

  Look into Linux's LD_LIBRARY_PATH and OSG's OSG_LIBRARY_PATH.

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
Contracting.
There is no Truth. There is only Perception. To Perceive is to Exist. - 
Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Merging multiple textures

2011-05-25 Thread karl jones
Hi,

I have a large number of 3d models(1000's), each model has dozens of textures 
in bmp format at 1024. I want to try to automate a process that will lower the 
resolution and merge the textures so I have less textures whilst maintaing the 
uv coords. Is this possible using OSG? I have seen mention of the Texture Atlas 
class, is this able to do this?

Also is it able to change the texture format to jpeg or dds?

... 

Thank you!

Cheers,
karl

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39712#39712





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


Re: [osg-users] Merging multiple textures

2011-05-25 Thread Chris 'Xenon' Hanson
On 5/25/2011 1:29 PM, karl jones wrote:
 Hi,
 I have a large number of 3d models(1000's), each model has dozens of textures 
 in bmp format at 1024. I want to try to automate a process that will lower 
 the resolution and merge the textures so I have less textures whilst 
 maintaing the uv coords. Is this possible using OSG? I have seen mention of 
 the Texture Atlas class, is this able to do this?

  Texture atlas merges textures as you describe. It does not explicitly change 
resolution.
You could always use something like Photoshop's Automate tool, or countless 
other tools to
resize the merged textures. OGL texture coordinates are normalized, so they 
don't care
what the actual image size is.

 Also is it able to change the texture format to jpeg or dds?

  No, but you could do this during the resize process, and then do a search and 
replace of
your model files (depending on the format) to rewrite the image file extension.

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
Contracting.
There is no Truth. There is only Perception. To Perceive is to Exist. - 
Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Merging multiple textures

2011-05-25 Thread Tomlinson, Gordon
Changing to JPG will not save you any graphics memory only some disk space, as 
the images have to be uncompressed when read, if you want a compressed format 
that can go to the card compressed use should use the DDS format 

You can use many programs to batch resize your textures and convert formats, I 
tend use ThumbsPlus, for resizing this you will not need to worry about UV's

Note texture atlases/composites only work if you're not repeating the texture 
in any way




Gordon Tomlinson
System Engineering Consultant 
Overwatch®
An Operating Unit of Textron Systems
__
WARNING: Documents that can be viewed, printed or retrieved from this E-Mail 
may contain technical data whose export is restricted by the Arms Export 
Control Act (Title 22, U.S.C., Sec 2751, et seq,) or the Export Administration 
Act of 1979, as amended, Title 50, U.S.C., App. 2401 et seq. and which may not 
be exported, released or disclosed to non-U.S. persons (i.e. persons who are 
not U.S. citizens or lawful permanent residents [green card holders]) inside 
or outside the United States, without first obtaining an export license.  
Violations of these export laws are subject to severe civil, criminal and 
administrative penalties.

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of karl jones
Sent: Wednesday, May 25, 2011 3:29 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Merging multiple textures

Hi,

I have a large number of 3d models(1000's), each model has dozens of textures 
in bmp format at 1024. I want to try to automate a process that will lower the 
resolution and merge the textures so I have less textures whilst maintaing the 
uv coords. Is this possible using OSG? I have seen mention of the Texture Atlas 
class, is this able to do this?

Also is it able to change the texture format to jpeg or dds?

... 

Thank you!

Cheers,
karl

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39712#39712





___
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] Merging multiple textures

2011-05-25 Thread Pumipat Doungklang
Hi,

 Texture Atlas can be used for solving your task. you can learn how to use
this class in Optimizer.cpp.

 Regards,
//Phummipat

On Wed, May 25, 2011 at 9:29 PM, karl jones karl...@yahoo.com wrote:

 Hi,

 I have a large number of 3d models(1000's), each model has dozens of
 textures in bmp format at 1024. I want to try to automate a process that
 will lower the resolution and merge the textures so I have less textures
 whilst maintaing the uv coords. Is this possible using OSG? I have seen
 mention of the Texture Atlas class, is this able to do this?

 Also is it able to change the texture format to jpeg or dds?

 ...

 Thank you!

 Cheers,
 karl

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=39712#39712





 ___
 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 make attenuation of Points?

2011-05-25 Thread Nan WANG
hello robert:

After reading the GL_POINT_DISTANCE_ATTENUATION docs...i tried with osg

there's no GL_POINT_DISTANCE_ATTENUATION  definition in GL.h
only:

GL_POINT_SMOOTH
GL_POINT_SIZE
GL_POINT_SIZE_RANGE
GL_POINT_SIZE_GRANULARITY

regarding to GL_POINT

Is there any example about using GL_POINT_DISTANCE_ATTENUATION to active point 
size distance attenuation in OSG?

THanks a lot




... 

Thank you!

Cheers,
Nan

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39714#39714





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


Re: [osg-users] Merging multiple textures

2011-05-25 Thread karl jones
Hi,

Thanks guys, sounds like the Texture Atlas is just what i need. I have no 
repeating effects on the textures so they should be perfect, i can lower the 
resolution and convert after the merging. 

... 

Thank you!

Cheers,
karl

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39718#39718





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


Re: [osg-users] VBO incosistencies between 2.8 and 2.912

2011-05-25 Thread dimi christop
Hi Robert
thanks for looking into it. I also have spend the last days a few hours 
looking at the src and comparing 2.8 and 2.912, there seem to be a lot of 
changes in the 

BufferObjects and VertexBufferObjects. Especially the way the Arrays are Dirtied
when setVertexArray is called. Unfortunately I got lost in the classes and 
indirections and
could not locate anything specific.

I managed to observe one strange thing however. If you dont call 
setVertexArray() in order to substitute a new array  

but take the pointer of it and copy over the new values (using a for loop for 
example) then a calling  dirty() on this vertexArray
works as expected and does not invalidate all the other arrays (texcoords, 
normal, color).

I can send you a small example as soon as I get back to work tomorrow.

Dimi





- Original Message 
From: Robert Osfield robert.osfi...@gmail.com
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Wed, May 25, 2011 7:51:01 PM
Subject: Re: [osg-users] VBO incosistencies between 2.8 and 2.912

Hi Dimi,

I have now recreated the issue on my system using your example.  I
used the attached CMakeLists.txt to compile, this might help others
recreate the problem as well.

As for the cause of the problem I can't yet say.  Unfortunately I've
run out of working day so will need to come back to this tomorow.

Robert.

On Thu, May 19, 2011 at 2:21 PM, dimi christop dimi_chris...@yahoo.com wrote:
 Hi Robert,

 this is exactly what I did, I called dirty on the vertexArray which is passed
 each frame
 to the geometry using
 geom-setVertexArray(vcoords);
 vcoords-dirty();

 The problem was that, it screws up all other attached geometry arrays like
 (colors, normals, texcoords) which do not change

 This behavior does not occur when the geometry is not specified as VBO or in
 2.8.
 I can try to call dirty on all arrays whether they change or not, but it does
 not seem logical.

 I attach a small example which show the problem (along with the makefile). The
 example
 changes vertexArrays of a VBO geometry (a cube) at runtime using 2 different
 vertexArrays.
 You should see a pulsating colored, textured cube if it runs fine.
 Commenting/Uncommenting the dirty calls make, or disabling the VBO makes it
 clear.

 Dimi




 - Original Message 
 From: Robert Osfield robert.osfi...@gmail.com
 To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
 Sent: Thu, May 19, 2011 3:52:06 PM
 Subject: Re: [osg-users] VBO incosistencies between 2.8 and 2.912

 Hi Dimi,

 The buffer object support in the OSG has been revamped and in theory
 should be robust and flexible... but like all code there is a chance
 for regressions so wide spread testing it neccessary.  Whether in this
 instance there is an actual bug, or just a different behaviour I can't
 say as I haven't tested your code.

 As a quick test I would suggest calling dirty on each array your modiy.

 Robert.

 On Thu, May 19, 2011 at 1:37 PM, dimi christop dimi_chris...@yahoo.com 
wrote:
 Hi,

 I recently upgraded my code base to 2.912 (Linux, GTX 280) , unfortunately my
 GPU morphing code stopped working.
 I use VBO, GLSL and vertex attributes to copy the changing morph shapes and 
do
 the interpolation on the GPU.

 After searching for the problem I found that when I declared a geometry as 
VBO
 // Disable Display lists and setup Vertex Buffer Objects
geom-setUseDisplayList (false);
  geom-setUseVertexBufferObjects(true);
  osg::VertexBufferObject* df = geom-getOrCreateVertexBufferObject();
  df-setUsage (GL_STREAM_DRAW);


 the subsequent commands during the update which changed the vertexArray had 
no
 effect and produced random triangles on the screen.
 geom-setVertexArray(vcoords);

 Because of the many morph shapes, I have many vertex arrays preallocated and
 pass them to the geometry based on a time. I do not copy assign to the vertex
 array of the geometry for speed reasons.
 As I said in the 2.8 version everything worked fine.
 When change the code to issued a dirty on the vertex arrays
 vcoords-dirty()
 the shape morphed correctly but the color, normal, texcoord arrays (which do
not
 morph) did not show up correctly.

 Has anyone any idea what changed between the 2.8-2.912 versions. I was under
the
 impression that issuing a setVertexArray command
 calls dirty() at least on the geometry array.
 Is it therefore mandatory to issue a dirty() call for all arrays (color,
normal,
 texcoords) assigned to the geometry?

 Please note then when I disable the VBO usage, a single dirty() call on the
 vertexarray works and the other arrays show up normal.

 Thank you in advance
 Dimi
 ___
 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
 

[osg-users] How to represent Scene Graph as a flow chart ?

2011-05-25 Thread Sanat Talmaki
Hi,

I am building a GUI where users can load individual cad models and then save 
out the built up object as a single osg model. 

I am interested in showing the user a symbolic view of the scene graph similar 
to a flow chart where every node that is added by the user in the main window 
is shown as an update in the secondary window. I guess somewhat similar to 
osgedit (which I tried but couldn't build as it seems it is quite out of date?)

I was looking for some tips on how I can get started as I am not sure where to 
get started or if any of the examples show a similar functionality.

Thank you

Sincerely,
Sanat

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39720#39720





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


Re: [osg-users] Looking at OSGExp and maya2osg (3dsmax and Maya export plugins)

2011-05-25 Thread Farshid Lashkari
Hi Luca,

On Thu, May 19, 2011 at 11:59 PM, Luca Vezzadini
luca.vezzad...@gmail.comwrote:

 That would be perfect, so go ahead with that.


I just added the support for normal map details in the description string.
The format is the following:

Normal unit amount method flip_red flip_green swap_red_green

The method field can be one of the following strings:
Tangent
Local XYZ
Screen
World

Try it out and let me know if there are any issues.

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


Re: [osg-users] Maya2OSG patches

2011-05-25 Thread Javier Taibo
  It's far more readable :)  Thanks for the changes. They are
submitted to svn trunk.


  Regards,

On Wed, May 25, 2011 at 4:50 PM, Ryan Pavlik rpav...@iastate.edu wrote:
 The replacement of that inline function with a macro removes the type-safety
 offered by C++ and makes the code more accident prone.  I did the
 static-casts with the multiple parameters because the parameters to the
 function aren't necessarily always the same type. Looking into it further, a
 single parameter, which is manually specified when in doubt, seems to be the
 smartest solution, since it makes it explicit at the point of the call what
 precision is being used when it is ambiguous. I've attached files for an
 updated function which combines the best of all solutions so far: template
 function with a single parameter, body uses osg::absolute to simplify
 expression, and one explicit specification of the template parameter in
 calling code. Simpler and more explicit all around, I think - hopefully this
 will be acceptable. It build cleanly here: windows, vc9, maya 2012 x64
 Ryan

 On Tue, May 24, 2011 at 5:20 PM, Javier Taibo javier.ta...@gmail.com
 wrote:

  Thanks for the fixes. Changes are now committed to svn trunk.

  About the second issue, it seems a much complicated piece of code
 for what it's doing. I suggest this lighter and cleaner alternative
 instead of a template with three different typename parameters and the
 huge expression with four static_cast.

 #define inTolerance(base, match, tolerance) (
 osg::absolute((base)-(match))  tolerance )

  However, this part of the code was written by Peter Particle, so
 I'll redirect to him both proposals.

  Meanwhile, can you test if it is working for you right now?


  Regards,


 On Tue, May 24, 2011 at 11:08 PM, Ryan Pavlik rpav...@iastate.edu wrote:
  The changes to osgpreview.cpp are for the first issue, while the changes
  to
  utility.h are for the second way of solving the second issue.
  Ryan
 
  On Tue, May 24, 2011 at 12:59 PM, Javier Taibo javier.ta...@gmail.com
  wrote:
 
   Hi Ryan,
 
   Thank you for the patches. Can you send the whole files instead of
  patches, please? You can zip all files together to make it easy.
 
   Thank you!
 
 
   Best Regards,
 
 
  On Tue, May 24, 2011 at 7:28 PM, Ryan Pavlik rpav...@iastate.edu
  wrote:
   Hello all,
   I've attached small patches to two issues I've found with Maya2OSG.
   One allows it to build successfully with the current 2.8 branch -
   there
   are
   some manipulators not available in this branch so we just disable
   them
   by
   checking the osg version.
   The other issue was ambiguity in calling inTolerance, preventing me
   from
   building successfully on VC9 x64.  I solved this two different ways:
   take
   your pick of which way you prefer.
  
   I've made inTolerance a template function with a single parameter
   type
   and
   explicitly specified the template parameter in the one case.
   (fix-vc9-build)
   inTolerance is a template function with three parameter types, and
   static_casts all arguments to the type of the tolerance parameter
   before
   doing math.  This one doesn't require explicit template param
   specification,
   and seems more correct to me, or at least more explicit in how it
   works. I
   personally prefer this one. (alternate-fix-build)
  
   These patches were made against the latest svn trunk of maya2osg
   using
   tortoisesvn.
   Ryan
   --
   Ryan Pavlik
   HCI Graduate Student
   Virtual Reality Applications Center
   Iowa State University
  
   rpav...@iastate.edu
   http://academic.cleardefinition.com
  
   ___
   osg-users mailing list
   osg-users@lists.openscenegraph.org
  
  
   http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
 
 
 
  --
  Javier Taibo
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 
  --
  Ryan Pavlik
  HCI Graduate Student
  Virtual Reality Applications Center
  Iowa State University
 
  rpav...@iastate.edu
  http://academic.cleardefinition.com
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 



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



 --
 Ryan Pavlik
 HCI Graduate Student
 Virtual Reality Applications Center
 Iowa State University

 rpav...@iastate.edu
 http://academic.cleardefinition.com

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





-- 
Javier Taibo

Re: [osg-users] 2.8.5 wrappers and osgconv

2011-05-25 Thread Ryan Pavlik
On Tue, May 24, 2011 at 1:46 PM, Paul Martz pma...@skew-matrix.com wrote:

 Hi Ryan -- I just wanted to alert you that the 2.8 branch now contains some
 changes that will likely break the wrappers: Texture2DMultisample support
 (you'll probably need to add support for this new StateAttribute) and some
 changes to osgText. If you could provide updated wrappers, that would be
 great. Thanks!

 Also, you mentioned some additional changes to osgconv. I'm still waiting
 on those.

 The only other work to be done is the 3ds backport, and I understand that's
 in progress, so hopefully done soon.

 We're vary close to a release candidate.


I've updated the wrappers, and am running a test build overnight.  Will get
those to you soon.

Ryan

-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org