Re: [osg-users] Dynamically changing between high and low resolution imagery/terrain

2013-07-01 Thread Chris Hanson
osgEarth.


On Mon, Jul 1, 2013 at 7:43 PM, Chris Stankevitz
wrote:

> Hello,
>
> In an application I am writing, I am looking to draw high resolution
> imagery draped over high resolution terrain.  I would like to zoom in
> and out.
>
> While zoomed in the underlying "terrain resolution" needs to be high.
> While zoomed out it can be down sampled.  Perhaps if the viewer is
> oriented such that some terrain is near and other is far (near the
> ground looking parallel to it) I might need to do something more
> complicated.
>
> I would like to employ a similar low/high resolution trick with imagery.
>
> Question: Can someone recommend a library that has already solved this
> problem of "high resolution terrain/imagery is available everywhere
> but it does not all need to be loaded at this moment due to the
> position of the viewer"?
>
> Thank you,
>
> Chris
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography
• Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS •
Android
@alphapixel  facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] List of OSG Environment Variables

2013-07-01 Thread Chris Hanson
  I was looking for an ENV variable a bit ago and couldn't remember it, so
I made myself a list of all OSG environment variables by grepping:

http://alphapixel.com/content/what-are-all-openscenegraph-environment-variables

  My source is not super-fresh, there could be ones newer than this list,
but it's a start.


-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography
• Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS •
Android
@alphapixel  facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Dynamically changing between high and low resolution imagery/terrain

2013-07-01 Thread Chris Stankevitz
Hello,

In an application I am writing, I am looking to draw high resolution
imagery draped over high resolution terrain.  I would like to zoom in
and out.

While zoomed in the underlying "terrain resolution" needs to be high.
While zoomed out it can be down sampled.  Perhaps if the viewer is
oriented such that some terrain is near and other is far (near the
ground looking parallel to it) I might need to do something more
complicated.

I would like to employ a similar low/high resolution trick with imagery.

Question: Can someone recommend a library that has already solved this
problem of "high resolution terrain/imagery is available everywhere
but it does not all need to be loaded at this moment due to the
position of the viewer"?

Thank you,

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


Re: [osg-users] Winding up to OpenSceneGraph-3.2 stable release

2013-07-01 Thread Jason Beverage
Hi Robert,

I just made some updates to osgEarth to make it compatible with the latest
changes to Geometry.  Things look good so far.

Jason


On Mon, Jul 1, 2013 at 1:13 PM, Jordi Torres  wrote:

> Hi Robert,
>
> Unfortunately it seems that latest commits have broken the build in
> Android. It compiles but it doesn't initialize the viewer. Let me dive in,
> a couple of weeks ago it was running.
>
>
> 2013/7/1 Robert Osfield 
>
>> Hi All,
>>
>> I'll be working part time this Monday and Tuesday, and on Wednesday
>> will be heading off for a two week family holiday.  My work plan for
>> the next two days merge submissions and to get another 3.1.9 dev
>> release out.  My focus will be trying to keep the code base nice and
>> stable as I have little time to go running about fixing breakages
>> introduces by submissions.
>>
>> Today I really need members of the community to pitch in and test
>> svn/trunk to make sure it builds and works well without your
>> applications, if you have bugs or build problems report them right
>> away, and if you don't report success as well so we know that we are
>> converging to a decent dev release.
>>
>> After my return from holiday my focus will be merging pending
>> submissions and then making a series of release candidates with the
>> aim for making OSG-3.2 at the end of July.  I was originally thinking
>> we'd have 3.2 in time for Siggraph but just checked the dates and it's
>> early and no longer in the first week of August, so this kinda stuffs
>> up releasing in time for Siggraph, we might be able to do a release
>> candidate though.
>>
>> One thing I'm a bit concerned about with this release cycle is just
>> how quiet the mailing list/forum is.  Normally the wind up to a stable
>> release the list is pretty active and I can have reasonable confidence
>> that the OSG is being shaken down by a good range of users across the
>> full spectrum of platforms.  We now have more platforms to support but
>> not the activity to go with it.. This makes me concerned that 3.2 will
>> go up without the testing of previous stable releases.
>>
>> One of the problems with activity might be the lack forum moderators,
>> we've made a number of calls for moderators in the past year but I
>> don't know the current status.  If people can't use the forum because
>> of lack of moderators then we need keep asking for moderators OR
>> simply stop promoting the forum from the website and point people
>> towards the mailing list as this requires very little public
>> intervention and management - it's a low cost way of us communicating,
>> it's ticked along for over a decade with few problems - I know because
>> if it did cause problems I'd be shouting about it as I maintain it.  I
>> don't use or contribute to maintenance of the forum and don't have any
>> wish to more to my workload, so If you feel that forum adds real value
>> but haven't step forward to help maintain it then do so now please :-)
>>
>> Cheers,
>> Robert.
>>
>> On 21 June 2013 16:40, Robert Osfield  wrote:
>> > Hi All,
>> >
>> > I have completed all the key bits of work that I have wanted to
>> > complete for the OSG-3.2 stable release, but there are still a few
>> > loose ends such as clearing submissions backlog and some following on
>> > work releated to the cleanup of osg::Geometry.
>> >
>> > While I have done a little bit of client work in the last month the
>> > majority of my time has been focused on work moving us towards
>> > OSG-3.2, my window of opportunity for dedicating so much time to pure
>> > open source work is limited though, I have a two week family holiday
>> > booked for the first half of July, and will likely be doing some
>> > client work end of July, then in August will be diving head long back
>> > into client work - much of this will be open source work, but it'll
>> > new feature development rather than support/release work.
>> >
>> > This gives me a short window to get 3.2 out the door, next week I'm
>> > around, then last two weeks of July are when I'll try and keep free of
>> > other commitments so I can tackle all that is required to put 3.2 to
>> > bed.  I can't make a stable release without the community though,
>> > testing across all the platforms we support, and against real
>> > applications is what we'll require to make sure OSG-3.2 is as stable
>> > and efficient as the community deserve.
>> >
>> > So please help out, lets make 3.2 our best release to date.  If you
>> > can help with testing on particular platforms please step forward, the
>> > more niche the platform the more important you'll be to making sure
>> > that your platform of choice is properly supported.  I'll be doing all
>> > my work on Kubuntu 13.04 with NVidia hardware so will be able to cover
>> > this platform, but the dozens of other combinations we support I'll
>> > need the community to pitch in.
>> >
>> > If we can I'd like to have 3.2 by the end of July, in time for
>> > Siggraph, and in time for me to relax before I 

Re: [osg-users] Winding up to OpenSceneGraph-3.2 stable release

2013-07-01 Thread Jordi Torres
Hi Robert,

Unfortunately it seems that latest commits have broken the build in
Android. It compiles but it doesn't initialize the viewer. Let me dive in,
a couple of weeks ago it was running.


2013/7/1 Robert Osfield 

> Hi All,
>
> I'll be working part time this Monday and Tuesday, and on Wednesday
> will be heading off for a two week family holiday.  My work plan for
> the next two days merge submissions and to get another 3.1.9 dev
> release out.  My focus will be trying to keep the code base nice and
> stable as I have little time to go running about fixing breakages
> introduces by submissions.
>
> Today I really need members of the community to pitch in and test
> svn/trunk to make sure it builds and works well without your
> applications, if you have bugs or build problems report them right
> away, and if you don't report success as well so we know that we are
> converging to a decent dev release.
>
> After my return from holiday my focus will be merging pending
> submissions and then making a series of release candidates with the
> aim for making OSG-3.2 at the end of July.  I was originally thinking
> we'd have 3.2 in time for Siggraph but just checked the dates and it's
> early and no longer in the first week of August, so this kinda stuffs
> up releasing in time for Siggraph, we might be able to do a release
> candidate though.
>
> One thing I'm a bit concerned about with this release cycle is just
> how quiet the mailing list/forum is.  Normally the wind up to a stable
> release the list is pretty active and I can have reasonable confidence
> that the OSG is being shaken down by a good range of users across the
> full spectrum of platforms.  We now have more platforms to support but
> not the activity to go with it.. This makes me concerned that 3.2 will
> go up without the testing of previous stable releases.
>
> One of the problems with activity might be the lack forum moderators,
> we've made a number of calls for moderators in the past year but I
> don't know the current status.  If people can't use the forum because
> of lack of moderators then we need keep asking for moderators OR
> simply stop promoting the forum from the website and point people
> towards the mailing list as this requires very little public
> intervention and management - it's a low cost way of us communicating,
> it's ticked along for over a decade with few problems - I know because
> if it did cause problems I'd be shouting about it as I maintain it.  I
> don't use or contribute to maintenance of the forum and don't have any
> wish to more to my workload, so If you feel that forum adds real value
> but haven't step forward to help maintain it then do so now please :-)
>
> Cheers,
> Robert.
>
> On 21 June 2013 16:40, Robert Osfield  wrote:
> > Hi All,
> >
> > I have completed all the key bits of work that I have wanted to
> > complete for the OSG-3.2 stable release, but there are still a few
> > loose ends such as clearing submissions backlog and some following on
> > work releated to the cleanup of osg::Geometry.
> >
> > While I have done a little bit of client work in the last month the
> > majority of my time has been focused on work moving us towards
> > OSG-3.2, my window of opportunity for dedicating so much time to pure
> > open source work is limited though, I have a two week family holiday
> > booked for the first half of July, and will likely be doing some
> > client work end of July, then in August will be diving head long back
> > into client work - much of this will be open source work, but it'll
> > new feature development rather than support/release work.
> >
> > This gives me a short window to get 3.2 out the door, next week I'm
> > around, then last two weeks of July are when I'll try and keep free of
> > other commitments so I can tackle all that is required to put 3.2 to
> > bed.  I can't make a stable release without the community though,
> > testing across all the platforms we support, and against real
> > applications is what we'll require to make sure OSG-3.2 is as stable
> > and efficient as the community deserve.
> >
> > So please help out, lets make 3.2 our best release to date.  If you
> > can help with testing on particular platforms please step forward, the
> > more niche the platform the more important you'll be to making sure
> > that your platform of choice is properly supported.  I'll be doing all
> > my work on Kubuntu 13.04 with NVidia hardware so will be able to cover
> > this platform, but the dozens of other combinations we support I'll
> > need the community to pitch in.
> >
> > If we can I'd like to have 3.2 by the end of July, in time for
> > Siggraph, and in time for me to relax before I run 43 miles along the
> > northern half of the West Highland Way on the 3rd of August ;-)
> >
> > In a perfect world I'd tag 3.2 for the end of next week, but
> > realistically this is unlikely to result in a stable release that has
> > been tested well enough!
> >
> > Thanks in advance for 

Re: [osg-users] Instancing with VertexAttribDivisor

2013-07-01 Thread Robert Osfield
On 1 July 2013 14:57, Aurelien Albert  wrote:
> Unfortunally, support for ATTRIB_DIVISOR is removed from official osg source 
> since today...

To clarify there was never any proper attribute divisor support in the
OSG, only some enum entries that had no back end support.  All I
removed today was the enum entries, so just removed the illusion of
support for attribute divisor.

Once we have a backend implementation then then enum enties can make a
come back.

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


Re: [osg-users] External texture/fbo

2013-07-01 Thread Jan Ciger
On Mon, Jul 1, 2013 at 4:00 PM, Aurelien Albert
 wrote:
> Hi,
>
> This tip works well, but you have to be aware of ressource creation/deletion 
> either by OSG and Qt5, specially be carefull of the "current OpenGL context".
>
> I recommend you to write the wrapper for a simple texture, make it works, 
> then make in works in all situation (a single graph / single viewer, multiple 
> viewers, different treading modes, mulitple use of the texture node...) 
> before going further with other classes like FBO or shaders.

Yep, I am quite aware of those things. That is going to be a pain,
because Qt5 deletes its own scenegraph at will, e.g. when the
widget/window/object gets hidden, deleting all the resources too.

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


Re: [osg-users] External texture/fbo

2013-07-01 Thread Aurelien Albert
Hi,

This tip works well, but you have to be aware of ressource creation/deletion 
either by OSG and Qt5, specially be carefull of the "current OpenGL context".

I recommend you to write the wrapper for a simple texture, make it works, then 
make in works in all situation (a single graph / single viewer, multiple 
viewers, different treading modes, mulitple use of the texture node...) before 
going further with other classes like FBO or shaders.


Cheers,
Aurelien

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





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


Re: [osg-users] Instancing with VertexAttribDivisor

2013-07-01 Thread Aurelien Albert
Hi,

Unfortunally, support for ATTRIB_DIVISOR is removed from official osg source 
since today...

You can still use it by crating a drawcallback (or subclassing a drawable) and 
call glVertexAttriDivisor were needed.

Just be carefull to reset to previous values brfore exiting the 
"drawImplementation" method to not disturb the other nodes rendering.



Cheers,
Aurelien

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





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


Re: [osg-users] External texture/fbo

2013-07-01 Thread Jan Ciger
Hi,

On Mon, Jul 1, 2013 at 3:55 PM, Aurelien Albert
 wrote:
> Hi,
>
> I've done this for interoperability between OSG and client library, for 
> exampe for a texture :
>
> I've created a "WrapperTexture" class which inherits from osg::StateAttribute 
> directly.
>
> - It expose it's StateAttribute type (getType() method) as TEXTURE
> - It contain a member which is an instance of my client library's texture 
> class
> - in "apply" method, it call the equivalent of "apply" on my client library 
> texture class.
>
> You can start be creating a class which inherit from osg::StateAttribute, 
> implements all pure-virtual methods and have a look to osg::Texture and 
> osg::Texture2D to see what methods needs to be overriden (like getModeUsage() 
> and isTextureAttribute())
>

Ah, cool, I didn't think about doing that. Thanks for the tip, let me
have a go at this.

Regards,

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


Re: [osg-users] External texture/fbo

2013-07-01 Thread Aurelien Albert
Hi,

I've done this for interoperability between OSG and client library, for exampe 
for a texture :

I've created a "WrapperTexture" class which inherits from osg::StateAttribute 
directly.

- It expose it's StateAttribute type (getType() method) as TEXTURE
- It contain a member which is an instance of my client library's texture class
- in "apply" method, it call the equivalent of "apply" on my client library 
texture class.

You can start be creating a class which inherit from osg::StateAttribute, 
implements all pure-virtual methods and have a look to osg::Texture and 
osg::Texture2D to see what methods needs to be overriden (like getModeUsage() 
and isTextureAttribute())

Cheers,
Aurelien

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





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


[osg-users] External texture/fbo

2013-07-01 Thread Jan Ciger
Hello,

I am playing a bit with the new Qt5 QML functionality, hoping to find
a way to render Qt-created FBOs/textures inside of the OSG scenegraph.
However, for that I need to have a way to pass the OpenGL texture/fbo
handles to OSG. I haven't found a way how to construct e.g. a
Texture2D instance around an id that was created by someone else. Is
there something (constructor, factory, ...) for doing this?

I could, of course, grab the texture into an image and then recreate
it on the OSG side, but that is slow - it requires downloading of the
texture from the GPU and then re-uploading. Being able to use the
pre-filled FBOs would be ideal. Qt seems to be able to render into
them, just I don't see a way how to tell OSG about it.

Regards,

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


[osg-users] FBX changes pending in osg-submussions

2013-07-01 Thread Robert Osfield
Hi All,

I am most the way through my osg-submissions purge but haven't yet
tackled a couple of submissions relating to the FBX plugin.  In order
of time from oldest pending sending mission to most recent:

30/5/2012  Gil Hadas [osg-submissions] upgrade plugin to use FBX SDK
version 2013.1 - DFBXSDK_NEW_API

31/5/2012 Sukender [osg-submissions] FBX - 4 patches (useFbxRoot,
AssetUnitMeter, PreTransform, texcoord)

A post which Michael Platings replied:

"Hi Sukender & Robert,

sorry it's been a while since I checked in (nearly a year!)
I switched jobs last year and although I'm still using OSG I'm no
longer involved in anything FBX related.
It seems only fair that write access to the FBX project be passed over
to someone else, and as the most active submitter, Sukender seems the
most suitable person to become the new FBX curator :)"

17/10/2012 Sergey Polischuk [osg-submissions] fbx plugin: texturing
fixes, added new read option

7/12/2012 Kevin Godby [osg-submissions] Updated FBX plugin (to 2012.3)


These posts ot osg-submissions don't have any replies, follow or
confirmation of being merged.  Michael used to maintain the plugin so
I didn't have to worry about it which is great because it means less
work for an already overload me, and it means I don't have to make
decisions on code that I didn't write and for the FBX SDK that I know
nothing about.

I basically am in a weak position to resolve this pending submission
and need someone to step forward and take responsibility for this
plugin, this could mean that you'll get write permission to the plugin
so you can't directly merge the changes above, or for you to sort
through them and decide final code changes that will work on
svn/trunk.   Please note that the FBX plugin has had a few recent
changes to it to keep things compiling against the new changes to the
osg::Geometry class.

So please, can someone using the FBX plugin regularly and who knows
this code base a little set forward, and for the members of the
community that use FBX step forward and discuss what changes you feel
should be merged and any changes that might be required.

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


Re: [osg-users] Winding up to OpenSceneGraph-3.2 stable release

2013-07-01 Thread Robert Osfield
Hi All,

I'll be working part time this Monday and Tuesday, and on Wednesday
will be heading off for a two week family holiday.  My work plan for
the next two days merge submissions and to get another 3.1.9 dev
release out.  My focus will be trying to keep the code base nice and
stable as I have little time to go running about fixing breakages
introduces by submissions.

Today I really need members of the community to pitch in and test
svn/trunk to make sure it builds and works well without your
applications, if you have bugs or build problems report them right
away, and if you don't report success as well so we know that we are
converging to a decent dev release.

After my return from holiday my focus will be merging pending
submissions and then making a series of release candidates with the
aim for making OSG-3.2 at the end of July.  I was originally thinking
we'd have 3.2 in time for Siggraph but just checked the dates and it's
early and no longer in the first week of August, so this kinda stuffs
up releasing in time for Siggraph, we might be able to do a release
candidate though.

One thing I'm a bit concerned about with this release cycle is just
how quiet the mailing list/forum is.  Normally the wind up to a stable
release the list is pretty active and I can have reasonable confidence
that the OSG is being shaken down by a good range of users across the
full spectrum of platforms.  We now have more platforms to support but
not the activity to go with it.. This makes me concerned that 3.2 will
go up without the testing of previous stable releases.

One of the problems with activity might be the lack forum moderators,
we've made a number of calls for moderators in the past year but I
don't know the current status.  If people can't use the forum because
of lack of moderators then we need keep asking for moderators OR
simply stop promoting the forum from the website and point people
towards the mailing list as this requires very little public
intervention and management - it's a low cost way of us communicating,
it's ticked along for over a decade with few problems - I know because
if it did cause problems I'd be shouting about it as I maintain it.  I
don't use or contribute to maintenance of the forum and don't have any
wish to more to my workload, so If you feel that forum adds real value
but haven't step forward to help maintain it then do so now please :-)

Cheers,
Robert.

On 21 June 2013 16:40, Robert Osfield  wrote:
> Hi All,
>
> I have completed all the key bits of work that I have wanted to
> complete for the OSG-3.2 stable release, but there are still a few
> loose ends such as clearing submissions backlog and some following on
> work releated to the cleanup of osg::Geometry.
>
> While I have done a little bit of client work in the last month the
> majority of my time has been focused on work moving us towards
> OSG-3.2, my window of opportunity for dedicating so much time to pure
> open source work is limited though, I have a two week family holiday
> booked for the first half of July, and will likely be doing some
> client work end of July, then in August will be diving head long back
> into client work - much of this will be open source work, but it'll
> new feature development rather than support/release work.
>
> This gives me a short window to get 3.2 out the door, next week I'm
> around, then last two weeks of July are when I'll try and keep free of
> other commitments so I can tackle all that is required to put 3.2 to
> bed.  I can't make a stable release without the community though,
> testing across all the platforms we support, and against real
> applications is what we'll require to make sure OSG-3.2 is as stable
> and efficient as the community deserve.
>
> So please help out, lets make 3.2 our best release to date.  If you
> can help with testing on particular platforms please step forward, the
> more niche the platform the more important you'll be to making sure
> that your platform of choice is properly supported.  I'll be doing all
> my work on Kubuntu 13.04 with NVidia hardware so will be able to cover
> this platform, but the dozens of other combinations we support I'll
> need the community to pitch in.
>
> If we can I'd like to have 3.2 by the end of July, in time for
> Siggraph, and in time for me to relax before I run 43 miles along the
> northern half of the West Highland Way on the 3rd of August ;-)
>
> In a perfect world I'd tag 3.2 for the end of next week, but
> realistically this is unlikely to result in a stable release that has
> been tested well enough!
>
> Thanks in advance for you help,
> Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Instancing with VertexAttribDivisor

2013-07-01 Thread James Turner
Hi (especially to Aurelien if he's reading),

I'd like to understand the plan for support of instanced drawing in the revised 
Geometry and Array classes, using per-instance attribute arrays via divisors.

Also, if possible, I'd appreciated some suggestions for achieving the same in a 
custom drawable with older versions of OSG (perhaps as far back as 3.0!). I 
have the impression from other posts here that there is some hybrid approach 
where Arrays and PrimitveSets can still be used to specify the repeating 
geometry, but the per-instance attributes being specified manually? A 
pseudo-code, or even working-code example of this, would really enlighten me. 

Note I'm only concerned about platforms with support via 
glVertexAttribDivisor(ARB), since this covers everything I care about in 
practice - even compatibility mode on Apple with GL 2.1 support this via an 
extension.

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


Re: [osg-users] [osgPlugins] osgAnimation and TimelineAnimationManager

2013-07-01 Thread Francesco Argese
Hi Cedric,

I'm interested to the source code of the link that you provided 
(http://hg.plopbyte.net/pokme) but the link seems to be broken.

Where can I find it?

Thanks in advance,
Francesco


Cedric Pinson wrote:
> 
> I have started the Timeline Animation manager with pokme project... It
> worked when I used it, so I guess you can have a look to the source of
> pokme http://hg.plopbyte.net/pokme
> 
> I know that this manager needs more work but I didn't have the time to
> improve it... anyway if you have sample code to reproduce the problem I
> will be happy to help.
> 
> For info, pokme use timeline animation manager with skinned model
> 



Francesco Argese

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





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


Re: [osg-users] Passing location-based data to a fragment shader

2013-07-01 Thread Shahar Kosti
Hi Nick, 

Yes, this is part of what I'm trying to do (I'd like to do the same with osg 
models). I'd be glad if you could elaborate on the different approach, even 
though I would probably go with pre-generating the texture along with the 
archive.

Thanks,
Shahar


Trajce Nikolov NICK wrote:
> Hi Shahar,
> 
> I read this post and found it interesting. Just out of curiosity :
> 
> 
> Each texel in the new texture, should be set based on the world location of 
> the corresponding texel in the current geometry texture
> 
> 
> 
> Are you trying to overlay a texture on top of txp archive and it should be 
> georeferenced? If so, there might be a different approach
> 
> 
> Nick
> 


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





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


Re: [osg-users] Passing location-based data to a fragment shader

2013-07-01 Thread Shahar Kosti
Hi Sebastian,
Thanks for the detailed explanation and the hints regarding texture/world 
coordinates. I've tried binding at the tile level as you suggested, but 
apparently the additional data source is not fast enough to be used at 
real-time.
At this point, I'm going to have the original terrain model regenerated with 
two textures for each tile, instead of constructing the second texture on the 
fly. As far as I understand, binding a second texture should be possible with 
the OSG and TXP formats.
So thanks again for attempting to help with issue.

Best,
Shahar


Sebastian Messerschmidt wrote:
> You don't really need to bind at a level this deep. Usually if the 
> "terrain tile" is loaded and represent a LOD you want to work with, you 
> can simple add your data texture(s) as uniform to the stateset of the tile.
> Given you have a texture with the data-image called "texture" you can do 
> it this way in your callback:
> 
> osg::StateSet* state_set = node->getOrCreateStateSet();
> osg::Uniform* sampler = new osg::Uniform("MyDataSamper",  2 
> /*texture unit*/);
> 
> state_set->setTextureAttribute(unit, texture ,osg::StateAttribute::ON);
> state_set->addUniform(sampler);
> 
> With this you bind the texture to a sampler for your shader, at the 
> texture unit 2. Depending on how many textures are already bound you 
> might need to modify the unit.
> In the fragment shader you can now access the texture via:
> 
> uniform sampler2D MyDataSampler
> ..
> ..
> 
> main()
> {
> vec2 tex_coord = gl_TexCoord[0].st;
> vec4 data = texture2D(MyDataSampler, tex_coord);
> }
> 


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





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