Re: [osg-users] Attaching Nodes (Characters & Objects)

2008-12-01 Thread Michael Bosse'
You could use a callback on the transform from the hand to update the
transform on the other node. The other way is to position the other
node under the hand in the hierarchy. The transforms of the other node
then become relative to the hand. You'd need to convert local to world
in order to do updates in the world frame but your goal of co-movement
would be achieved.

On Sun, Nov 30, 2008 at 5:06 PM, Ryan Morris <[EMAIL PROTECTED]> wrote:
> This is not a problem, i have solved the "moving two objects at once" issue.
> The problem is if I want to attach a node to a specific point on a second
> node (let's say a hand of an animated person), getting the hand and the
> other node to move as one during a walking sequence, etc. Any further
> clarification would be greatly appreciated!
>
> On Sun, Nov 30, 2008 at 8:18 AM, Robert Osfield <[EMAIL PROTECTED]>
> wrote:
>>
>> Hi Rusty,
>>
>> If you wish objects to move around together then typically you'd place
>> the objects all under the same transform.  Each local object might
>> have its own transform as well, or if required manually positioned in
>> the local coordinates.
>>
>> Robert.
>>
>> On Sun, Nov 30, 2008 at 4:09 PM, Ryan Morris <[EMAIL PROTECTED]>
>> wrote:
>> > Good morning OSG,
>> > I'm doing a little game programming and I am struggling with a way to
>> > attach
>> > a node to a specific point on another node.
>> > I know these could be manually prepositioned using a transform, but if
>> > the
>> > main node (our character) is animated how would I handle this?
>> > Hope someone can help! Thanks in advance!
>> >
>> > -Rusty
>> >
>> > ___
>> > 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
>
>



-- 
"It is only necessary to make war with five things: with the maladies
of the body, with the ignorances of the mind, with the passions of the
body, with the seditions of the city, with the discords of families."
- Tacitus

"The desire for safety stands against every great and noble
enterprise." - Tacitus

"Those who would give up essential liberty to purchase a little
temporary safety deserve neither liberty nor safety." - Benjamin
Franklin

"Numquam ponenda est pluralitas sine necessitate." - William of Ockham
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgswig and wxPython

2008-12-01 Thread Hartmut Seichter
Its hard to guess as you don't provide the whole example - all 
self.Refresh are commented out and its not clear if you use the wxApp 
OnIdle message pump for updates. The other example (osgviewerWX.py) in 
the repository might give you some pointers.


H


R Fritz wrote:
I've the beginnings of a simple light-fixture modeling component in 
wxPython and I am trying to use osgswig (2.2.0.1 version) as a base.  
I've started out by copying the file loading example which uses 
osgUtil.SceneView().  The code successfully loads the geometry of a 
lighting fixture (considering that this is done with readNodeFile 
that's not terribly surprising).  Unfortunately, thereafter I can't 
maneuver the view with the mouse.  Sometimes, I can't even find the 
fixture model.  I suspect I'm doing something dumb.  My code--almost 
the sample code--is attached--any ideas?  (Getting a newer version of 
osgswig would be nice, but as I've written here, I've run into build 
problems, and I would rather not spend the time chasing them down.)


Randolph

#!/usr/bin/env python

# import wxWidgets stuff
import wx
import wx.glcanvas

# import OpenSceneGraph wrapper
import osg
import osgUtil
import osgDB

class OSGLumView(wx.glcanvas.GLCanvas):
def __init__(self,parent,id):
wx.glcanvas.GLCanvas.__init__(self,parent,id)
sv = self.sceneview = osgUtil.SceneView()
self.rootnode = osg.MatrixTransformRef(osg.MatrixTransform())
sv.setSceneData(self.rootnode.get())

x,y = self.GetClientSize()

self.oldX = 0
self.oldY = 0

sv.setDefaults()

self.Bind(wx.EVT_SIZE, self.OnSize)
self.Bind(wx.EVT_PAINT, self.OnPaint)
self.Bind(wx.EVT_ERASE_BACKGROUND, self.OnEraseBackground)
self.Bind(wx.EVT_ENTER_WINDOW, self.OnEnterWindow)
self.Bind(wx.EVT_MOUSE_EVENTS, self.OnMouse)

sv.init()


def AddGeom(self, geom):
print "AddGeom"
self.rootnode.addChild(geom)
# self.Refresh(False)


def OnMouse(self, evt):
if ((evt.Dragging() == True) and (evt.LeftIsDown() == True)):
x = evt.GetX() - self.oldY
y = evt.GetY() - self.oldY

self.sceneview.setViewMatrixAsLookAt(
osg.Vec3f(0,y,x), osg.Vec3f(0,0,0), osg.Vec3f(0,1,0))

# self.Refresh(False)

self.oldX = evt.GetX()
self.oldY = evt.GetY()


if ((evt.Dragging() == True) and (evt.RightIsDown() == True)) :
m = self.rootnode.getMatrix()

x,y = self.GetClientSize()

rot = osg.Matrixd()

rot.makeRotate(self.oldX - evt.GetX(), osg.Vec3f(1,0,0))

m.postMult(rot)

# self.Refresh(False)

self.oldX = evt.GetX()
self.oldY = evt.GetY()

def Clear(self):
self.rootnode.removeChild(0,self.rootnode.getNumChildren())
# self.Refresh(False)


def OnEnterWindow(self, evt):
self.SetFocus()

def OnEraseBackground(self, evt):
pass

def OnSize(self, evt):
x,y = self.GetClientSize()
self.SetCurrent()
self.sceneview.setViewport(0,0,x,y)   
evt.Skip()



def OnPaint(self, evt):

if (0 == self.GetContext()) :
return

dc = wx.PaintDC(self)
self.SetCurrent()
self.sceneview.update()
self.sceneview.cull()
self.sceneview.draw()
self.SwapBuffers()
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
Hartmut Seichter, PhD (HKU), Dipl-Ing.(BUW), Postdoctoral Fellow, HITLabNZ

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


Re: [osg-users] bump mapping using GLSL shaders

2008-12-01 Thread Ümit Uzun
Hi Sukender,

I am only searching and trying to develop this project. For now it's not
commercial :)

I am looking OpenAL and after learning much of this API I look for osgAL and
try to implement. So If I have problem, absolutely I will ask for your help
:)

For developing osgAudio I may help as much as I can do, but I am not prof as
you guess. For now we can only wait a hero to be leader for save this API :)

Thanks so much for everyting.

Regards.

2008/11/30 Sukender <[EMAIL PROTECTED]>

> Hi Ümit,
>
> When you need some hints about what I already did, then just ask me! And if
> you need big portions of code, just go ahead (I saw your project is GPL,
> right?).
>
> About osgAudio, I'm terrobly sorry, but if I'm alone I won't be the one
> that will design and code osgAudio. I really need that EVERYONE that want to
> see osgAudio work together. If you want I can give you hints on haow to
> include the existing osgAL to your project, but not much more.
>
> Sukender
> PVLE - Lightweight cross-platform game engine -
> http://pvle.sourceforge.net/
>
>
> Le Fri, 28 Nov 2008 08:15:41 +0100, Ümit Uzun <[EMAIL PROTECTED]> a
> écrit:
>
> > Hi Sukender,
> >
> >>>- Use an image sequence of normal maps, that has the advantage of being
> almost the same code as for >>a non animated bump.
> >>>- Or look at (procedural) shaders, that will have the advantage of not
> taking memory for textures, even if >>you want a very smooth animation.
> >
> > Actually I will mix of two, I create one normal map from wave texture and
> > then animate on the water surface by changing texture coordinates so it
> can
> > be seen moving and waving water surface.
> >
> > I will try as soon as possible but now I will look at OpenAL for couple
> of
> > weeks :) I need sounds as you. I think you use osgAL on your project but
> I
> > will try to use OpenAL till the osgAudio is released. I am waiting 2.10
> > release with hoping osgAudio nodekit :)
> >
> >>>Just for curiosity: what are you working on?
> > I am trying to create submarine simulator but I am naive on this topic :)
> I
> > am learning GLSL and OpenGL. For now I want to create water simuation as
> you
> > can see from http://dangerdeep.sourceforge.net/ But it is too hard for
> me at
> > the present.
> >
> > Best Regards.
> >
> > 2008/11/27 Sukender <[EMAIL PROTECTED]>
> >
> >> Hi Ümit,
> >>
> >> Considering you want to *animate* your bump/normal map, you may:
> >> - Use an image sequence of normal maps, that has the advantage of being
> >> almost the same code as for a non animated bump.
> >> - Or look at (procedural) shaders, that will have the advantage of not
> >> taking memory for textures, even if you want a very smooth animation.
> >>
> >> I just can't help you for shaders because I don't know anything about
> them.
> >> Try searching the web.
> >>
> >> For non animated bumps, well maybe many wrote examples or code using it
> but
> >> I can't indicate you where.
> >> For my part, I used a bump for the loading screen of a tiny game: the
> bump
> >> is loaded from a gray-scale, then converted to a normal map using my
> >> function, applied to a quad, and then modulated by the color texture.
> The
> >> light source then moves during the loading process. The code can be
> found at
> >>
> >>
> http://paratrooper.svn.sourceforge.net/viewvc/paratrooper/trunk/Src/App.cpp?view=markup(searchfor
>  "TexEnvCombine::DOT3_RGB" and you'll find a block of code about
> >> the "logo"). Code is GPL, but as long as you just take a few lines,
> there's
> >> no problem for me using it the way you want.
> >> Once it works for you, you'll be able to replace the texture by an image
> >> sequence.
> >>
> >> However, you should try to have a look to shaders. If you find or
> acheive
> >> to write a nice animation, please tell me!
> >>
> >> Hope it helps.
> >>
> >> Just for curiosity: what are you working on?
> >>
> >> Sukender
> >> PVLE - Lightweight cross-platform game engine -
> >> http://pvle.sourceforge.net/
> >>
> >>
> >> Le Thu, 27 Nov 2008 08:27:53 +0100, Ümit Uzun <[EMAIL PROTECTED]> a
> >> écrit:
> >>
> >> > Hi Sukender,
> >> >
> >> > Thanks for reply. Sorry I can't express my expected result because of
> my
> >> > english :P Yes you understood me albeit my bad express. I have RGB
> >> texture
> >> > and want to create bump map animated surface to make more realistic
> >> surface.
> >> > I find normal map usage only osgVolume.cpp sample. If you know more
> >> sample,
> >> > please let me know.
> >> >
> >> > Thanks for helps.
> >> > Best Regards.
> >> >
> >> > 2008/11/27 Sukender <[EMAIL PROTECTED]>
> >> >
> >> >> Hi Ümit,
> >> >>
> >> >> Err... I'm terribly sorry but I did not understood all of what you
> >> wrote...
> >> >> (maybe my english?)
> >> >>
> >> >> What do you call "Ocean wave texture"? Is that simply the RGB texture
> >> >> describing the color of your ocean's surface? If so, then the co

Re: [osg-users] Little ray-tracing example using the KD-tree

2008-12-01 Thread Sukender
Hmmm... Interesting! Well I won't use it in a near future, but maybe later?
Thanks.

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/


Le Sun, 30 Nov 2008 19:30:06 +0100, [EMAIL PROTECTED] <[EMAIL PROTECTED]> a 
écrit:

> hi list and ray-tracing fans ;)
>
> Toward A Multicore Architecture for Real-time Ray-tracing
> http://www-csl.csres.utexas.edu/gps/publications/
>
> best regards
> ___
> 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] osgAudio / openAL

2008-12-01 Thread Sukender
Thank you for these precisions. I just hope OpenAL-Soft will support more 
platforms, since "standard" OpenAL developpment seems to be completely stalled. 
I contacted OpenAL-Soft's author for minor midifications, and I'll send him 
another mail about what you say.
Thanks again.

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/


Le Mon, 01 Dec 2008 02:36:28 +0100, Jason Daly <[EMAIL PROTECTED]> a écrit:

> Sukender wrote:
>> Many thanks! I always wonder what OpenAL-Soft was, but I never took a look 
>> at it... I'm going to recompile all my dependencies using it (if possible).
>> So I think the "OSG audio" would depend on it rather than on the "original" 
>> OpenAL, don't you think?
>>
>
> Yes.  The OpenAL-Sample directory is effectively deprecated.
> OpenAL-Soft is providing the cross-platform sample implementation now.
> The only hang-up with OSG might be that there isn't a backend for some
> of the platforms that OSG supports (IRIX, for one).  Also, OSX might
> need to rely on the implementation provided by Apple (I'm not sure if
> OpenAL-Soft supports it).
>
> --"J"
>
> ___
> 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] Interoparability and optional dependencies

2008-12-01 Thread Sukender
Hi Robert, hi everyone,

Abstract (If you don't have time to read all the mail!): Some dependencies may 
be added to OSG when users manually compile OSG with CMake. This would be a 
strictly optional feature that would not be included in precompiled packages. 
Examples: boost ref pointers, boost paths, etc.


Detail:
I know core OSG should not have dependencies other than critical ones, but what 
about *optional* dependencies?
I explain myself... I mainly think about boost, but this may be applied to 
more. The idea is that some portions of code *may* use dependencies that the 
user chooses while executing the CMake script. But precompiled packackes would 
*NEVER* use such dependencies (or else this would be a custom package).

Take this example: file and directories paths. All methods using paths should 
be written like this:
void readNodeFile(osg::Path & filePath);

Then, in  header would be found something like:
#ifdef OSG_USE_BOOST_FILESYSTEM

#include 
namespace osg {
typedef boost::filesystem::path Path;
}

#else

#include 
namespace osg {
typedef std::string Path;
}
#endif// OSG_USE_BOOST_FILESYSTEM


An option that defines "OSG_USE_BOOST_FILESYSTEM" may then be found in the 
CMake, and should be turned OFF by default (and marked as "advanced"). Of 
course we would also have "BOOST_INCLUDE" and "BOOST_LIB"-like variables, 
created by the FindBoost standard module.

Advantages:
- Users using use boost::filesystem in their project would benefit from it into 
OSG.
- It increases the interoperability with other libraries, since the user would 
not have to write method overloads that might create compile errors (try 
calling an osgDB::readNodeFile(boost::filesystem::path &) overload giving it a 
std::string and and you'll get a "ambiguous call" error).
- Methods using paths would be clearer (as a path is not necessarily a string).

Drawbacks:
- It needs a little tweak in the CMake.
- Well, I don't see more drawbacks (As this would be a strictly optional 
feature, used and maintained by those who use it).

Other options like these may be included by users that want to use some 
dependencies, such as boost ref pointers (As it has been discussed before). 
These optional features would benefit other users.

About using boost::filesystem, I can write the code and send it to 
osg-submissions. I just wait for authorization.

All users are invited to post suggestions about this!
Thanks for reading!

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Request for testing Collada/dae plugin changes

2008-12-01 Thread Serge Lages
Hi Roland,

I've made an update and I am trying to build the Collada plugin (under WinXP
using VS8), I first noticed that you've added some dependencies to it for
the dynamic build :

libxml2 pcrecpp-d pcre-d

I was wondering why do you ask for pcrecpp-d and pcre-d ? It's the debug
versions of the libs, should it be better to ask for pcre.lib and
pcrecpp.lib ?

On Mon, Nov 24, 2008 at 4:28 PM, Smeenk, R.J.M. (Roland) <
[EMAIL PROTECTED]> wrote:

>  Hello osg-users,
>
> Robert just merged my changes for the Collada/dae plugin as posted on
> osg-submission:
>
> http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/2008-November/002883.html
>
> You are kindly invited to test the improved plugin.
>
> --
> Roland
>
> This e-mail and its contents are subject to the DISCLAIMER at 
> http://www.tno.nl/disclaimer/email.html
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Request for testing Collada/dae plugin changes

2008-12-01 Thread Smeenk, R.J.M. (Roland)
Serge,
 
I just changed the CMake files so I could develop the dae plugin in
debug mode with a statically linked DOM.
The CMake files still need to be changed so the user may specify the
location of these dependencies (both debug and releas) by hand. Another
possibility would be to automatically use the external-libs in the
Collada DOM directory. 
 
--
Roland




From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Serge
Lages
Sent: maandag 1 december 2008 11:03
To: OpenSceneGraph Users
Subject: Re: [osg-users] Request for testing Collada/dae plugin
changes


Hi Roland,

I've made an update and I am trying to build the Collada plugin
(under WinXP using VS8), I first noticed that you've added some
dependencies to it for the dynamic build :

libxml2 pcrecpp-d pcre-d

I was wondering why do you ask for pcrecpp-d and pcre-d ? It's
the debug versions of the libs, should it be better to ask for pcre.lib
and pcrecpp.lib ?


On Mon, Nov 24, 2008 at 4:28 PM, Smeenk, R.J.M. (Roland)
<[EMAIL PROTECTED]> wrote:


Hello osg-users,
 
Robert just merged my changes for the Collada/dae plugin
as posted on osg-submission:

http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph
.org/2008-November/002883.html
 
You are kindly invited to test the improved plugin.
 
--
Roland
This e-mail and its contents are subject to the
DISCLAIMER at http://www.tno.nl/disclaimer/email.html

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

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






-- 
Serge Lages
http://www.tharsis-software.com


This e-mail and its contents are subject to the DISCLAIMER at 
http://www.tno.nl/disclaimer/email.html
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Request for testing Collada/dae plugin changes

2008-12-01 Thread Serge Lages
If I link the DOM dynamically I don't need to set these targets here, right
? (like in the previous version of the CMakeList.txt)

I am also having links errors like that :

2>daeReader.obj : error LNK2019: unresolved external symbol "char const *
const COLLADA_TYPE_INSTANCE_RIGID_BODY"
(?COLLADA_TYPE_INSTANCE_RIGID_BODY@@3PBDB)
referenced in function "public: bool __thiscall
osgdae::daeReader::convert(class std::basic_string,class std::allocator > const &)"
([EMAIL PROTECTED]@osgdae@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@
@[EMAIL PROTECTED]@2@@std@@@Z)

I'll try to update my DOM to see if it works, it still depends on the 1.4.1
version, not the 1.5 ?

On Mon, Dec 1, 2008 at 11:13 AM, Smeenk, R.J.M. (Roland) <
[EMAIL PROTECTED]> wrote:

>  Serge,
>
> I just changed the CMake files so I could develop the dae plugin in debug
> mode with a statically linked DOM.
> The CMake files still need to be changed so the user may specify the
> location of these dependencies (both debug and releas) by hand. Another
> possibility would be to automatically use the external-libs in the Collada
> DOM directory.
>
> --
> Roland
>
>  --
> *From:* [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] *On Behalf Of *Serge Lages
> *Sent:* maandag 1 december 2008 11:03
> *To:* OpenSceneGraph Users
> *Subject:* Re: [osg-users] Request for testing Collada/dae plugin changes
>
> Hi Roland,
>
> I've made an update and I am trying to build the Collada plugin (under
> WinXP using VS8), I first noticed that you've added some dependencies to it
> for the dynamic build :
>
> libxml2 pcrecpp-d pcre-d
>
> I was wondering why do you ask for pcrecpp-d and pcre-d ? It's the debug
> versions of the libs, should it be better to ask for pcre.lib and
> pcrecpp.lib ?
>
> On Mon, Nov 24, 2008 at 4:28 PM, Smeenk, R.J.M. (Roland) <
> [EMAIL PROTECTED]> wrote:
>
>>  Hello osg-users,
>>
>> Robert just merged my changes for the Collada/dae plugin as posted on
>> osg-submission:
>>
>> http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/2008-November/002883.html
>>
>> You are kindly invited to test the improved plugin.
>>
>> --
>> Roland
>>
>> This e-mail and its contents are subject to the DISCLAIMER at 
>> http://www.tno.nl/disclaimer/email.html
>>
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
>
> --
> Serge Lages
> http://www.tharsis-software.com
>
> This e-mail and its contents are subject to the DISCLAIMER at 
> http://www.tno.nl/disclaimer/email.html
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Request for testing Collada/dae plugin changes

2008-12-01 Thread Smeenk, R.J.M. (Roland)
 
If I link the DOM dynamically I don't need to set these targets here,
right ? (like in the previous version of the CMakeList.txt) 
 
Hmm, not sure. 

I am also having links errors like that :

2>daeReader.obj : error LNK2019: unresolved external symbol "char const
* const COLLADA_TYPE_INSTANCE_RIGID_BODY"
(?COLLADA_TYPE_INSTANCE_RIGID_BODY@@3PBDB) referenced in function
"public: bool __thiscall osgdae::daeReader::convert(class
std::basic_string,class
std::allocator > const &)"
([EMAIL PROTECTED]@osgdae@@[EMAIL PROTECTED]@[EMAIL PROTECTED]
@@[EMAIL PROTECTED]@2@@std@@@Z)
 
Linking statically solved this for me.
 
I'll try to update my DOM to see if it works, it still depends on the
1.4.1 version, not the 1.5 ?
 
The plugin is still using DOM 2.1 that supports Collada version 1.4.1
An official DOM for Collada 1.5 is not released yet and I don't think we
want to use the SVN Head for 1.5 support. 
 
--
Roland 

On Mon, Dec 1, 2008 at 11:13 AM, Smeenk, R.J.M. (Roland)
<[EMAIL PROTECTED]> wrote:


Serge,
 
I just changed the CMake files so I could develop the
dae plugin in debug mode with a statically linked DOM.
The CMake files still need to be changed so the user may
specify the location of these dependencies (both debug and releas) by
hand. Another possibility would be to automatically use the
external-libs in the Collada DOM directory. 
 
--
Roland




From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Serge
Lages
Sent: maandag 1 december 2008 11:03
To: OpenSceneGraph Users
Subject: Re: [osg-users] Request for testing
Collada/dae plugin changes


Hi Roland,

I've made an update and I am trying to build the
Collada plugin (under WinXP using VS8), I first noticed that you've
added some dependencies to it for the dynamic build :

libxml2 pcrecpp-d pcre-d

I was wondering why do you ask for pcrecpp-d and
pcre-d ? It's the debug versions of the libs, should it be better to ask
for pcre.lib and pcrecpp.lib ?


On Mon, Nov 24, 2008 at 4:28 PM, Smeenk, R.J.M.
(Roland) <[EMAIL PROTECTED]> wrote:


Hello osg-users,
 
Robert just merged my changes for the
Collada/dae plugin as posted on osg-submission:

http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph
.org/2008-November/002883.html
 
You are kindly invited to test the
improved plugin.
 
--
Roland
This e-mail and its contents are subject
to the DISCLAIMER at http://www.tno.nl/disclaimer/email.html


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

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






-- 
Serge Lages
http://www.tharsis-software.com


This e-mail and its contents are subject to the
DISCLAIMER at http://www.tno.nl/disclaimer/email.html

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

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






-- 
Serge Lages
http://www.tharsis-software.com


This e-mail and its contents are subject to the DISCLAIMER at 
http://www.tno.nl/disclaimer/email.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-12-01 Thread Serge Lages
Hi all,

I am having a problem compiling osgAnimation (under WinXP with VS8 SP1), I
need to add OpenThreads to the LINK_INTERNAL libs to get it build properly
(into its CMakeList.txt file), without that I have link errors, is it
normal, or I am missing something ?


On Fri, Nov 28, 2008 at 11:02 PM, Cedric Pinson <[EMAIL PROTECTED]>wrote:

> 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] >
>>
>>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
>> 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
>>
>>
>
> --
> +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
>



-- 
Serge Lages
http://www.tharsis-software.com
___
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-12-01 Thread Vincent Bourdier
Hi,

I just make a little update :

I don't remember (and I don't find) what is the order of the elements to
render...

It seems to be :
1.skybox
2.transparent elements
3.orther

isn't it ?

Thanks,

Regards,
  Vincent.

2008/11/28 Vincent Bourdier <[EMAIL PROTECTED]>

> 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.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_ptr 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_ptr 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
>>
>>
>
<>___
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-12-01 Thread Paul Melis

Vincent Bourdier wrote:

Hi,

I just make a little update :

I don't remember (and I don't find) what is the order of the elements 
to render...


It seems to be :
1.skybox
2.transparent elements
3.orther

I would say
1. skybox
2. opaque geometry
3. transparent geometry in depth-sorted order

Assuming you skybox is opaque (which it probably is) you can also draw 
it in 2.


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


Re: [osg-users] Request for testing Collada/dae plugin changes

2008-12-01 Thread Serge Lages
On Mon, Dec 1, 2008 at 11:31 AM, Smeenk, R.J.M. (Roland) <
[EMAIL PROTECTED]> wrote:

>
> If I link the DOM dynamically I don't need to set these targets here, right
> ? (like in the previous version of the CMakeList.txt)
>
> Hmm, not sure.
>
> I am also having links errors like that :
>
> 2>daeReader.obj : error LNK2019: unresolved external symbol "char const *
> const COLLADA_TYPE_INSTANCE_RIGID_BODY" 
> (?COLLADA_TYPE_INSTANCE_RIGID_BODY@@3PBDB)
> referenced in function "public: bool __thiscall
> osgdae::daeReader::convert(class std::basic_string std::char_traits,class std::allocator > const &)"
> ([EMAIL PROTECTED]@osgdae@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@
> @[EMAIL PROTECTED]@2@@std@@@Z)
>
> Linking statically solved this for me.
>
>

Erf... But if I don't want to link statically, there's no solution ?


>
> I'll try to update my DOM to see if it works, it still depends on the 1.4.1
> version, not the 1.5 ?
>
> The plugin is still using DOM 2.1 that supports Collada version 1.4.1
> An official DOM for Collada 1.5 is not released yet and I don't think we
> want to use the SVN Head for 1.5 support.
>
>

Ok, so I have the correct version, I'll compile the static version of the
DOM.
If we don't have any solution for the dynamic version of the library, we
should add a note to say that the static version is needed to build the
plugin.

-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg::Viewport doubles???

2008-12-01 Thread Robert Osfield
Hi Art,

I think floats should be OK.  I'll need to review the API to see about
compatibility issues.

Robert.

On Sun, Nov 30, 2008 at 6:54 PM, Art Tevs <[EMAIL PROTECTED]> wrote:
> OK,
>
> I've tested now different cases and found out that the best way is to change 
> the double into float in the osg::Viewport. I think the precision given by 
> floats is big enough for any viewport computation. Using of float will also 
> reduce the run overhead required for handling with doubles on a 32bit system. 
> Even more; cuda compiled applications doesn't read out any nonsense values 
> out of viewports anymore.
> Hence I propose to use floats there instead of doubles. Or maybe use doubles 
> only if compiled for 64 bits.
>
> What do you think about that, Robert?
>
> Art
>
>
>
> --- Art Tevs <[EMAIL PROTECTED]> schrieb am So, 30.11.2008:
>
>> Von: Art Tevs <[EMAIL PROTECTED]>
>> Betreff: Re: [osg-users] osg::Viewport doubles???
>> An: "OpenSceneGraph Users" 
>> Datum: Sonntag, 30. November 2008, 18:06
>> Hi Robert,
>>
>> OK, I see, however I ran into troubles using CUDA together
>> with doubles in viewports. The problem is that CUDA compiler
>> invokes gcc with -malign-double parameter, which isn't
>> the same as for osg. Hence whenever I want to access the
>> values of a viewport in a CUDA code (actually C-code
>> compiled with gcc by cuda compiler) I am not able to get
>> proper values out of it. Hence one of the applications
>> (either CUDA compiler ;) ) or OSG has to go in the direction
>> of the other by either removing -malign-doubles (which I
>> think wouldn't be done so easyly) or by adding this
>> parameter to OSG compilation. However the second case
>> isn't also a good solution, I think.
>>
>> I tried to implement the viewport with int and it works
>> fine. I think also using floats instead of doubles would be
>> also fine (because no alignment is needed). Currently I am
>> checking the case with float and also want to try to compile
>> osg with -malign-doubles. Let see if it does help. I would
>> let you know more soon...
>>
>> Art
>>
>> --- Robert Osfield <[EMAIL PROTECTED]> schrieb
>> am So, 30.11.2008:
>>
>> > Von: Robert Osfield <[EMAIL PROTECTED]>
>> > Betreff: Re: [osg-users] osg::Viewport doubles???
>> > An: [EMAIL PROTECTED], "OpenSceneGraph
>> Users" 
>> > Datum: Sonntag, 30. November 2008, 17:17
>> > Hi Art,
>> >
>> > On Sun, Nov 30, 2008 at 3:59 PM, Art Tevs
>> > <[EMAIL PROTECTED]> wrote:
>> > > Shouldn't then the method, which scales the
>> > viewport, take care of casting?
>> > > Because based on OpenGL Specification viewport is
>> per
>> > definition an integer value.
>> >
>> > Not quite, it's not about passing data to OpenGL,
>> > it's about handling
>> > resizing down and back up again of viewports, if you
>> do
>> > this with
>> > int's then you can never recover the original size
>> of
>> > the viewport
>> > because of rounding.
>> >
>> > Robert.
>>
>>
>>
>> ___
>> 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] problem with GPU draw time

2008-12-01 Thread Robert Osfield
Hi Forest,

The GPU draw time is the time that all OpenGL commands take to run
down on the GPU.  If your application is GPU bound then the total CPU
times will typically be less than your GPU times.  You'll bee GPU
bound if you are using lots of fill/overloading the memory/overly
complex shaders.

Robert.

2008/12/1 forest37 <[EMAIL PROTECTED]>:
>  hi all,
> I am confused about the GPU draw time,I mean if the GPU draw time is
> longer than the UPDATE+CULL+DRAW(dispatch) time,what will happen?Is there
> any code control  this?
> best regards
> forest
>
>
> 
> [广告] 金秋最关注楼盘-房不胜房
> ___
> 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] antialiasing with mfc

2008-12-01 Thread Robert Osfield
Hi Forest,

The DisplaySettings is just a hint to the code that sets up the
graphics window what is required.  osgViewer::GraphicsWindow*
implementations all honour this hint.  It looks like osgviewerMFC
isn't.  Go have a look at the GraphicsWindowWin32 implementation to
see how to set up multi-sample visuals under Windows.

Robert.

2008/12/1 forest37 <[EMAIL PROTECTED]>:
>  hi all,
> I use codes like this to antialiase :
> osg::DisplaySettings* ds = osg::DisplaySettings::instance();
>  ds->setNumMultiSamples(16);
>  mViewer->setDisplaySettings(ds);
>
>   It works well in console program(full screen).when I add the codes to the
> osgviewrMFC program,it doesn't work well.why?
>
> thanks for any hint.
> best regards
>
> forest
>
> 
> [广告] 金秋最关注楼盘-房不胜房
> ___
> 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-12-01 Thread Robert Osfield
Hi Serge,

It looks some compilers don't have a problem with OpenThreads not
being on the lists, while others do.  I've just added OpenThreads to
the LINE_INTERNAL list and checked it in.

Robert.

On Mon, Dec 1, 2008 at 10:35 AM, Serge Lages <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I am having a problem compiling osgAnimation (under WinXP with VS8 SP1), I
> need to add OpenThreads to the LINK_INTERNAL libs to get it build properly
> (into its CMakeList.txt file), without that I have link errors, is it
> normal, or I am missing something ?
>
>
> On Fri, Nov 28, 2008 at 11:02 PM, Cedric Pinson <[EMAIL PROTECTED]>
> wrote:
>>
>> 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] >
>>>
>>>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
>>> 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
>>>
>>
>> --
>> +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
>
>
>
> --
> Serge Lages
> http://www.tharsis-software.com
>
> ___
> 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] multiple views on separate Qt widgets

2008-12-01 Thread Richard Baron Penman
hi Robert,

I've tried both methods used in the example and got both working for a
single view, but not for multiple.
The problem seems to be with having separate timeout loops calling
composite_viewer->frame(). Is there an alternative way to render a view?

Richard


On Mon, Dec 1, 2008 at 10:00 PM, Robert Osfield <[EMAIL PROTECTED]>wrote:

> Hi Richard,
>
> You don't mention how you are actually implementing the link between
> OSG and QT, are you using GraphicsWindowEmbedded or using the window
> inheritance of osgViewer.  The GraphicsWindowEmbedded route is very
> restricted as it's simplicity hides all the
> makeCurrent/releaseContext/swapBuffer functionality that a fully
> threaded/multi-context viewer requires.
>
> Robert.
>
> On Mon, Dec 1, 2008 at 1:09 AM, Richard Baron Penman
> <[EMAIL PROTECTED] <[EMAIL PROTECTED]>> wrote:
> > hello,
> >
> > I am trying to provide multiple views of an OpenSceneGraph scene within a
> Qt
> > window.
> > I can get this working for a single view, or multiple views in the same
> > widget like in the osgviewerQT composite example. But I'm struggling to
> get
> > multiple views on separate widgets working.
> >
> > I know many variations of this question have been asked:
> >
> http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg08512.html
> >
> http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg04883.html
> >
> http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg05487.html
> >
> http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg16623.html
> > etc
> >
> > But I am still not clear how to render each view. The examples use
> > composite_viewer->frame() in the paint event but for me this only renders
> a
> > single view and leaves the rest blank.
> > Is there an alternative way to render multiple views at the same time?
> >
> > Richard
> >
> > ___
> > 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] Interoparability and optional dependencies

2008-12-01 Thread Robert Osfield
Hi Sukender,

I don't feel this suggestion is appropriate for the OSG.  Adaption of
external data structures is a better route that directly integrating
and then using optional compilation to weave a route.

Robert.

On Mon, Dec 1, 2008 at 9:59 AM, Sukender <[EMAIL PROTECTED]> wrote:
> Hi Robert, hi everyone,
>
> Abstract (If you don't have time to read all the mail!): Some dependencies 
> may be added to OSG when users manually compile OSG with CMake. This would be 
> a strictly optional feature that would not be included in precompiled 
> packages. Examples: boost ref pointers, boost paths, etc.
>
>
> Detail:
> I know core OSG should not have dependencies other than critical ones, but 
> what about *optional* dependencies?
> I explain myself... I mainly think about boost, but this may be applied to 
> more. The idea is that some portions of code *may* use dependencies that the 
> user chooses while executing the CMake script. But precompiled packackes 
> would *NEVER* use such dependencies (or else this would be a custom package).
>
> Take this example: file and directories paths. All methods using paths should 
> be written like this:
>void readNodeFile(osg::Path & filePath);
>
> Then, in  header would be found something like:
>#ifdef OSG_USE_BOOST_FILESYSTEM
>
>#include 
>namespace osg {
>typedef boost::filesystem::path Path;
>}
>
>#else
>
>#include 
>namespace osg {
>typedef std::string Path;
>}
>#endif// OSG_USE_BOOST_FILESYSTEM
>
>
> An option that defines "OSG_USE_BOOST_FILESYSTEM" may then be found in the 
> CMake, and should be turned OFF by default (and marked as "advanced"). Of 
> course we would also have "BOOST_INCLUDE" and "BOOST_LIB"-like variables, 
> created by the FindBoost standard module.
>
> Advantages:
> - Users using use boost::filesystem in their project would benefit from it 
> into OSG.
> - It increases the interoperability with other libraries, since the user 
> would not have to write method overloads that might create compile errors 
> (try calling an osgDB::readNodeFile(boost::filesystem::path &) overload 
> giving it a std::string and and you'll get a "ambiguous call" error).
> - Methods using paths would be clearer (as a path is not necessarily a 
> string).
>
> Drawbacks:
> - It needs a little tweak in the CMake.
> - Well, I don't see more drawbacks (As this would be a strictly optional 
> feature, used and maintained by those who use it).
>
> Other options like these may be included by users that want to use some 
> dependencies, such as boost ref pointers (As it has been discussed before). 
> These optional features would benefit other users.
>
> About using boost::filesystem, I can write the code and send it to 
> osg-submissions. I just wait for authorization.
>
> All users are invited to post suggestions about this!
> Thanks for reading!
>
> Sukender
> PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
> ___
> 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] multiple views on separate Qt widgets

2008-12-01 Thread Robert Osfield
Hi Richard,

The osgViewer:::CompositeViewer/Viewer architecture is designed to
support one frame loop driving all the windows associated with that
viewer, not multiple places trying to dispatch frame().   So you use a
single timer.  Or use multiple viewers.

Robert.

On Mon, Dec 1, 2008 at 11:16 AM, Richard Baron Penman
<[EMAIL PROTECTED]> wrote:
> hi Robert,
>
> I've tried both methods used in the example and got both working for a
> single view, but not for multiple.
> The problem seems to be with having separate timeout loops calling
> composite_viewer->frame(). Is there an alternative way to render a view?
>
> Richard
>
>
> On Mon, Dec 1, 2008 at 10:00 PM, Robert Osfield <[EMAIL PROTECTED]>
> wrote:
>>
>> Hi Richard,
>>
>> You don't mention how you are actually implementing the link between
>> OSG and QT, are you using GraphicsWindowEmbedded or using the window
>> inheritance of osgViewer.  The GraphicsWindowEmbedded route is very
>> restricted as it's simplicity hides all the
>> makeCurrent/releaseContext/swapBuffer functionality that a fully
>> threaded/multi-context viewer requires.
>>
>> Robert.
>>
>> On Mon, Dec 1, 2008 at 1:09 AM, Richard Baron Penman
>> <[EMAIL PROTECTED]> wrote:
>> > hello,
>> >
>> > I am trying to provide multiple views of an OpenSceneGraph scene within
>> > a Qt
>> > window.
>> > I can get this working for a single view, or multiple views in the same
>> > widget like in the osgviewerQT composite example. But I'm struggling to
>> > get
>> > multiple views on separate widgets working.
>> >
>> > I know many variations of this question have been asked:
>> >
>> > http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg08512.html
>> >
>> > http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg04883.html
>> >
>> > http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg05487.html
>> >
>> > http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg16623.html
>> > etc
>> >
>> > But I am still not clear how to render each view. The examples use
>> > composite_viewer->frame() in the paint event but for me this only
>> > renders a
>> > single view and leaves the rest blank.
>> > Is there an alternative way to render multiple views at the same time?
>> >
>> > Richard
>> >
>> > ___
>> > 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] Interoparability and optional dependencies

2008-12-01 Thread Robert Osfield
Hi Sukender,

On Mon, Dec 1, 2008 at 11:18 AM, Sukender <[EMAIL PROTECTED]> wrote:
> Alright then. I guess adopting a kind of Path structure is not on the agenda, 
> or is it? :)
> Thank your for answering.

Adding boost dependencies to the core, even an optional build one, is
not something I'm going to accept for inclusion into the core OSG.

Major external dependencies are only inclined into the OSG when they
are encapsulated as a plugin or its own module.

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


Re: [osg-users] multiple views on separate Qt widgets

2008-12-01 Thread Robert Osfield
Hi Richard,

You don't mention how you are actually implementing the link between
OSG and QT, are you using GraphicsWindowEmbedded or using the window
inheritance of osgViewer.  The GraphicsWindowEmbedded route is very
restricted as it's simplicity hides all the
makeCurrent/releaseContext/swapBuffer functionality that a fully
threaded/multi-context viewer requires.

Robert.

On Mon, Dec 1, 2008 at 1:09 AM, Richard Baron Penman
<[EMAIL PROTECTED]> wrote:
> hello,
>
> I am trying to provide multiple views of an OpenSceneGraph scene within a Qt
> window.
> I can get this working for a single view, or multiple views in the same
> widget like in the osgviewerQT composite example. But I'm struggling to get
> multiple views on separate widgets working.
>
> I know many variations of this question have been asked:
> http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg08512.html
> http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg04883.html
> http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg05487.html
> http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg16623.html
> etc
>
> But I am still not clear how to render each view. The examples use
> composite_viewer->frame() in the paint event but for me this only renders a
> single view and leaves the rest blank.
> Is there an alternative way to render multiple views at the same time?
>
> Richard
>
> ___
> 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] Interoparability and optional dependencies

2008-12-01 Thread Sukender
Alright then. I guess adopting a kind of Path structure is not on the agenda, 
or is it? :)
Thank your for answering.

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/


Le Mon, 01 Dec 2008 12:12:12 +0100, Robert Osfield <[EMAIL PROTECTED]> a écrit:

> Hi Sukender,
>
> I don't feel this suggestion is appropriate for the OSG.  Adaption of
> external data structures is a better route that directly integrating
> and then using optional compilation to weave a route.
>
> Robert.
>
> On Mon, Dec 1, 2008 at 9:59 AM, Sukender <[EMAIL PROTECTED]> wrote:
>> Hi Robert, hi everyone,
>>
>> Abstract (If you don't have time to read all the mail!): Some dependencies 
>> may be added to OSG when users manually compile OSG with CMake. This would 
>> be a strictly optional feature that would not be included in precompiled 
>> packages. Examples: boost ref pointers, boost paths, etc.
>>
>>
>> Detail:
>> I know core OSG should not have dependencies other than critical ones, but 
>> what about *optional* dependencies?
>> I explain myself... I mainly think about boost, but this may be applied to 
>> more. The idea is that some portions of code *may* use dependencies that the 
>> user chooses while executing the CMake script. But precompiled packackes 
>> would *NEVER* use such dependencies (or else this would be a custom package).
>>
>> Take this example: file and directories paths. All methods using paths 
>> should be written like this:
>>void readNodeFile(osg::Path & filePath);
>>
>> Then, in  header would be found something like:
>>#ifdef OSG_USE_BOOST_FILESYSTEM
>>
>>#include 
>>namespace osg {
>>typedef boost::filesystem::path Path;
>>}
>>
>>#else
>>
>>#include 
>>namespace osg {
>>typedef std::string Path;
>>}
>>#endif// OSG_USE_BOOST_FILESYSTEM
>>
>>
>> An option that defines "OSG_USE_BOOST_FILESYSTEM" may then be found in the 
>> CMake, and should be turned OFF by default (and marked as "advanced"). Of 
>> course we would also have "BOOST_INCLUDE" and "BOOST_LIB"-like variables, 
>> created by the FindBoost standard module.
>>
>> Advantages:
>> - Users using use boost::filesystem in their project would benefit from it 
>> into OSG.
>> - It increases the interoperability with other libraries, since the user 
>> would not have to write method overloads that might create compile errors 
>> (try calling an osgDB::readNodeFile(boost::filesystem::path &) overload 
>> giving it a std::string and and you'll get a "ambiguous call" error).
>> - Methods using paths would be clearer (as a path is not necessarily a 
>> string).
>>
>> Drawbacks:
>> - It needs a little tweak in the CMake.
>> - Well, I don't see more drawbacks (As this would be a strictly optional 
>> feature, used and maintained by those who use it).
>>
>> Other options like these may be included by users that want to use some 
>> dependencies, such as boost ref pointers (As it has been discussed before). 
>> These optional features would benefit other users.
>>
>> About using boost::filesystem, I can write the code and send it to 
>> osg-submissions. I just wait for authorization.
>>
>> All users are invited to post suggestions about this!
>> Thanks for reading!
>>
>> Sukender
>> PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
>> ___
>> 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] Interoparability and optional dependencies

2008-12-01 Thread J.P. Delport

Hi,

Sukender wrote:

Alright then. I guess adopting a kind of Path structure is not on the agenda, 
or is it? :)

What exactly do you mean by path structure? Search path?

jp


Thank your for answering.

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/


Le Mon, 01 Dec 2008 12:12:12 +0100, Robert Osfield <[EMAIL PROTECTED]> a écrit:


Hi Sukender,

I don't feel this suggestion is appropriate for the OSG.  Adaption of
external data structures is a better route that directly integrating
and then using optional compilation to weave a route.

Robert.

On Mon, Dec 1, 2008 at 9:59 AM, Sukender <[EMAIL PROTECTED]> wrote:

Hi Robert, hi everyone,

Abstract (If you don't have time to read all the mail!): Some dependencies may 
be added to OSG when users manually compile OSG with CMake. This would be a 
strictly optional feature that would not be included in precompiled packages. 
Examples: boost ref pointers, boost paths, etc.


Detail:
I know core OSG should not have dependencies other than critical ones, but what 
about *optional* dependencies?
I explain myself... I mainly think about boost, but this may be applied to 
more. The idea is that some portions of code *may* use dependencies that the 
user chooses while executing the CMake script. But precompiled packackes would 
*NEVER* use such dependencies (or else this would be a custom package).

Take this example: file and directories paths. All methods using paths should 
be written like this:
   void readNodeFile(osg::Path & filePath);

Then, in  header would be found something like:
   #ifdef OSG_USE_BOOST_FILESYSTEM

   #include 
   namespace osg {
   typedef boost::filesystem::path Path;
   }

   #else

   #include 
   namespace osg {
   typedef std::string Path;
   }
   #endif// OSG_USE_BOOST_FILESYSTEM


An option that defines "OSG_USE_BOOST_FILESYSTEM" may then be found in the CMake, and should be turned OFF by 
default (and marked as "advanced"). Of course we would also have "BOOST_INCLUDE" and 
"BOOST_LIB"-like variables, created by the FindBoost standard module.

Advantages:
- Users using use boost::filesystem in their project would benefit from it into 
OSG.
- It increases the interoperability with other libraries, since the user would not have to 
write method overloads that might create compile errors (try calling an 
osgDB::readNodeFile(boost::filesystem::path &) overload giving it a std::string and and 
you'll get a "ambiguous call" error).
- Methods using paths would be clearer (as a path is not necessarily a string).

Drawbacks:
- It needs a little tweak in the CMake.
- Well, I don't see more drawbacks (As this would be a strictly optional 
feature, used and maintained by those who use it).

Other options like these may be included by users that want to use some 
dependencies, such as boost ref pointers (As it has been discussed before). 
These optional features would benefit other users.

About using boost::filesystem, I can write the code and send it to 
osg-submissions. I just wait for authorization.

All users are invited to post suggestions about this!
Thanks for reading!

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
___
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



--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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


Re: [osg-users] texture download to mapped memory

2008-12-01 Thread J.P. Delport

Hi,

osg::Image can be created with already allocated memory.

snippet, modify as needed:
OSGImages_.push_back(new osg::Image());

OSGImages_[i]->setImage(ImageFormat_.getWidth(),
ImageFormat_.getHeight(),
1, 1, GL_LUMINANCE, GL_UNSIGNED_BYTE,
&(ImageBuffer_[i]->Data_[0]),
osg::Image::NO_DELETE);



&(ImageBuffer_[i]->Data_[0]) is memory in another class.

jp

Ferdi Smit wrote:
What would be the best way to download an osg texture into a region of 
memory mapped host memory (i.e. at a fixed memory location)? I can bind 
an osg::Image to a texture for the download, but as far as I know I can 
not force an Image object to use a specific region of memory; it does 
its own allocation on creation.


Do I have to do this manually using glGetTexImage()? I could get the 
TextureObject associated with the texture, bind it, and then perform the 
manual call. Only I'm not sure how I should set the contextID in the 
osg::Texture::getTextureObject call. Or is there an easier way? I really 
don't want to download it to an Image and then memcpy it to the mapped 
region, since that's simply too slow.




--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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


Re: [osg-users] multiple views on separate Qt widgets

2008-12-01 Thread Richard Baron Penman
The examples I've seen put frame() in their paint event and don't render
without it there. Is there an example available that implements the
architecture you describe?

> Or use multiple viewers.
that would be the simplest way. Can viewers share the same node group
memory?

Richard


On Mon, Dec 1, 2008 at 10:23 PM, Robert Osfield <[EMAIL PROTECTED]>wrote:

> Hi Richard,
>
> The osgViewer:::CompositeViewer/Viewer architecture is designed to
> support one frame loop driving all the windows associated with that
> viewer, not multiple places trying to dispatch frame().   So you use a
> single timer.  Or use multiple viewers.
>
> Robert.
>
> On Mon, Dec 1, 2008 at 11:16 AM, Richard Baron Penman
> <[EMAIL PROTECTED] <[EMAIL PROTECTED]>> wrote:
> > hi Robert,
> >
> > I've tried both methods used in the example and got both working for a
> > single view, but not for multiple.
> > The problem seems to be with having separate timeout loops calling
> > composite_viewer->frame(). Is there an alternative way to render a view?
> >
> > Richard
> >
> >
> > On Mon, Dec 1, 2008 at 10:00 PM, Robert Osfield <
> [EMAIL PROTECTED]>
> > wrote:
> >>
> >> Hi Richard,
> >>
> >> You don't mention how you are actually implementing the link between
> >> OSG and QT, are you using GraphicsWindowEmbedded or using the window
> >> inheritance of osgViewer.  The GraphicsWindowEmbedded route is very
> >> restricted as it's simplicity hides all the
> >> makeCurrent/releaseContext/swapBuffer functionality that a fully
> >> threaded/multi-context viewer requires.
> >>
> >> Robert.
> >>
> >> On Mon, Dec 1, 2008 at 1:09 AM, Richard Baron Penman
> >> <[EMAIL PROTECTED] <[EMAIL PROTECTED]>> wrote:
> >> > hello,
> >> >
> >> > I am trying to provide multiple views of an OpenSceneGraph scene
> within
> >> > a Qt
> >> > window.
> >> > I can get this working for a single view, or multiple views in the
> same
> >> > widget like in the osgviewerQT composite example. But I'm struggling
> to
> >> > get
> >> > multiple views on separate widgets working.
> >> >
> >> > I know many variations of this question have been asked:
> >> >
> >> >
> http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg08512.html
> >> >
> >> >
> http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg04883.html
> >> >
> >> >
> http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg05487.html
> >> >
> >> >
> http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg16623.html
> >> > etc
> >> >
> >> > But I am still not clear how to render each view. The examples use
> >> > composite_viewer->frame() in the paint event but for me this only
> >> > renders a
> >> > single view and leaves the rest blank.
> >> > Is there an alternative way to render multiple views at the same time?
> >> >
> >> > Richard
> >> >
> >> > ___
> >> > 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


[osg-users] texture download to mapped memory

2008-12-01 Thread Ferdi Smit
What would be the best way to download an osg texture into a region of 
memory mapped host memory (i.e. at a fixed memory location)? I can bind 
an osg::Image to a texture for the download, but as far as I know I can 
not force an Image object to use a specific region of memory; it does 
its own allocation on creation.


Do I have to do this manually using glGetTexImage()? I could get the 
TextureObject associated with the texture, bind it, and then perform the 
manual call. Only I'm not sure how I should set the contextID in the 
osg::Texture::getTextureObject call. Or is there an easier way? I really 
don't want to download it to an Image and then memcpy it to the mapped 
region, since that's simply too slow.


--
Regards,

Ferdi Smit
INS3 Visualization and 3D Interfaces
CWI Amsterdam, The Netherlands

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


Re: [osg-users] Interoparability and optional dependencies

2008-12-01 Thread Sukender
Hi Robert, hi JP,

Well, I knew the fact that boost will not be included in OSG... I was just 
talking about "a" Path structure, not "the boost's path structure". :)

I know that's *really* not important comparing to other features that are 
currently in dev, but I'm just pointing out the fact that it could be useful to 
some people. Question is: are they many? :)

This Path class would:
- Have a "/" and "/=" operators that acts as the "/" in Unix paths (Ex: 
projectFullPath / dataPath / "Textures" / "Model1/Something.jpg").
- Handle canonical paths (Ex: transform "a/b/../c" to an unique "a/c").
- Have to_native_file() and to_native_dir() methods to convert the Path 
structure to a platform dependent string ("C:\Dir1\File1.jpg" under Windows, 
"/Dir1/File1.jpg under linux and so on...).
- Be much safer than using strings.
- Be used for some filesystem related functions (create all directories of a 
path, test file/dir existence, directory iterators...).
- And more (See references).

References:
Boost filesystem doc: 
http://www.boost.org/doc/libs/1_36_0/libs/filesystem/doc/index.htm
Boost filesystem path doc: 
http://www.boost.org/doc/libs/1_36_0/libs/filesystem/doc/reference.html#Class-template-basic_path

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/


Le Mon, 01 Dec 2008 12:29:36 +0100, Robert Osfield <[EMAIL PROTECTED]> a écrit:

> Hi Sukender,
>
> On Mon, Dec 1, 2008 at 11:18 AM, Sukender <[EMAIL PROTECTED]> wrote:
>> Alright then. I guess adopting a kind of Path structure is not on the 
>> agenda, or is it? :)
>> Thank your for answering.
>
> Adding boost dependencies to the core, even an optional build one, is
> not something I'm going to accept for inclusion into the core OSG.
>
> Major external dependencies are only inclined into the OSG when they
> are encapsulated as a plugin or its own module.
>
> Robert.
> ___
> 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] set up OSG

2008-12-01 Thread olfat ibrahim
i need help in correctly configure the OSG to work with VS2008 

can any one please help me ?


  
___
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-12-01 Thread Gordon Tomlinson
This is the way we do it and it works for use

 1 Skybox
 2 Opaque
 3 Transparent

Also not you don't need to set the transparent bin to +1000 it default of
+10 will  work just fine

> Hi,
>
> So, if I do
>
> 2 skymaps with renderbin equal to -1000
> opaque (no renderbin modified)
> transparent renderbin equal to +1000
>
> It would be the good result ?
>
> Because if I do that for the moment, my transparent geometry is not
> rendered
> as last element... it is not visible when opaque element is behind it !
> (understand : the opaque geometry is on the ground, and the transparent
> geometry is up the ground. But for now, transparent geometry is not
> visible
> ... where there is no opaque elements, I can see my tranparent geometry,
> well rendered before skymaps...)
>
> I a little bit lost with that...
>
> For remember I use :
>
> void setSkymapLastRenderBin(osg::Geode* myGeode, int binNum){
>>
>> osg::StateSet* state = myGeode->getOrCreateStateSet();
>>
>> //Set sky render after objects, not depending on frustrum
>> // Set texture mode to REPLACE
>> osg::ref_ptr 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_ptr 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(binNum, "RenderBin");
>>
>>  myGeode->setCullingActive(false);
>> }
>>
>
> to set my geometries renderbin...
>
> Any idea ?
>
> Thanks a lot.
>
> Regards,
>Vincent.
>
> 2008/12/1 Gordon Tomlinson <[EMAIL PROTECTED]>
>
>>  It should be
>>
>>
>>
>>
>>
>> 1 Skybox
>>
>>
>>
>> 2 Opaque
>>
>>
>>
>> 3 Transparent
>>
>>
>>
>>
>>
>> 
>> __
>>
>>  *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:* Vincent Bourdier [mailto:[EMAIL PROTECTED]
>> *Sent:* Monday, December 01, 2008 5:39 AM
>> *To:* [EMAIL PROTECTED]; OpenSceneGraph Users
>>
>> *Subject:* Re: [osg-users] Render Bin, Transparency, ...
>>
>>
>>
>> Hi,
>>
>> I just make a little update :
>>
>> I don't remember (and I don't find) what is the order of the elements to
>> render...
>>
>> It seems to be :
>> 1.skybox
>> 2.transparent elements
>> 3.orther
>>
>> isn't it ?
>>
>> Thanks,
>>
>> Regards,
>>   Vincent.
>>
>> 2008/11/28 Vincent Bourdier <[EMAIL PROTECTED]>
>>
>> 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.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 th

Re: [osg-users] set up OSG

2008-12-01 Thread Tomlinson, Gordon
See
http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecific
s/VisualStudio 


Gordon

__
Gordon Tomlinson

Product Manager 3D
Email  : gtomlinson @ overwatch.textron.com
__
(C): (+1) 571-265-2612
(W): (+1) 703-437-7651

"Self defence is not a function of learning tricks 
but is a function of how quickly and intensely one 
can arouse one's instinct for survival" 
- Master Tambo Tetsura

 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of olfat
ibrahim
Sent: Monday, December 01, 2008 7:45 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] set up OSG

i need help in correctly configure the OSG to work with VS2008 

can any one please help me ?


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


Re: [osg-users] multiple views on separate Qt widgets

2008-12-01 Thread Robert Osfield
HI Richard,

On Mon, Dec 1, 2008 at 11:48 AM, Richard Baron Penman
<[EMAIL PROTECTED]> wrote:
> The examples I've seen put frame() in their paint event and don't render
> without it there. Is there an example available that implements the
> architecture you describe?

Well all the examples except the ones like osgviewerQT have a main
loop that drives the rendering.  These are frame driven rather than
event driven.  Almost all vis-sim/games application should be frame
driven rather than event driven.  Only interactive applications should
use event driven, but even then frame driven can still be used and may
be preferred.

>> Or use multiple viewers.
> that would be the simplest way. Can viewers share the same node group
> memory?

You can do it, but you need take care of the sync'ing the FrameStamp
between each traversal as otherwise the state of the scene graph can
get thrashed between different times.

You are getting well beyond what I have personally experimented with
though so I can't really help you along this journey.

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


Re: [osg-users] set up OSG

2008-12-01 Thread Serge Lages
Hi,

Just take a look at the OSG documentations, like this page :
http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio

On Mon, Dec 1, 2008 at 1:45 PM, olfat ibrahim <[EMAIL PROTECTED]>wrote:

> i need help in correctly configure the OSG to work with VS2008
>
> can any one please help me ?
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] texture download to mapped memory

2008-12-01 Thread J.P. Delport

Hi,

Ferdi Smit wrote:
Ok, thanks. I think that will work for now. There is an additional 
problem that the location to write to changes each frame. I think I can 
solve this by just binding a different image to the texture in the scene 
graph (set to a different mem location) in an update callback, prior to 
rendering, right?


I would even try just calling setImage again on the same osg::Image, it 
doesn't allocate anything, just changes where it points to. I am not 
sure that everything, e.g. binding, would update accordingly, but try.




Out of curiosity, how would I do it manually? I don't understand where I 
can get the contextID unsigned int required for getting the 
textureObject so I can bind it. Suppose I just have a simple program 
with, I assume, a single context? It's also required in this call, if I 
want to use the image but initiate the download manually: 
readImageFromCurrentTexture 
 (unsigned int contextID, 
...). This is useful if, for example, I want to stream multiple textures 
to a mapped socket in a specific order, instead of letting OSG handle 
when this happens exactly.


Sorry, I don't know. Search for where readImageFromCurrentTexture is called.

jp



J.P. Delport wrote:

Hi,

osg::Image can be created with already allocated memory.

snippet, modify as needed:
OSGImages_.push_back(new osg::Image());

OSGImages_[i]->setImage(ImageFormat_.getWidth(),
ImageFormat_.getHeight(),
1, 1, GL_LUMINANCE, GL_UNSIGNED_BYTE,
&(ImageBuffer_[i]->Data_[0]),
osg::Image::NO_DELETE);



&(ImageBuffer_[i]->Data_[0]) is memory in another class.

jp

Ferdi Smit wrote:
What would be the best way to download an osg texture into a region 
of memory mapped host memory (i.e. at a fixed memory location)? I can 
bind an osg::Image to a texture for the download, but as far as I 
know I can not force an Image object to use a specific region of 
memory; it does its own allocation on creation.


Do I have to do this manually using glGetTexImage()? I could get the 
TextureObject associated with the texture, bind it, and then perform 
the manual call. Only I'm not sure how I should set the contextID in 
the osg::Texture::getTextureObject call. Or is there an easier way? I 
really don't want to download it to an Image and then memcpy it to 
the mapped region, since that's simply too slow.









--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


___
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-12-01 Thread Vincent Bourdier
It looks good now, just using the renderbin and not all the code I past
early...

And I use grad number to have code more comfortable to use... +1000 will
allways be the last one...

Thanks for help, sorry for the inconvenience.

Regards,
   Vincent.

2008/12/1 Gordon Tomlinson <[EMAIL PROTECTED]>

> This is the way we do it and it works for use
>
>  1 Skybox
>  2 Opaque
>  3 Transparent
>
> Also not you don't need to set the transparent bin to +1000 it default of
> +10 will  work just fine
>
> > Hi,
> >
> > So, if I do
> >
> > 2 skymaps with renderbin equal to -1000
> > opaque (no renderbin modified)
> > transparent renderbin equal to +1000
> >
> > It would be the good result ?
> >
> > Because if I do that for the moment, my transparent geometry is not
> > rendered
> > as last element... it is not visible when opaque element is behind it !
> > (understand : the opaque geometry is on the ground, and the transparent
> > geometry is up the ground. But for now, transparent geometry is not
> > visible
> > ... where there is no opaque elements, I can see my tranparent geometry,
> > well rendered before skymaps...)
> >
> > I a little bit lost with that...
> >
> > For remember I use :
> >
> > void setSkymapLastRenderBin(osg::Geode* myGeode, int binNum){
> >>
> >> osg::StateSet* state = myGeode->getOrCreateStateSet();
> >>
> >> //Set sky render after objects, not depending on frustrum
> >> // Set texture mode to REPLACE
> >> osg::ref_ptr 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_ptr 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(binNum, "RenderBin");
> >>
> >>  myGeode->setCullingActive(false);
> >> }
> >>
> >
> > to set my geometries renderbin...
> >
> > Any idea ?
> >
> > Thanks a lot.
> >
> > Regards,
> >Vincent.
> >
> > 2008/12/1 Gordon Tomlinson <[EMAIL PROTECTED]>
> >
> >>  It should be
> >>
> >>
> >>
> >>
> >>
> >> 1 Skybox
> >>
> >>
> >>
> >> 2 Opaque
> >>
> >>
> >>
> >> 3 Transparent
> >>
> >>
> >>
> >>
> >>
> >> 
> >> __
> >>
> >>  *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:* Vincent Bourdier [mailto:[EMAIL PROTECTED]
> >> *Sent:* Monday, December 01, 2008 5:39 AM
> >> *To:* [EMAIL PROTECTED]; OpenSceneGraph Users
> >>
> >> *Subject:* Re: [osg-users] Render Bin, Transparency, ...
> >>
> >>
> >>
> >> Hi,
> >>
> >> I just make a little update :
> >>
> >> I don't remember (and I don't find) what is the order of the elements to
> >> render...
> >>
> >> It seems to be :
> >> 1.skybox
> >> 2.transparent elements
> >> 3.orther
> >>
> >> isn't it ?
> >>
> >> Thanks,
> >>
> >> Regards,
> >>   Vincent.
> >>
> >> 2008/11/28 Vincent Bourdier <[EMAIL PROTECTED]>
> >>
> >> 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.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*
> >>
> >>
> >>
> __

Re: [osg-users] texture download to mapped memory

2008-12-01 Thread Ferdi Smit
Ok, thanks. I think that will work for now. There is an additional 
problem that the location to write to changes each frame. I think I can 
solve this by just binding a different image to the texture in the scene 
graph (set to a different mem location) in an update callback, prior to 
rendering, right?


Out of curiosity, how would I do it manually? I don't understand where I 
can get the contextID unsigned int required for getting the 
textureObject so I can bind it. Suppose I just have a simple program 
with, I assume, a single context? It's also required in this call, if I 
want to use the image but initiate the download manually: 
readImageFromCurrentTexture 
 (unsigned int contextID, 
...). This is useful if, for example, I want to stream multiple textures 
to a mapped socket in a specific order, instead of letting OSG handle 
when this happens exactly.


J.P. Delport wrote:

Hi,

osg::Image can be created with already allocated memory.

snippet, modify as needed:
OSGImages_.push_back(new osg::Image());

OSGImages_[i]->setImage(ImageFormat_.getWidth(),
ImageFormat_.getHeight(),
1, 1, GL_LUMINANCE, GL_UNSIGNED_BYTE,
&(ImageBuffer_[i]->Data_[0]),
osg::Image::NO_DELETE);



&(ImageBuffer_[i]->Data_[0]) is memory in another class.

jp

Ferdi Smit wrote:
What would be the best way to download an osg texture into a region 
of memory mapped host memory (i.e. at a fixed memory location)? I can 
bind an osg::Image to a texture for the download, but as far as I 
know I can not force an Image object to use a specific region of 
memory; it does its own allocation on creation.


Do I have to do this manually using glGetTexImage()? I could get the 
TextureObject associated with the texture, bind it, and then perform 
the manual call. Only I'm not sure how I should set the contextID in 
the osg::Texture::getTextureObject call. Or is there an easier way? I 
really don't want to download it to an Image and then memcpy it to 
the mapped region, since that's simply too slow.







--
Regards,

Ferdi Smit
INS3 Visualization and 3D Interfaces
CWI Amsterdam, The Netherlands

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


[osg-users] OpenVRML and Windows

2008-12-01 Thread Serge Lages
Hi all,

I am currently trying to build the OSG VRML plugin under Windows, so I've
downloaded the 0.14.3 version of OpenVRML and tried to build it with VS8
SP1, and it's a real pain... :/ Maybe I've missed something but this version
really seems to be broken with "modern" compilers.

That's why I would like to know if anyone already have a compiled version of
this lib (build with VS8 SP1) ? Or at least a modified version of the
sources which build fine ?

Thanks for your help !

-- 
Serge Lages
http://www.tharsis-software.com
___
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-12-01 Thread Jean-Sébastien Guay

Hello Dusten,

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.


You just need to use a modeling tool and format which understand 
hierarchy, and then use that. Many formats which normal modeling tools 
export support this: COLLADA, OpenFlight, etc. Plus, there are plugins 
for both 3DSMax and Blender (among others) to export to .osg directly.


If you need anything else, you need to code it yourself, which shouldn't 
be that complicated. Here we have a system which loads and interprets 
scripts as you describe, plus it includes physical properties (we 
develop and sell a physics engine after all :-) ), viewer configuration, 
input device configuration, etc.


Of course, once again the ability to do view frustum culling properly 
still hinges on the grouping of close-by objects and a well-conditioned 
scene graph, and at this point it's up to your loader to build the scene 
graph in a way that will be close to optimal. You can give hints in your 
scripting files for this (such as group names, where each object whose 
group name is the same will be grouped together, or a radius + number of 
objects scheme, where objects which are close by within a certain radius 
will be grouped together up to a given number of objects).


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 totally agree with this. However, slight retraining for the realities 
of real-time graphics is often necessary. Why do you think the 3D 
artist/multimedia schools have different classes for game modeling and 
fx/film modeling? Both have different tradeoffs and the modeler must 
keep different things in mind while doing his job. (same goes for 
texture artist, lighting artist, etc. when those positions are occupied 
by different people)


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.


Not only is it not too complex, you don't have any choice. It's up to 
you to provide OSG with a well-formed scene graph. If you don't, you 
probably won't get great performance. Modeling tools by default make 
flat hierarchies, but in both 3DSMax and Blender IIRC (and Maya, 
Softimage XSI, etc. too, and of course Creator) there is a view which 
allows the modeler to rearrange the hierarchy. Using this, along with a 
format which can export the hierarchy properly will save you a lot of 
time trying to do the same programmatically.


But it would be -very- 
tedious for a level designer to heavily subdivide his or her model for 
culling purposes.  


It's not that tedious, and I didn't say you need to heavily subdivide. 
Just keep the hierarchy in mind when building the levels, and do a rough 
grouping. You will see large performance gains.


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.


I'm not aware of anything in OSG to automatically build occlusion 
volumes (from anything, not just from the lowest LOD), but then again I 
have never used occlusion culling in OSG myself, so others may be better 
placed to inform you on this.


If you want my advice, start with making OSG's view frustum culling job 
easier, that's the simplest to implement and will already get you 
massive gains.


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] How to know if polygon is about to be draw onscreen?

2008-12-01 Thread oren david
Hello,How do I know if a specific polygon is about to be draw on screen in
the next Draw??
thank you
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to know if polygon is about to be draw onscreen?

2008-12-01 Thread Sukender
Le Mon, 01 Dec 2008 15:23:34 +0100, oren david <[EMAIL PROTECTED]> a écrit:

> Hello,How do I know if a specific polygon is about to be draw on screen in
> the next Draw??
> thank you

Hi Oren,

I'm not sure I understand you, and I think you might give more information 
about your problem.

However, you may try looking at the cull traversal. If a geometry is culled, 
then none of its polygon will be drawn. But this won't tell you if the geometry 
is hidden or not, and that won't tell you either if the geometry is partially 
out of the screen.

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to know if polygon is about to be draw onscreen?

2008-12-01 Thread Robert Osfield
Hi Oren,

On Mon, Dec 1, 2008 at 2:23 PM, oren david <[EMAIL PROTECTED]> wrote:
> How do I know if a specific polygon is about to be draw on screen in the
> next Draw??

The OSG doesn't records where specific polygons are going to be
rendered, the finest grained object it culls against and records in
the rendering back end is an osg::Drawwable.  Duriing the cull
traversal for each camera being rendered a graph is gerated with a
RenderStage at its root (it's the top most node on a graph heiratchy
that represents what is going to be rendered), so you could traversal
teh RenderStage contents to see if the Drawable is in there.

Or.. just attach a cull callback to the Drawable and this will get
called during the cull traversal and will tell you whether it's going
to be culled.

Or... and probably the best way to test, is just get the world space
coords of your polygon and tests it directly agaist the view frustum
of the camera you want to know if a polygon is encompassed.

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


Re: [osg-users] multiple views on separate Qt widgets

2008-12-01 Thread Jean-Sébastien Guay

Hello Richard,

I am trying to provide multiple views of an OpenSceneGraph scene within 
a Qt window.


[...]

But I am still not clear how to render each view. The examples use 
composite_viewer->frame() in the paint event but for me this only 
renders a single view and leaves the rest blank.

Is there an alternative way to render multiple views at the same time?


I've seen you're considering having separate viewers, but I would 
suggest you use a single CompositeViewer. That will make sure you get 
the benefits of OSG's threading of update, cull and draw traversals.


Just add views to your viewer, and have each view's camera have a 
GraphicsWindow whose inheritedWindowData is:


traits->inheritedWindowData = new WindowData(winId());

(using the definition of WindowData at the top of QOSGWidget.cpp)

I personally realize() the graphics contexts at creation, because the 
CompositeViewer has a few early-exit conditions where it will not 
execute some branch if *one* of its views' contexts is realized, so I 
just want to make sure the all are.


Make sure you assign the scene data to your new view, and make sure your 
camera's projection matrix is sane. We had a problem where the window 
was first created by QT with a 0 width, so the initial projection matrix 
was not valid, and then any attempt to change the projection matrix (in 
the resizeEvent) would still use the invalid matrix as its starting 
point, so we would not see anything in the view.


Also, another caveat, often when reparenting a QT widget, its HWND (on 
Windows) changes. At that point of course, we need to recreate the 
graphics context, since it's tied to the widget's HWND, otherwise it 
would try to draw to an invalid HWND and fail.


Other than that, you might have to experiment with threading (when to 
create the context, when to stopThreading and startThreading, etc.). We 
still don't have an optimal solution, as you can see in the thread 
"CompositeViewer addView threading issue on Windows?".


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


Re: [osg-users] Interoparability and optional dependencies

2008-12-01 Thread Robert Osfield
Hi Sukender,

On Mon, Dec 1, 2008 at 12:02 PM, Sukender <[EMAIL PROTECTED]> wrote:
> Well, I knew the fact that boost will not be included in OSG... I was just 
> talking about "a" Path structure, not "the boost's path structure". :)

That's not what you suggested in your first post - you were advocating
doing a typedef to the boosts path structure...


> I know that's *really* not important comparing to other features that are 
> currently in dev, but I'm just pointing out the fact that it could be useful 
> to some people. Question is: are they many? :)
>
> This Path class would:
> - Have a "/" and "/=" operators that acts as the "/" in Unix paths (Ex: 
> projectFullPath / dataPath / "Textures" / "Model1/Something.jpg").
> - Handle canonical paths (Ex: transform "a/b/../c" to an unique "a/c").
> - Have to_native_file() and to_native_dir() methods to convert the Path 
> structure to a platform dependent string ("C:\Dir1\File1.jpg" under Windows, 
> "/Dir1/File1.jpg under linux and so on...).
> - Be much safer than using strings.
> - Be used for some filesystem related functions (create all directories of a 
> path, test file/dir existence, directory iterators...).

The osgDB library already has a range of functions for managing file
paths.  You could possible wrap these up under a class, but we'd need
to migrate a lot of code that current uses std::string's quite happily
to using its replacement - for instance the plugins would all have to
be converted.  This is doable but it's not a trivial amount of work.
The high level functions in osgDB/ReadFile and osgDB/WriteFile could
have both the old std::string and a new osgDB::Path interfaces so is
less of an issue.  One would have to have a clear value add for
undertaking this work.

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


[osg-users] Linker error in osgparametric example

2008-12-01 Thread Jean-Sébastien Guay

Hi Robert,

I'm getting a linker error in the osgparametric example since my SVN 
update as of this morning:


45>osgparametric.obj : error LNK2001: unresolved external symbol 
"public: virtual void __thiscall 
osg::BufferObject::unbindBuffer(unsigned int)const " 
([EMAIL PROTECTED]@osg@@[EMAIL PROTECTED])


Weird, I can see this in the BufferObject header:

virtual void unbindBuffer(unsigned int contextID) const
{
Extensions* extensions = getExtensions(contextID,true);
extensions->glBindBuffer(_target,0);
}

Perhaps I need to do a rebuild... I'll try that. In the mean time, any 
other ideas?


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] Linker error in osgparametric example

2008-12-01 Thread Jean-Sébastien Guay

Hi Robert,

I'm getting a linker error in the osgparametric example since my SVN 
update as of this morning:


I just tried to rebuild the osg library (as a start) and I'm getting this:

1>..\..\..\src\osg\BufferObject.cpp(736) : error C2065: 
'GL_ARRAY_BUFFER' : undeclared identifier


Perhaps we need to add that define to the top of the BufferObject header 
like GL_DYNAMIC_DRAW_ARB and others?


I have this in my glext.h (installed as part of the Platform SDK with 
Visual C++ 8):


#define GL_ARRAY_BUFFER   0x8892

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

2008-12-01 Thread Andreas Lindmark
It is often better to draw the skybox last.

1. Opaque objects
2. Skybox
3. Transparent objects

ATI has published a paper called Depth in Depth, written by Emil Person aka
Humus. In the paper (under paragraph: Draw the skybox last and the gun
first) he explains why this order is preferable

http://developer.amd.com/media/gpu_assets/Depth_in-depth.pdf

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


Re: [osg-users] Advice: Adding ffmpeg to OSG via osgViewer

2008-12-01 Thread Fred
I found an implementation
http://pigeond.net/flightgear/screenstreamer/ that appears to use the
technique you suggested.


On Wed, Nov 26, 2008 at 1:09 AM, J.P. Delport <[EMAIL PROTECTED]> wrote:
> Hi Fred,
>
> maybe you can connect the FFmpeg streamer to the Viewer output much like the
> screenshot example does.
>
> We also have code that grabs a region of interest from FBO using a shader
> and saves that using FFmpeg to disk. I'm eagerly trying to free up this
> code, but still need to twist a few arms.
>
> jp
>
> Fred wrote:
>>
>> Background:
>> I need to create a service/daemon running delta3D to which an
>> application running a FlashPlayer 10 video connects for its video
>> feed.
>> Presently, I am running ffmpeg -f x11grab ...  to capture the osg
>> display and converting to flv and streaming that via ffserver.
>> Yuck.
>>
>> Plan:
>> Incorporate ffmpeg into osgViewer in a way that the FlashPlayer
>> NetConnectors can subscribe directly to it (in a multicast way).
>> This is my current plan but if there is a better way that would be
>> more generally beneficial I'm open to suggestions.
>>
>>
>> Thank you
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
> --
> This message is subject to the CSIR's copyright terms and conditions, e-mail
> legal notice, and implemented Open Document Format (ODF) standard. The full
> disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
>
> This message has been scanned for viruses and dangerous content by
> MailScanner, and is believed to be clean.  MailScanner thanks Transtec
> Computers for their support.
>
> ___
> 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] Set projection matrix, opengl style?

2008-12-01 Thread Raymond De Vries

Hi all,

I think I have a simple issue but I cannot find the right  
documentation... Hopefully one of you has the answer. Iwould like to  
fill in the scene view's projection matrix and view matrix directly  
from opengl matrices. Can I put the opengl matrices directly in  
setProjectionMatrix() and setViewMatrix()? Or do I need to convert  
these first or so?


Thanks a lot already!
Regards
Raymond


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


Re: [osg-users] Set projection matrix, opengl style?

2008-12-01 Thread Robert Osfield
Hi Raymond,

You'll be able to pass them in unchanged.

Robert.

On Mon, Dec 1, 2008 at 4:17 PM, Raymond De Vries <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I think I have a simple issue but I cannot find the right documentation...
> Hopefully one of you has the answer. Iwould like to fill in the scene view's
> projection matrix and view matrix directly from opengl matrices. Can I put
> the opengl matrices directly in setProjectionMatrix() and setViewMatrix()?
> Or do I need to convert these first or so?
>
> Thanks a lot already!
> Regards
> Raymond
>
>
> ___
> 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] Interoparability and optional dependencies

2008-12-01 Thread Sukender
Hi Robert,

>> Well, I knew the fact that boost will not be included in OSG... I was just 
>> talking about "a" Path structure, not "the boost's path structure". :)
>
> That's not what you suggested in your first post - you were advocating
> doing a typedef to the boosts path structure...

Yes, but as you said it was better not to include, then I changed :)

> The osgDB library already has a range of functions for managing file
> paths.  You could possible wrap these up under a class, but we'd need
> to migrate a lot of code that current uses std::string's quite happily
> to using its replacement - for instance the plugins would all have to
> be converted.  This is doable but it's not a trivial amount of work.
> The high level functions in osgDB/ReadFile and osgDB/WriteFile could
> have both the old std::string and a new osgDB::Path interfaces so is
> less of an issue.  One would have to have a clear value add for
> undertaking this work.
>
> Robert.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Alright. I think I'd rather leave the subject for now: it seems I'm the only 
interested in doing such a modification! Even if separating "path" from 
"string" may be useful later.
Anyway, if I don't do that, I will have more time to spend on osgAudio...
Thank you for answering.

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to access/configure the rendered frame ??

2008-12-01 Thread Erwan Bigorgne
hello,
 I'm a newcomer in osg... and a little bit lost.
Anyway here is my problem : Aiming at test some computer vision algorithms,
I intent to code a simple Image server. I have already installed osg libs,
coded and run some simple graphes... But despite the tutorials (thanks) and
documentation (again) at my disposal, I just can't figure out how to do a
simple thing i.e. how to define an adhoc camera(?), viewer(?), producer(?)
and access to its (if it exists) framebuffer or rendered frame. ( I'm using
opencv... lets say a 512x512 uchar table :)

Thanks by advance.
Erwan
___
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-12-01 Thread Vincent Bourdier
Thanks a lot,

Skybox in second or render first is the same result...

Thanks for help.

Regards,
   Vincent

2008/12/1 Andreas Lindmark <[EMAIL PROTECTED]>

> It is often better to draw the skybox last.
>
> 1. Opaque objects
> 2. Skybox
> 3. Transparent objects
>
> ATI has published a paper called Depth in Depth, written by Emil Person aka
> Humus. In the paper (under paragraph: Draw the skybox last and the gun
> first) he explains why this order is preferable
>
> http://developer.amd.com/media/gpu_assets/Depth_in-depth.pdf
>
> /Andreas
>
> ___
> 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 access/configure the rendered frame ??

2008-12-01 Thread Robert Osfield
Hi Erwan,

Have a look at the osgcamera and osgprerender examples.  To get
imagery out you can attach an osg::Image to the viewers camera and on
each frame it'll be automatically copied, or just use a camera
post/final draw callback.

FYI, Producer/osgProducer is required for the OSG-1.x version of the
OSG, but no OSG-2.x as we now have a native windowing/camera/threading
implementation in osgViewer.

Robert.

On Mon, Dec 1, 2008 at 4:29 PM, Erwan Bigorgne <[EMAIL PROTECTED]> wrote:
> hello,
>  I'm a newcomer in osg... and a little bit lost.
> Anyway here is my problem : Aiming at test some computer vision algorithms,
> I intent to code a simple Image server. I have already installed osg libs,
> coded and run some simple graphes... But despite the tutorials (thanks) and
> documentation (again) at my disposal, I just can't figure out how to do a
> simple thing i.e. how to define an adhoc camera(?), viewer(?), producer(?)
> and access to its (if it exists) framebuffer or rendered frame. ( I'm using
> opencv... lets say a 512x512 uchar table :)
>
> Thanks by advance.
> Erwan
>
>
>
> ___
> 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-12-01 Thread Jean-Sébastien Guay

Hi Vincent,


Skybox in second or render first is the same result...


See the article Andreas linked, it's not the same. Visually it is, but 
not in terms of z buffer.


Plus, if you have expensive shaders on your skybox, rendering it first 
guarantees that they will be run for the whole screen, whereas rendering 
it second guarantees they will be run for less than the whole screen (if 
you have something else than your skybox in your scene... :-) )


Conceptually, the skybox is only there for any pixels where there is no 
other object. So why not render it last, once you know which pixels are 
occupied by other objects? (except transparent objects of course, they 
still need to be rendered after the skybox)


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

2008-12-01 Thread Vincent Bourdier
2008/12/1 Jean-Sébastien Guay <[EMAIL PROTECTED]>

> Hi Vincent,
>
>  Skybox in second or render first is the same result...
>>
>
> See the article Andreas linked, it's not the same. Visually it is, but not
> in terms of z buffer.
>

Of course, I read it, and I just confirm that visually the render is the
same


>
> Plus, if you have expensive shaders on your skybox, rendering it first
> guarantees that they will be run for the whole screen, whereas rendering it
> second guarantees they will be run for less than the whole screen (if you
> have something else than your skybox in your scene... :-) )
>

I totally understand and agree, but for the moment I have no shaders on
skybox, so it is not a problem.


>
> Conceptually, the skybox is only there for any pixels where there is no
> other object. So why not render it last, once you know which pixels are
> occupied by other objects? (except transparent objects of course, they still
> need to be rendered after the skybox)
>

I am okay with that, and I am using this order for now :-)

Thanks,

   Vincent


>
> 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] Performing parent/child occlusion culling

2008-12-01 Thread Dusten Sobotta
This has been an incredibly helpful response.  Thanks a ton :)


On Mon, Dec 1, 2008 at 8:12 AM, Jean-Sébastien Guay <
[EMAIL PROTECTED]> wrote:

> Hello Dusten,
>
>  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.
>>
>
> You just need to use a modeling tool and format which understand hierarchy,
> and then use that. Many formats which normal modeling tools export support
> this: COLLADA, OpenFlight, etc. Plus, there are plugins for both 3DSMax and
> Blender (among others) to export to .osg directly.
>
> If you need anything else, you need to code it yourself, which shouldn't be
> that complicated. Here we have a system which loads and interprets scripts
> as you describe, plus it includes physical properties (we develop and sell a
> physics engine after all :-) ), viewer configuration, input device
> configuration, etc.
>
> Of course, once again the ability to do view frustum culling properly still
> hinges on the grouping of close-by objects and a well-conditioned scene
> graph, and at this point it's up to your loader to build the scene graph in
> a way that will be close to optimal. You can give hints in your scripting
> files for this (such as group names, where each object whose group name is
> the same will be grouped together, or a radius + number of objects scheme,
> where objects which are close by within a certain radius will be grouped
> together up to a given number of objects).
>
>  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 totally agree with this. However, slight retraining for the realities of
> real-time graphics is often necessary. Why do you think the 3D
> artist/multimedia schools have different classes for game modeling and
> fx/film modeling? Both have different tradeoffs and the modeler must keep
> different things in mind while doing his job. (same goes for texture artist,
> lighting artist, etc. when those positions are occupied by different people)
>
>  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.
>>
>
> Not only is it not too complex, you don't have any choice. It's up to you
> to provide OSG with a well-formed scene graph. If you don't, you probably
> won't get great performance. Modeling tools by default make flat
> hierarchies, but in both 3DSMax and Blender IIRC (and Maya, Softimage XSI,
> etc. too, and of course Creator) there is a view which allows the modeler to
> rearrange the hierarchy. Using this, along with a format which can export
> the hierarchy properly will save you a lot of time trying to do the same
> programmatically.
>
>  But it would be -very- tedious for a level designer to heavily subdivide
>> his or her model for culling purposes.
>>
>
> It's not that tedious, and I didn't say you need to heavily subdivide. Just
> keep the hierarchy in mind when building the levels, and do a rough
> grouping. You will see large performance gains.
>
>  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.
>>
>
> I'm not aware of anything in OSG to automatically build occlusion volumes
> (from anything, not just from the lowest LOD), but then again I have never
> used occlusion culling in OSG myself, so others may be better placed to
> inform you on this.
>
> If you want my advice, start with making OSG's view frustum culling job
> easier, that's the simplest to implement and will already get you massive
> gains.
>
>
> 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] Performing parent/child occlusion culling

2008-12-01 Thread Jean-Sébastien Guay

Hello Dusten,


This has been an incredibly helpful response.  Thanks a ton :)


Glad I could help. :-)

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] Linker error in osgparametric example

2008-12-01 Thread Jean-Sébastien Guay

Hi Robert,

1>..\..\..\src\osg\BufferObject.cpp(736) : error C2065: 
'GL_ARRAY_BUFFER' : undeclared identifier


Perhaps we need to add that define to the top of the BufferObject header 
like GL_DYNAMIC_DRAW_ARB and others?


Looking closer at the BufferObject header, I see there's a 
GL_ARRAY_BUFFER_ARB define, but not GL_ARRAY_BUFFER. Furthermore, the 
values are the same between what BufferObject defines for 
GL_ARRAY_BUFFER_ARB and what I have in my glext.h for GL_ARRAY_BUFFER. 
Should we just use GL_ARRAY_BUFFER_ARB in the PixelDataBufferObject 
constructor?


Using that, the osg lib compiles correctly, and the osgparametric 
example builds correctly too. Is this an appropriate fix?


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] Linker error in osgparametric example

2008-12-01 Thread Robert Osfield
Hi J-S,

On Mon, Dec 1, 2008 at 5:46 PM, Jean-Sébastien Guay
<[EMAIL PROTECTED]> wrote:
> Looking closer at the BufferObject header, I see there's a
> GL_ARRAY_BUFFER_ARB define, but not GL_ARRAY_BUFFER. Furthermore, the values
> are the same between what BufferObject defines for GL_ARRAY_BUFFER_ARB and
> what I have in my glext.h for GL_ARRAY_BUFFER. Should we just use
> GL_ARRAY_BUFFER_ARB in the PixelDataBufferObject constructor?
>
> Using that, the osg lib compiles correctly, and the osgparametric example
> builds correctly too. Is this an appropriate fix?

Using GL_ARRAY_BUFFER_ARB in the constructor would be a perfectly
reasonable fix.

Perhaps ideally we'd have the OSG create defines for the
GL_ARRAY_BUFFER rather than GL_ARRAY_BUFFER_ARB, but before we make a
decision on it your suggestion of the change is the appropriate one.

The server is currently unresponsive so I can't check in any fixes right now.

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


[osg-users] transformation question...

2008-12-01 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
I have a transformation question I'm hoping someone can shed some light on.

 

I have a camera that I can explicitly control by specifying a position and
an orientation (using heading, pitch, roll) as input. I would like to define
another view that  uses the same position as the camera but  uses an
orientation (again heading, pitch, and roll) that is RELATIVE to the camera
coordinate frame. In other words, a heading, pitch, and roll of 0.0 for this
other view would yield the same axis coordinate frame as the camera.

 

I've tried several things to get this to work and I've had no success.
Obviously I'm doing something fundamentally wrong.

 

If anyone has any ideas on how I can get this to work, it would be most
appreciated.

 

Thanks,

-Shayne



smime.p7s
Description: S/MIME cryptographic signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] transformation question...

2008-12-01 Thread Ralf Stokholm
Hi Shayne

As far as I know this should be acomplished by placing a transform node as a
child of the first camera and another camera on that.

What have you tried and what effects have you had?

Brgs.

Ralf Stokholm

2008/12/1 Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC <
[EMAIL PROTECTED]>

>  I have a transformation question I'm hoping someone can shed some light
> on.
>
>
>
> I have a camera that I can explicitly control by specifying a position and
> an orientation (using heading, pitch, roll) as input. I would like to define
> another view that  uses the same position as the camera but  uses an
> orientation (again heading, pitch, and roll) that is RELATIVE to the camera
> coordinate frame. In other words, a heading, pitch, and roll of 0.0 for this
> other view would yield the same axis coordinate frame as the camera.
>
>
>
> I've tried several things to get this to work and I've had no success.
> Obviously I'm doing something fundamentally wrong.
>
>
>
> If anyone has any ideas on how I can get this to work, it would be most
> appreciated…
>
>
>
> Thanks,
>
> -Shayne
>
> ___
> 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] How to know if polygon is about to be draw onscreen?

2008-12-01 Thread Orendavd

Thank you,
So if I have a really big object (no paging) with 30 polygons (read  
using readnodefile()), OSG is going to draw them all???
I'm just trying to reach for the vertex x,y,z, of the polygons in the view  
frustum.
I managed to get the vertex X,Y,Z , but for all the object, not the one in  
view frustum.
For now I have only 1 object in my scene, I switch object base on distance  
from my surface.

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


Re: [osg-users] Linker error in osgparametric example

2008-12-01 Thread Jean-Sébastien Guay

Hi Robert,


Using GL_ARRAY_BUFFER_ARB in the constructor would be a perfectly
reasonable fix.


OK, great.


The server is currently unresponsive so I can't check in any fixes right now.


OK, I'll send the modified file anyways just to make sure it isn't lost.

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] transformation question...

2008-12-01 Thread Robert Osfield
HI Shayne,

Your could control your viewer's master camera as you do currently,
then have a slave Camera that pre/post multiplies this Camera's
view/project matrix as required.  The osgwindow example gives an
example of use of two slaves with offset views, albeit the default
post multiplication of the master camera (in eye coords), in your case
it might be that you pre multiplication (in world coords).  The
osg::Camera::setTransformOrder() gives you control over the order of
transformation.

Robert.

On Mon, Dec 1, 2008 at 6:30 PM, Tueller,  Shayne R Civ USAF AFMC 519
SMXS/MXDEC <[EMAIL PROTECTED]> wrote:
> I have a transformation question I'm hoping someone can shed some light on.
>
>
>
> I have a camera that I can explicitly control by specifying a position and
> an orientation (using heading, pitch, roll) as input. I would like to define
> another view that  uses the same position as the camera but  uses an
> orientation (again heading, pitch, and roll) that is RELATIVE to the camera
> coordinate frame. In other words, a heading, pitch, and roll of 0.0 for this
> other view would yield the same axis coordinate frame as the camera.
>
>
>
> I've tried several things to get this to work and I've had no success.
> Obviously I'm doing something fundamentally wrong.
>
>
>
> If anyone has any ideas on how I can get this to work, it would be most
> appreciated…
>
>
>
> Thanks,
>
> -Shayne
>
> ___
> 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] question about passive 3D stereo using polarized projectors and openscenegraph

2008-12-01 Thread lucas Grijander

Hi Jan,

thanks for your comments. We are evaluating a Nvidia Quadro and the other 
option commented by Robert about using horizontal split with two outputs.

By the way, I've been using the examples of running osgviewer xx.osg --stereo, 
but I would like to implement all that in my own code. Is there any 
example/code to have a look? just to have an idea on how to start.

thanks!!

regards,
Jaime.


> From: [EMAIL PROTECTED]
> To: osg-users@lists.openscenegraph.org
> Date: Thu, 20 Nov 2008 22:35:24 +0100
> Subject: Re: [osg-users] question about passive 3D stereo using polarized 
> projectors and openscenegraph
> 
> Hi Jaime,
> 
> > Hi everybody!!
> >
> > in my lab they want to re-use an old system composed by a Cyviz Stereo 3D
> > Converter (xpo.2). It basically consists on a splitter which needs a
> > frame-sequencial stereo source, and the output is two videos for two
> > projectors (so passive stereo using polarized projectors & glasses). I am
> > quite new with this 3D stuff... I think I should use OSG_STEREO_MODE with
> > the QUAD_BUFFER  option. 
> 
> Yes, that is the correct setup for the this system (we have the Vizwall 
> ourselves).
> 
> > My question is more about the graphics card
> > required for that, do we need any special card for that? I have a laptop
> > with a NVIDIA geforce 8700GT, do you think it is possible to use it like
> > that?
> 
> Nope. You need an Nvidia Quadro or ATI FireGL card that has the QUAD_BUFFER 
> support and has also the special mini DIN 3-pin synchronization connector. 
> The 
> cable from that goes into the xpo boxes, without the sync you will not get 
> stable stereo.
> 
> The consumer cards (GeForce/Radeon) do not support neither the QUAD_BUFFER 
> mode nor have the required hardware for the synchronization.
> 
> Regards,
> 
> Jan
> 

_
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to know if polygon is about to be draw onscreen?

2008-12-01 Thread Tomlinson, Gordon
if you create a single drawable then yes OSG will try to draw them all
as this is 
the granularity of OSG's cull test its tests bounding spheres for speed.
 
If you have multiple drawable's then  OSG will draw every triangle of
each drawable that is partially in of fully in the frustum
 
The trick you loader needs to do is to create a well balanced quad or
oct tree to enable good culling and drawing
 

Gordon

__
Gordon Tomlinson

Product Manager 3D
Email  : gtomlinson @ overwatch.textron.com
__
(C): (+1) 571-265-2612
(W): (+1) 703-437-7651

"Self defence is not a function of learning tricks 
but is a function of how quickly and intensely one 
can arouse one's instinct for survival" 
- Master Tambo Tetsura

 
 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, December 01, 2008 2:49 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] How to know if polygon is about to be draw
onscreen?


Thank you,
So if I have a really big object (no paging) with 30 polygons (read
using readnodefile()), OSG is going to draw them all???
I'm just trying to reach for the vertex x,y,z, of the polygons in the
view frustum. 
I managed to get the vertex X,Y,Z , but for all the object, not the one
in view frustum.
For now I have only 1 object in my scene, I switch object base on
distance from my surface.
thank you
Oren David
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] question about passive 3D stereo using polarized projectors and openscenegraph

2008-12-01 Thread Robert Osfield
Hi Jamie,

Have a read of the stereo docs on the wiki.

On Mon, Dec 1, 2008 at 8:19 PM, lucas Grijander
<[EMAIL PROTECTED]> wrote:
> Hi Jan,
>
> thanks for your comments. We are evaluating a Nvidia Quadro and the other
> option commented by Robert about using horizontal split with two outputs.
>
> By the way, I've been using the examples of running osgviewer xx.osg
> --stereo, but I would like to implement all that in my own code. Is there
> any example/code to have a look? just to have an idea on how to start.
>
> thanks!!
>
> regards,
> Jaime.
>
>
>> From: [EMAIL PROTECTED]
>> To: osg-users@lists.openscenegraph.org
>> Date: Thu, 20 Nov 2008 22:35:24 +0100
>> Subject: Re: [osg-users] question about passive 3D stereo using polarized
>> projectors and openscenegraph
>>
>> Hi Jaime,
>>
>> > Hi everybody!!
>> >
>> > in my lab they want to re-use an old system composed by a Cyviz Stereo
>> > 3D
>> > Converter (xpo.2). It basically consists on a splitter which needs a
>> > frame-sequencial stereo source, and the output is two videos for two
>> > projectors (so passive stereo using polarized projectors & glasses). I
>> > am
>> > quite new with this 3D stuff... I think I should use OSG_STEREO_MODE
>> > with
>> > the QUAD_BUFFER option.
>>
>> Yes, that is the correct setup for the this system (we have the Vizwall
>> ourselves).
>>
>> > My question is more about the graphics card
>> > required for that, do we need any special card for that? I have a laptop
>> > with a NVIDIA geforce 8700GT, do you think it is possible to use it like
>> > that?
>>
>> Nope. You need an Nvidia Quadro or ATI FireGL card that has the
>> QUAD_BUFFER
>> support and has also the special mini DIN 3-pin synchronization connector.
>> The
>> cable from that goes into the xpo boxes, without the sync you will not get
>> stable stereo.
>>
>> The consumer cards (GeForce/Radeon) do not support neither the QUAD_BUFFER
>> mode nor have the required hardware for the synchronization.
>>
>> Regards,
>>
>> Jan
>>
>
> 
> Discover the new Windows Vista Learn more!
> ___
> 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 know if polygon is about to be draw onscreen?

2008-12-01 Thread Robert Osfield
Hi Oren,

Could you please stop asking the same question spread over half a
dozen different threads you have started.

I and others have replied to the previous thread, please stick to
these threads, starting new threads to try and bump up your topic is
poor net etiquette.

Robert.

On Mon, Dec 1, 2008 at 7:48 PM,  <[EMAIL PROTECTED]> wrote:
> Thank you,
> So if I have a really big object (no paging) with 30 polygons (read
> using readnodefile()), OSG is going to draw them all???
> I'm just trying to reach for the vertex x,y,z, of the polygons in the view
> frustum.
> I managed to get the vertex X,Y,Z , but for all the object, not the one in
> view frustum.
> For now I have only 1 object in my scene, I switch object base on distance
> from my surface.
> thank you
> Oren David
> ___
> 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] How to know if polygon is about to be draw onscreen?

2008-12-01 Thread Orendavd

Hi Robert,
Sorry for the mess, maybe it seems to you to be the same question, but  
after a week of research (thanks for the help) I started to understand few  
things, and I was surprise to find out OSG does not cull drawables, so I  
search again and found no answer so this was a specific question about OSG  
abilities.

I guess I move on now.
Oren David
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] VBOs & Shared Geometry

2008-12-01 Thread Sean Spicer
Hi Gang,

I'm working on some code where it is desirable to share vertex & normal
arrays across multiple drawables (these are osg::Geometry's), *and* to allow
each drawable to have its own unique color (BIND_OVERALL).  My thinking is
that this can be done using VBOs, but I cannot find any good examples of how
to do so, particularly with normals...

For example - See the two Questions inline below:

Step 1: Create the common Geometry, then:

geom->setSupportsDisplayList(false);
geom->setUseDisplayList(false);
m_vertexBuffer = geom->getOrCreateVertexBufferObject();
m_vertexBuffer->setArray(0,&vertexArray);
m_vertexBuffer->setUsage(GL_STATIC_COPY);

// QUESTION 1: How to map the normal array?

m_vertexBuffer->dirty();
geom->setUseVertexBufferObjects(true);

Step 2: Create a second osg::Geometry node, but set its vertex buffer to the
first one

geom2->setSupportsDisplayList(false);
geom2->setUseDisplayList(false);

// QUESTION: I want to be able to do geom->setVertexBufferObject(m_vertexBuffer)
// But there is no API. Can this be done?

geom2->setUseVertexBufferObjects(true);

Any help is much appreciated.

cheers,

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


Re: [osg-users] VBOs & Shared Geometry

2008-12-01 Thread Brian R Hill
Try cloning the geoms and only changing their color array.

Brian

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
any order or other contract unless pursuant to explicit written agreement
or government initiative expressly permitting the use of e-mail for such
purpose. •
[EMAIL PROTECTED] wrote: -

To: osg-users 
From: "Sean Spicer" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
Date: 12/01/2008 05:35PM
Subject: [osg-users] VBOs & Shared Geometry

Hi Gang,

I'm working on some code where it is desirable to share vertex & normal
arrays across multiple drawables (these are osg::Geometry's), *and* to
allow each drawable to have its own unique color (BIND_OVERALL).  My
thinking is that this can be done using VBOs, but I cannot find any good
examples of how to do so, particularly with normals...

For example - See the two Questions inline below:

Step 1: Create the common Geometry, then:
geom->setSupportsDisplayList(false);

geom->setUseDisplayList(false);

m_vertexBuffer = geom->getOrCreateVertexBufferObject();


m_vertexBuffer->setArray(0,&vertexArray);

m_vertexBuffer->setUsage(GL_STATIC_COPY);


// QUESTION 1: How to map the normal array?


m_vertexBuffer->dirty();

geom->setUseVertexBufferObjects(true);



Step 2: Create a second osg::Geometry node, but set its vertex buffer to
the first one
geom2->setSupportsDisplayList(false);

geom2->setUseDisplayList(false);


// QUESTION: I want to be able to do geom->setVertexBufferObject
(m_vertexBuffer)


// But there is no API. Can this be done?


geom2->setUseVertexBufferObjects(true);

Any help is much appreciated.

cheers,

sean


___
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] DatabasePager and memory

2008-12-01 Thread Brad Colbert
Hi Robert,

> 
> If a paging thread has hung then you could try and cancel the threads
> and restart the pager.  I've never tried this myself so can't give
> particular guidance on it.
> 

I'll delve a bit deeper and see what I can get to work.

> Personally if threads have died you have already pushed this too far
> and you should be fixing things in your database and app usage so this
> doesn't occur in the first place rather than trying to patch a system
> that is grinding to a halt because you've pushed things too far.
> 

I completely agree.  We were under a time crunch for a demonstration and
where unable to rebuild the database (3 days).  The thought was that we
could get it to limp along in the really dense areas.

Any ideas on what the performance is on 64bit systems?  I would think we
should be able to get around this issue (excluding the GPU memory) on
such a system.

-B

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


[osg-users] msvc90 dependencies

2008-12-01 Thread Mattias Helsing
Hi all,

I have seen in recent posts that people aren't aware of my set of
prebuilt binaries for vc90. It is here:

http://www.openscenegraph.org/projects/osg/wiki/Community/People/MattiasHelsing

It has been there since early sept.

A few people have requested that it be linked to from the win32
dependencies wiki page but I have refrained from poking Robert about
this since I know that Mike has a plan for msvc90. Until then the link
may be a good idea.

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


Re: [osg-users] Attaching Nodes (Characters & Objects)

2008-12-01 Thread Ryan Morris
I see what you're saying, but sadly I don't have as good of grasp on how to
actually code it using OSG. Just to clarify I have an animated model that I
am loading with osg::Node(), I am not manually controlling the movement, I
have previously done that in Blender. Is there a way to get the transform of
a specific part of a node? Thanks for your help!
-Rusty
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] msvc90 dependencies

2008-12-01 Thread Sukender
Hi Mattias,

I did not went to VC9 since VC8 is "almost" identical and no dependencies were 
built. Thanks for clearing that second point.
Stupid question #1: Why use VC9? For me there is *absolutely no improvements* 
that I'll use. May we wait for VC10?
Stupid question #2: Why the hell C++ .lib can't be compatible across compilers; 
I mean, is that so difficult to set an standard? Or is there something I don't 
know?

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/


Le Tue, 02 Dec 2008 01:33:37 +0100, Mattias Helsing <[EMAIL PROTECTED]> a écrit:

> Hi all,
>
> I have seen in recent posts that people aren't aware of my set of
> prebuilt binaries for vc90. It is here:
>
> http://www.openscenegraph.org/projects/osg/wiki/Community/People/MattiasHelsing
>
> It has been there since early sept.
>
> A few people have requested that it be linked to from the win32
> dependencies wiki page but I have refrained from poking Robert about
> this since I know that Mike has a plan for msvc90. Until then the link
> may be a good idea.
>
> cheers
> Mattias
> ___
> 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] current svn compile error

2008-12-01 Thread Paul Martz
Hi Robert -- I'm getting this will trying to build the osg library. Updated
about 01:00 GMT...

BufferObject.cpp
..\..\..\src\osg\BufferObject.cpp(736) : error C2065: 'GL_ARRAY_BUFFER' :
undeclared identifier

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com  
+1 303 859 9466

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


[osg-users] some question about OSG

2008-12-01 Thread li chao
Hi everyone
   I have some questions want to ask you:
   1. how to add two OSG files into one viewer and the two things can view?
   2. I have a  terrain file and have another terrain files which is part of 
the first terrain files. but they are have different coordinates. what should 
we do can integrate the two terrain files into one viewer.
   3. how to transform the coordinates form one stly to another?
   may be the three questions talke the same thing,do you understand me? i hope 
you can help me, thank you very much! 
   watting for you rely!
   best wishes!
   
andy



li chao
2008-12-02
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgswig and wxPython

2008-12-01 Thread Randolph Fritz
Thank you.  After some experimentation, I discovered I was looking at a 
combination of minor coding errors and an IDLE interaction--if I start 
the script outside of IDLE, it now works. If you are at all interested, 
I've attached my experimental scripts. Beginner question: what are you 
using as a debugging enviroment?


Randolph

Hartmut Seichter wrote:
Its hard to guess as you don't provide the whole example - all 
self.Refresh are commented out and its not clear if you use the wxApp 
OnIdle message pump for updates. The other example (osgviewerWX.py) in 
the repository might give you some pointers.


# -*- coding: us-ascii -*-
# generated by wxGlade 0.6.3 on Sun Nov 16 18:44:07 2008

import wx
import OSGLumView

# begin wxGlade: dependencies
# end wxGlade

# begin wxGlade: extracode

# end wxGlade

class LumViewer(wx.Panel):
def __init__(self, *args, **kwds):
# begin wxGlade: LumViewer.__init__
kwds["style"] = wx.TAB_TRAVERSAL
wx.Panel.__init__(self, *args, **kwds)
self.viewer = OSGLumView.OSGLumView(self, -1)

self.__set_properties()
self.__do_layout()
# end wxGlade
self.Parent.storeCanvas(self.viewer)

def __set_properties(self):
# begin wxGlade: LumViewer.__set_properties
pass
# end wxGlade

def __do_layout(self):
# begin wxGlade: LumViewer.__do_layout
sizer_2 = wx.BoxSizer(wx.VERTICAL)
sizer_2.Add(self.viewer, 1, wx.EXPAND, 0)
self.SetSizer(sizer_2)
sizer_2.Fit(self)
# end wxGlade

def AddGeom(self,geom):
self.viewer.AddGeom(geom)

# end of class LumViewer

import osgDB
class testFrame(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(self, parent, title = "OSG Test Frame")

self.canvas = None
self.Bind(wx.EVT_IDLE, self.onIdle)

self.lum_menubar = wx.MenuBar()
wxglade_tmp_menu = wx.Menu()
wxglade_tmp_menu.Append(wx.ID_OPEN, "Open...", "Ctrl+O", wx.ITEM_NORMAL)
wxglade_tmp_menu.Append(wx.ID_EXIT, "Exit", "", wx.ITEM_NORMAL)
self.lum_menubar.Append(wxglade_tmp_menu, "File")
self.SetMenuBar(self.lum_menubar)

self.Bind(wx.EVT_MENU, self.onFileOpen, id=wx.ID_OPEN)
self.Bind(wx.EVT_MENU, self.onFileExit, id=wx.ID_EXIT)

self.lumviewer = LumViewer(self)

def onFileExit(self, event): # wxGlade: LumEdit.
self.Close()

def onFileOpen(self, event): # wxGlade: LumEdit.
dlg = wx.FileDialog(
self, style = wx.FD_OPEN,
message = "Model File")
if dlg.ShowModal() == wx.ID_OK:
try:
fn = dlg.GetPath().encode('ascii', 'replace')
geom = osgDB.readNodeFile(fn)
self.lumviewer.AddGeom(geom)
except ValueError:
  pass  # Handle the can't read error here
dlg.Destroy()

def onIdle(self,event):
if self.canvas:
self.canvas.Refresh(eraseBackground = False)

def storeCanvas(self,c):
self.canvas = c

if __name__ == '__main__':
app = wx.PySimpleApp()
frame = testFrame(None)
frame.Show(True)
app.MainLoop()
#!/usr/bin/env python

# import wxWidgets stuff
import wx
import wx.glcanvas

# import OpenSceneGraph wrapper
import osg
import osgUtil
import osgDB

class OSGLumView(wx.glcanvas.GLCanvas):
def __init__(self,parent,id):
wx.glcanvas.GLCanvas.__init__(self,parent,id)
sv = self.sceneview = osgUtil.SceneView()
self.rootnode = osg.MatrixTransformRef(osg.MatrixTransform())
sv.setSceneData(self.rootnode.get())

x,y = self.GetClientSize()

self.oldX = 0
self.oldY = 0

sv.setDefaults()

self.Bind(wx.EVT_SIZE, self.OnSize)
self.Bind(wx.EVT_PAINT, self.OnPaint)
self.Bind(wx.EVT_ERASE_BACKGROUND, self.OnEraseBackground)
self.Bind(wx.EVT_ENTER_WINDOW, self.OnEnterWindow)
self.Bind(wx.EVT_MOUSE_EVENTS, self.OnMouse)

sv.init()


def AddGeom(self, geom):
self.rootnode.addChild(geom)
# Calculate bounds & set the view matrix
self.Refresh(eraseBackground = False)


def OnMouse(self, evt):
if ((evt.Dragging() == True) and (evt.LeftIsDown() == True)):
x = evt.GetX() - self.oldY
y = evt.GetY() - self.oldY

self.sceneview.setViewMatrixAsLookAt(
osg.Vec3f(0,y,x), osg.Vec3f(0,0,0), osg.Vec3f(0,1,0))

self.Refresh(eraseBackground = False)

self.oldX = evt.GetX()
self.oldY = evt.GetY()


if ((evt.Dragging() == True) and (evt.RightIsDown() == True)) :
m = self.rootnode.getMatrix()

x,y = self.GetClientSize()

rot = osg.Matrixd()

rot.makeRotate(self.oldX - evt.GetX(), osg.Vec3f(1,0,0))

m.postMult(rot)

 

Re: [osg-users] problem with GPU draw time

2008-12-01 Thread forest37
hi Robert ,
   Thanks for your help.
   I didn't describe my problem clearly.I want wo konw something about OSG 
thread model.Take the single thread model for enstance,the time of one frame is 
the sum of event,update,cull and draw .Does it include the GPU draw time?(I am 
not sure,but I think it doesn't).So ,if the first frame's draw() function is 
finished,the second frame's event() function will be executed immediately no 
matter the GPU finishes all the OpenGL commands(am I right?).And if the GPU 
draw time is longer than the frame time,maybe the first frame's opengl commands 
haven't been finished ,the second frame's opengl commands will come.Will that 
happen?
 
  best regards
 
forest
 ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Attaching Nodes (Characters & Objects)

2008-12-01 Thread Ulrich Hertlein
Quoting Ryan Morris <[EMAIL PROTECTED]>:
> I see what you're saying, but sadly I don't have as good of grasp on how to
> actually code it using OSG. Just to clarify I have an animated model that I
> am loading with osg::Node(), I am not manually controlling the movement, I
> have previously done that in Blender. Is there a way to get the transform of
> a specific part of a node? Thanks for your help!

What do you mean by 'part of a node'?  If you have a vertex you can run that
through the nodes transformation matrix to obtain the world position.

Could you have the modeller insert a dummy 'attachment' node into the model
where you want to place the other object?  You could then query it's
transformation matrix and place your object there.

But that will only work for articulated models, not skinned ones.
/ulrich

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


Re: [osg-users] msvc90 dependencies

2008-12-01 Thread Gordon Tomlinson
#2 is simple is because Microsoft cannot write  a decent linker and compiler
and DLL's suck on Windoze compare to how binaries are  on Unix/Linux
( the IDE is the only useful things and that’s because they stole all
Borland's IDE engineers ;) )

#1 I cannot see any need to go to VC9 I know wee are not planning to ,
simply no reason whats so ever


__


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 Sukender
Sent: Monday, December 01, 2008 8:15 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] msvc90 dependencies

Hi Mattias,

I did not went to VC9 since VC8 is "almost" identical and no dependencies
were built. Thanks for clearing that second point.
Stupid question #1: Why use VC9? For me there is *absolutely no
improvements* that I'll use. May we wait for VC10?
Stupid question #2: Why the hell C++ .lib can't be compatible across
compilers; I mean, is that so difficult to set an standard? Or is there
something I don't know?

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/


Le Tue, 02 Dec 2008 01:33:37 +0100, Mattias Helsing <[EMAIL PROTECTED]> a
écrit:

> Hi all,
>
> I have seen in recent posts that people aren't aware of my set of
> prebuilt binaries for vc90. It is here:
>
>
http://www.openscenegraph.org/projects/osg/wiki/Community/People/MattiasHels
ing
>
> It has been there since early sept.
>
> A few people have requested that it be linked to from the win32
> dependencies wiki page but I have refrained from poking Robert about
> this since I know that Mike has a plan for msvc90. Until then the link
> may be a good idea.
>
> cheers
> Mattias
> ___
> 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] msvc90 dependencies

2008-12-01 Thread Gordon Tomlinson
Mattias You can edit the wiki page ..   :)

Search the wiki site for the password its on there




__

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 Mattias
Helsing
Sent: Monday, December 01, 2008 7:34 PM
To: OpenSceneGraph Users
Subject: [osg-users] msvc90 dependencies

Hi all,

I have seen in recent posts that people aren't aware of my set of
prebuilt binaries for vc90. It is here:

http://www.openscenegraph.org/projects/osg/wiki/Community/People/MattiasHels
ing

It has been there since early sept.

A few people have requested that it be linked to from the win32
dependencies wiki page but I have refrained from poking Robert about
this since I know that Mike has a plan for msvc90. Until then the link
may be a good idea.

cheers
Mattias
___
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] Attaching Nodes (Characters & Objects)

2008-12-01 Thread Ryan Morris
I have an animated human model. I want to attach something to the hand or
head or foot, etc and have that object move with that part of the body.
Apologies I should have been more clear!
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org