Re: [osg-users] Android osgPlugins

2014-05-07 Thread Wouter Roos

nathan wrote:
> Hi Jordi,
> 
> thanks for getting back to me. I did compile with OSG in static mode. Here 
> are the flags I'm using:
> 
> OSG_GLES2_VARS="-DOSG_GL1_AVAILABLE=OFF 
> -DOSG_GL2_AVAILABLE=OFF 
> -DOSG_GL3_AVAILABLE=OFF 
> -DOSG_GLES1_AVAILABLE=OFF 
> -DOSG_GLES2_AVAILABLE=ON 
> -DOSG_GL_LIBRARY_STATIC=OFF 
> -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF 
> -DOSG_GL_MATRICES_AVAILABLE=OFF 
> -DOSG_GL_VERTEX_FUNCS_AVAILABLE=OFF 
> -DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=OFF 
> -DOSG_GL_FIXED_FUNCTION_AVAILABLE=OFF"
> 
> OSG_ANDROID_VARS="-DDYNAMIC_OPENTHREADS=OFF 
> -DDYNAMIC_OPENSCENEGRAPH=OFF 
> -DOSG_BUILD_PLATFORM_ANDROID=ON 
> -DANDROID_ABI="armeabi armeabi-v7a" 
> -DANDROID_PLATFORM=7 
> -DANDROID_STL="gnustl_static" 
> -DANDROID_DEBUG=OFF 
> -DANDROID_NDK=${ANDROID_NDK_ROOT} 
> -DJ=12"
> 
> cmake ${OSG_ANDROID_VARS} ${OSG_GLES2_VARS} -DCMAKE_BUILD_TYPE=Release 
> -DCMAKE_INSTALL_PREFIX="${GLOBAL_OUTDIR}/osg-${VERSION}/${TOOLCHAIN}"
> 
> I wondered about that too, because OSG is searching for a dynamic library in 
> osgPlugins-3.2.1/ directories. I thought I didn't need to add this directory 
> with the plugins on to my device. As far as I can see I don't have an 
> osgPlugings directory produced by my OSG build for Android in the same way I 
> would for PC. Is this something I need to do? If so I would appreciate a link 
> to any instructions available.
> 
> Thanks,
> Nathan
> From:  [] on behalf of Jordi Torres []
> Sent: 09 January 2014 17:13
> To: OpenSceneGraph Users
> Subject: Re:  Android osgPlugins
> 
> 
> 
> Hi Nathan, 
> 
> Did you compile OSG in static mode as stated in the documentation?
> 
> 
> -DDYNAMIC_OPENTHREADS=OFF -DDYNAMIC_OPENSCENEGRAPH=OFF 
> 
> 
> Right now is a must to compile in static mode. We have some tests with 
> dynamic libraries but compiling in dynamic mode involves too many changes and 
> we have still work to do to make it public. 
> 
> 
> Hope it helps. 
> 
> 
> 
> 2014/1/9 Nathan Collins < ()>
> 
> >
> > Hi, 
> >   
> > I have compiled OSG for Android, and built and deployed the GLES2 Android 
> > example on my Nexus 4. However I’m having trouble loading cow.osg, or any 
> > other .osg/.osgt files, to test that it works. I’ve built OSG for Android 
> > in the past and had these models working but this time around I’m not able 
> > to load any models at all. I get the following warnings from logcat: 
> >   
> > 01-09 16:46:11.812: E/Osg Viewer(18327): There are 1 models to load 
> > 01-09 16:46:11.812: E/Osg Viewer(18327): Loading: 
> > /storage/emulated/0/cow.osgt 
> > 01-09 16:46:11.812: D/Osg Viewer(18327): 
> > FindFileInPath(/storage/emulated/0/cow.osgt): returning 
> > /storage/emulated/0/cow.osgt 
> > 01-09 16:46:11.812: D/Osg Viewer(18327): itr='/vendor/lib' 
> > 01-09 16:46:11.812: D/Osg Viewer(18327): FindFileInPath() : trying 
> > /vendor/lib/osgPlugins-3.2.1/osgdb_osg.so ... 
> > 01-09 16:46:11.812: D/Osg Viewer(18327): itr='/system/lib' 
> > 01-09 16:46:11.812: D/Osg Viewer(18327): FindFileInPath() : trying 
> > /system/lib/osgPlugins-3.2.1/osgdb_osg.so ... 
> > 01-09 16:46:11.812: D/Osg Viewer(18327): itr='/usr/lib/' 
> > 01-09 16:46:11.812: D/Osg Viewer(18327): FindFileInPath() : trying 
> > /usr/lib/osgPlugins-3.2.1/osgdb_osg.so ... 
> > 01-09 16:46:11.812: D/Osg Viewer(18327): itr='/usr/local/lib/' 
> > 01-09 16:46:11.812: D/Osg Viewer(18327): FindFileInPath() : trying 
> > /usr/local/lib/osgPlugins-3.2.1/osgdb_osg.so ... 
> > 01-09 16:46:11.812: D/Osg Viewer(18327): itr='/vendor/lib' 
> > 01-09 16:46:11.812: D/Osg Viewer(18327): FindFileInPath() : trying 
> > /vendor/lib/osgdb_osg.so ... 
> > 01-09 16:46:11.812: D/Osg Viewer(18327): itr='/system/lib' 
> > 01-09 16:46:11.812: D/Osg Viewer(18327): FindFileInPath() : trying 
> > /system/lib/osgdb_osg.so ... 
> > 01-09 16:46:11.812: D/Osg Viewer(18327): itr='/usr/lib/' 
> > 01-09 16:46:11.812: D/Osg Viewer(18327): FindFileInPath() : trying 
> > /usr/lib/osgdb_osg.so ... 
> > 01-09 16:46:11.812: D/Osg Viewer(18327): itr='/usr/local/lib/' 
> > 01-09 16:46:11.812: D/Osg Viewer(18327): FindFileInPath() : trying 
> > /usr/local/lib/osgdb_osg.so ... 
> > 01-09 16:46:11.812: I/Osg Viewer(18327): Warning: dynamic library 
> > 'osgPlugins-3.2.1/osgdb_osg.so' does not exist (or isn't readable): 
> > 01-09 16:46:11.812: I/Osg Viewer(18327): dlopen failed: library 
> > "osgPlugins-3.2.1/osgdb_osg.so" not found 
> > 01-09 16:46:11.812: I/Osg Viewer(18327): DynamicLibrary::failed loading 
> > "osgPlugins-3.2.1/osgdb_osg.so" 
> > 01-09 16:46:11.812: E/Osg Viewer(18327): Model not loaded 
> >   
> > Now I thought I didn’t have to do anything special last time to load an 
> > .osg file but I’m wondering what I’ve missed? My Android.mk file just has 
> > the standard set OSG_ANDROID_DIR and add path/to/libgnustl_static.a in 
> > LOCAL_LDLIBS modifications. I’m working with OSG branch 3.2 on Fedora, with 
> > ndk-r9c. 
> >   
> > Any help would be greatly appreciated. Thanks, 
> >   
> > Nathan 
> >   
> > Nathan C

[osg-users] OSG Pick Tex Coords

2014-05-07 Thread Nick Modly
Is there a quick/convenient way to get the tex-coord for the vertex/drawable 
returned from an intersection (i.e. the way that osgpick example returns the 
vertex world and local coordinates)? Or do you have to compute the tex coord 
yourself?

Cheers,
Nick

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





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


Re: [osg-users] Cull callbacks and Geodes

2014-05-07 Thread Farshid Lashkari
Hi Robert,

On Wed, May 7, 2014 at 10:52 AM, Robert Osfield wrote:

> Feel free to have bash implementing it, see what happens when you try
> to make the changes.  Unfortunately I'm just too hazy on the whole
> issue to know of the potential issues that might need resolving off
> the top of my head.
>

I made the proposed changes and everything seems to work properly after
some initial tests. I still want to play around some more before submitting
a patch though.

Currently, I have the Geode::traverse method call
"NodeVisitor::apply(Drawable)" directly, since there is no
"Drawable::accept(NodeVisitor)" method. Would you prefer that
"Drawable::accept(NodeVisitor)" be added so that it follows the visitor
pattern? Drawables don't currently support node masks and can't be added to
the NodePath, so the "accept" method would be directly calling
"NodeVisitor::apply()" anyway. However, one benefit of this route would be
the potential for supporting "apply" for other drawable types (ie.
Geometry). Don't know if it's worth the extra overhead though.

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


Re: [osg-users] RTT Magnifying Glass with multiple zooms

2014-05-07 Thread Nick Modly
I ended up solving 1 and 2 by using a single texture for the RTT to render the 
whole window, then setting the drawable's tex coords such that each quad zoomed 
in on the appropriate area. I haven't decided what to do about the resizing, 
but it doesn't seem to be stretching the texture (which I was worried about), 
just the shape of the magnifying box, and I may just keep that behavior.

Cheers,
Nick

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





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


Re: [osg-users] Android osgPlugins

2014-05-07 Thread Jaime

nathan wrote:
> Hi strean,
> 
> I didn't resolve this, but I'm back looking at building OSG for Android, so 
> I'll let you know how I get on.
> 
> Cheers,
> Nathan

Please, tell us how it is going. I am interested too in compile osg for 
Android. It would be great if you could give us some tips.

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





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


Re: [osg-users] Cull callbacks and Geodes

2014-05-07 Thread Robert Osfield
Hi Farshid,

On 7 May 2014 17:26, Farshid Lashkari  wrote:
> I have an application that will load a model from file and attach a custom
> cull callback to the node. I recently discovered that my cull callback does
> not work properly if the root node of the model is a Geode. When
> encountering a Geode, the CullVisitor will handle the cull callbacks and
> then traverse the Geode. However, the drawables are processed after the
> traversal, regardless of the result of the cull callbacks.
>
> I typically use cull callbacks to either prevent traversal of a node under
> certain conditions, or to wrap some custom operation around the traversal of
> the sub-graph. Neither of these are currently possible with Geodes.
>
> I recall a discussion a few years ago about making Drawable objects another
> kind of Node. Is this still being considered?

I haven't thought about it for a year or so, so it's not really fresh
in my mind.

I think might had a bash at implementing it but stalled for some
reason, I suspect parts ended up more complicated than originally
anticipated. I don't recall the details.

> If this would cause too much
> compatibility issues, how about adding an additional
> NodeVisitor::apply(Drawable) method? This would just require implementing a
> Geode::traverse method and should not cause much compatibility issues. With
> some minor changes to the CullVisitor, this would allow cull callbacks to
> work properly with geodes. I also think this would simplify implementing
> custom node visitors that operate on drawable objects.
>
> Does this seem like a reasonable change? Thoughts/suggestions?

Feel free to have bash implementing it, see what happens when you try
to make the changes.  Unfortunately I'm just too hazy on the whole
issue to know of the potential issues that might need resolving off
the top of my head.

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


Re: [osg-users] Creating working omnidirectional shadow

2014-05-07 Thread Trajce Nikolov NICK
Hi Mickael,

this is not that that simple as you already found out, but it is achievable
with proper use of some of the shadowmaps available. I am using
osgShadow::LightSpacePerspectiveShadowMapDB for large paged scenes (this
one worked best for me) and it is also based on one light 0 as Jan
described to you.

Ping me on my email, I can send you some sample code I can share

Nick


On Wed, May 7, 2014 at 6:11 PM, Jan Ciger  wrote:

> Hi,
>
> On Wed, May 7, 2014 at 5:07 PM, Mickael Fleurus 
> wrote:
>
>> Hi,
>>   I'm currently working with osgShadow, and it's driving me crazy! I'm
>> really not an expert with shader and so on, but I try to make an
>> omnidirectionnal shadow on my scenes, and I really don't know how to
>> proceed. Every already implement way of making shadow in OSG aren't
>> producing good shadows while using point light, except ShadowVolume, but it
>> produce not only shadow, but also 3D geometry, and it's not what I'm
>> looking for! I only want a realistic shadow, that work on large scene
>> wherever the light is, and I don't find how to do it.
>>
>> I tried to build my own omnidirectional shadow map, using a cube map,
>> but, obviously, I don't have the skills to do it on my own.
>>
>> Do OSG have a build-in solution that I may have missed? Is it even
>> possible to do it easily? Am I really bad at OSG or is it really difficult?
>> Please, help me, even a little, I'm stuck for too long and I don't like
>> this.
>>
>
>
> I am using the view-dependent shadow map technique for large scenes, that
> one worked best for me so far. However, that one allows only a single light
> - light 0 is used for shadow casting. See the osgShadow example.
>
> I am not sure what you mean by "omnidirectional shadows", though. Do you
> want to have a shadows cast by multiple lights at the same time? The
> techniques in OSG usually support only a single light (with a few
> exceptions like the basic shadow map - but that one is not good for large
> scenes). It would be very expensive to use something like view-dependent
> shadow map with multiple lights, as each light needs its own shadow map and
> a rendering pass too. These techniques are mostly used for things like
> rendering shadows cast by the Sun and as there is only a single Sun, the
> one light limitation is not really a big problem.
>
> What exactly are you trying to achieve? There isn't a single shadow
> rendering technique that works for every scenario, unfortunately.
>
> Regards,
>
> Jan
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


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


[osg-users] Cull callbacks and Geodes

2014-05-07 Thread Farshid Lashkari
Hi Robert, all,

I have an application that will load a model from file and attach a custom
cull callback to the node. I recently discovered that my cull callback does
not work properly if the root node of the model is a Geode. When
encountering a Geode, the CullVisitor will handle the cull callbacks and
then traverse the Geode. However, the drawables are processed after the
traversal, regardless of the result of the cull callbacks.

I typically use cull callbacks to either prevent traversal of a node under
certain conditions, or to wrap some custom operation around the traversal
of the sub-graph. Neither of these are currently possible with Geodes.

I recall a discussion a few years ago about making Drawable objects another
kind of Node. Is this still being considered? If this would cause too much
compatibility issues, how about adding an additional
NodeVisitor::apply(Drawable) method? This would just require implementing a
Geode::traverse method and should not cause much compatibility issues. With
some minor changes to the CullVisitor, this would allow cull callbacks to
work properly with geodes. I also think this would simplify implementing
custom node visitors that operate on drawable objects.

Does this seem like a reasonable change? Thoughts/suggestions?

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


Re: [osg-users] Creating working omnidirectional shadow

2014-05-07 Thread Jan Ciger
Hi,

On Wed, May 7, 2014 at 5:07 PM, Mickael Fleurus wrote:

> Hi,
>   I'm currently working with osgShadow, and it's driving me crazy! I'm
> really not an expert with shader and so on, but I try to make an
> omnidirectionnal shadow on my scenes, and I really don't know how to
> proceed. Every already implement way of making shadow in OSG aren't
> producing good shadows while using point light, except ShadowVolume, but it
> produce not only shadow, but also 3D geometry, and it's not what I'm
> looking for! I only want a realistic shadow, that work on large scene
> wherever the light is, and I don't find how to do it.
>
> I tried to build my own omnidirectional shadow map, using a cube map, but,
> obviously, I don't have the skills to do it on my own.
>
> Do OSG have a build-in solution that I may have missed? Is it even
> possible to do it easily? Am I really bad at OSG or is it really difficult?
> Please, help me, even a little, I'm stuck for too long and I don't like
> this.
>


I am using the view-dependent shadow map technique for large scenes, that
one worked best for me so far. However, that one allows only a single light
- light 0 is used for shadow casting. See the osgShadow example.

I am not sure what you mean by "omnidirectional shadows", though. Do you
want to have a shadows cast by multiple lights at the same time? The
techniques in OSG usually support only a single light (with a few
exceptions like the basic shadow map - but that one is not good for large
scenes). It would be very expensive to use something like view-dependent
shadow map with multiple lights, as each light needs its own shadow map and
a rendering pass too. These techniques are mostly used for things like
rendering shadows cast by the Sun and as there is only a single Sun, the
one light limitation is not really a big problem.

What exactly are you trying to achieve? There isn't a single shadow
rendering technique that works for every scenario, unfortunately.

Regards,

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


Re: [osg-users] Android osgPlugins

2014-05-07 Thread Nathan Collins
Hi strean,

I didn't resolve this, but I'm back looking at building OSG for Android, so 
I'll let you know how I get on.

Cheers,
Nathan

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





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


[osg-users] Creating working omnidirectional shadow

2014-05-07 Thread Mickael Fleurus
Hi,
  I'm currently working with osgShadow, and it's driving me crazy! I'm really 
not an expert with shader and so on, but I try to make an omnidirectionnal 
shadow on my scenes, and I really don't know how to proceed. Every already 
implement way of making shadow in OSG aren't producing good shadows while using 
point light, except ShadowVolume, but it produce not only shadow, but also 3D 
geometry, and it's not what I'm looking for! I only want a realistic shadow, 
that work on large scene wherever the light is, and I don't find how to do it.

I tried to build my own omnidirectional shadow map, using a cube map, but, 
obviously, I don't have the skills to do it on my own. 

Do OSG have a build-in solution that I may have missed? Is it even possible to 
do it easily? Am I really bad at OSG or is it really difficult? Please, help 
me, even a little, I'm stuck for too long and I don't like this.

Thank you!

PS: sorry for my english, I'm not completly at ease with it.

Mickael

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





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


Re: [osg-users] OpenSceneGraph BOF at SIGGRAPH 2014

2014-05-07 Thread Jaime

Jordi Torres wrote:
> Hi John, 
> 
> Is there a chance to get the presentations/slides/picks/whatever from past 
> year? It would be nice to have it in the osg website. 
> BTW I'm going to post your mail as a community new in the website.
> 
> 
> Thanks! 
> 
> 
> 
> 2014-05-07 0:47 GMT+02:00 John Richardson < ()>:
> 
> > 
> > Greetings and Salutations,
> >   
> >  
> > Birds of a Feather Session Title: OpenSceneGraph BOF
> > Date: Wednesday, August 13
> > Location: Vancouver Convention Centre
> > Time: 10:00 am - 11:00 am 
> >  
> > Be there or be OSG::SQUARE [US slang]
> >  
> > I leave one slot for Robert’s “Planned features” report
> >  
> > That leaves 3 or 4 other “show off your stuff” slots…. First come first 
> > served. 
> >  
> > John F. Richardson
> >  
> > 
> > 
> > ___
> > osg-users mailing list
> >  ()
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
> > (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> > 
> > 
> 
> 
> 
> 
> -- 
> Jordi Torres
> 
>  --
> Post generated by Mail2Forum

I agree!! It would be fantastic!!

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





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


Re: [osg-users] OpenSceneGraph BOF at SIGGRAPH 2014

2014-05-07 Thread Jordi Torres
Hi John,

Is there a chance to get the presentations/slides/picks/whatever from past
year? It would be nice to have it in the osg website.
BTW I'm going to post your mail as a community new in the website.

Thanks!


2014-05-07 0:47 GMT+02:00 John Richardson :

> Greetings and Salutations,
>
>
>
>
>
> Birds of a Feather Session Title: OpenSceneGraph BOF
>
> Date: Wednesday, August 13
>
> Location: Vancouver Convention Centre
>
> Time: 10:00 am - 11:00 am
>
>
>
> Be there or be OSG::SQUARE [US slang]
>
>
>
> I leave one slot for Robert’s “Planned features” report
>
>
>
> That leaves 3 or 4 other “show off your stuff” slots…. First come first
> served.
>
>
>
> John F. Richardson
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


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