[osg-users] Wish: convert osgGA::GUIEventAdapter to QKeySequence

2012-02-09 Thread Thomas Lerman
I really wish I could turn a osgGA::GUIEventAdapter to a QKeySequence (Qt) when 
KEYDOWN == ea.getEventType().

For example, Ctrl+Shift+ (or Ctrl+) has ea.key=31 (unit 
separator) and ea.unmodified=0. I have had several other situations that are 
very similar, not seeming to be able to make a clear translation.

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





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


Re: [osg-users] How to create ive and 3ds files

2012-02-09 Thread Chris Hanson
>
>   What are you trying to create an IVE or 3DS file OF?
>>
> I want to create resources or osg files using code or some tool?
> like islands.ive cow.osg. By looking at the cow,osg file i think its not
> hard coded . its generated. so I would lke to know how it is generated?
>

  The OSG and IVE formats are generated by code, but the data within them
(the cow, or the islands) aren't necessarily generated. Cow.osg was
probably converted from some other file format, where it was hand-modeled
in a modeling package like Blender or Lightwave.

  The osgconv tool can convert from other file formats (like Lightwave or
3D Studio) to OSG's file formats (OSG, IVE).


>
>> --
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 • Telemetry • Cryptography • Digital Audio •
LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to create ive and 3ds files

2012-02-09 Thread Mohammed Rashad
On Fri, Feb 10, 2012 at 9:21 AM, Chris Hanson  wrote:

> On Thu, Feb 9, 2012 at 8:45 PM, Mohammed Rashad <
> mohammedrasha...@gmail.com> wrote:
>
>> How to create ive and 3ds files?
>> How osg generates those files?
>> Is it through code? If yes any example?
>> Does it uses any external tool? If yes which?
>>
>
>   Your questions doesn't really make much sense.
>
>   What are you trying to create an IVE or 3DS file OF?
>
I want to create resources or osg files using code or some tool?
like islands.ive cow.osg. By looking at the cow,osg file i think its not
hard coded . its generated. so I would lke to know how it is generated?

>
> --
> 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 • Telemetry • Cryptography • Digital Audio •
> LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


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


Re: [osg-users] How to create ive and 3ds files

2012-02-09 Thread Chris Hanson
On Thu, Feb 9, 2012 at 8:45 PM, Mohammed Rashad
wrote:

> How to create ive and 3ds files?
> How osg generates those files?
> Is it through code? If yes any example?
> Does it uses any external tool? If yes which?
>

  Your questions doesn't really make much sense.

  What are you trying to create an IVE or 3DS file OF?

-- 
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 • Telemetry • Cryptography • Digital Audio •
LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to create ive and 3ds files

2012-02-09 Thread Mohammed Rashad
How to create ive and 3ds files?

How osg generates those files?

Is it through code? If yes any example?

Does it uses any external tool? If yes which?

Thanks in advance.

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


Re: [osg-users] [osgdem] generate osgdem aligned with osgOcean

2012-02-09 Thread Jean-Sébastien Guay

Hello Rashad,


how to generate .ive files which can be aligned similar to islands.ive
in osgOcean.
osgOcean suites most of my needs. it can show islands.ive files but
works perfectly only with shipped resources cannot use custom resources
i build ive files using osdem. but the dem is not overlaying correctly
on ocean surface . i used cow.osg and it also work as expected . I also
played with few other ive and .osg files which works like charm
so the problem is with the .ive file generated with osgdem. how can I
generated .ive files for osgdem.

Is there any other way other than osgdem to genreate dems from SRTM or
tiff files


Are you sure your DEM is not simply below the ocean somewhere? Or 
perhaps your DEM is very far off in the distance? The oceanExample 
camera starts close to (0,0,0), so if you're loading your DEM into that 
to test, it may just be that your DEM is in global coordinates or 
somewhere far off... To test this you could load your DEM with cow.osg, 
if they end up very far apart that means your DEM is indeed somewhere 
far from (0,0,0).


As for the height, you can translate the ocean surface, have a look at 
OceanScene's API there is a way to set ocean height.


The DEM you are generating is presumably just geometry like any other, 
it should not behave differently than other models (though I can't be 
totally sure about that, it may be doing something weird, but I doubt 
it). cessna.osg is similarly bare-bones geometry and that works fine.


If you don't know what else to do, you can perhaps send (or place on 
some file-sharing site) a model containing a single level of a single 
tile of a DEM that demonstrates the problem, along with the command line 
that reproduces your problem with that data, and someone will probably 
try it out and see what they get.


Hope this helps,

J-S
--
__
Jean-Sebastien Guay  jean_...@videotron.ca
http://whitestar02.dyndns-web.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Compiling OSG for Android on Tegra2

2012-02-09 Thread Paul George
I am sure I turned off the NEON extension because when I didn't I only got
a black screen (I can display a cow :) ).
Thanks for your solution, I'll try it as soon as possible !

Le 9 février 2012 19:10, Kyle Gancarz  a écrit :

> I think you and i are in the same boat with armeabi v7a (I think we likely
> didn't turn off the extension when compiling the osg libs but not really
> sure)
>
> anyway try compiling only for armeabi and not v7a, should work. had
> success on my a500 at least
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=45387#45387
>
>
>
>
>
> ___
> 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] [build] [build] building osgAndroidExampleGLES* on Ubuntu 10.04 with android-ndk-r7

2012-02-09 Thread Kyle Gancarz

Jorge Izquierdo Ciges wrote:
> NDK r7 has a strange bug with the order of linking std libraries just add 
> -lgnustl_static at the end and it will be solved.
> 


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





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


[osg-users] [osgdem] generate osgdem aligned with osgOcean

2012-02-09 Thread Mohammed Rashad
how to generate .ive files which can be aligned similar to islands.ive in
osgOcean.
osgOcean suites most of my needs. it can show islands.ive files but works
perfectly only with shipped resources cannot use custom resources
i build ive files using osdem. but the dem is not overlaying correctly on
ocean surface . i used cow.osg and it also work as expected . I also played
with few other ive and .osg files which works like charm
so the problem is with the .ive file generated with osgdem. how can I
generated .ive files for osgdem.

Is there any other way other than osgdem to genreate dems from SRTM or tiff
files

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


Re: [osg-users] [build] OSG for Android build on Fedora cpp errors

2012-02-09 Thread Kyle Gancarz
Yes, I assume I missed a neon extension reference in when building the actual 
osg libs [think i saw one lingering in a make template somewhere], but going 
for armeabi seems to do the trick.

working with opengles 2.0


Jan Ciger wrote:
> On Thu, Feb 9, 2012 at 4:53 PM, Kyle Gancarz < ()> wrote:
> 
> >  
> > tommacco wrote:
> > 
> > > I had that issue with armeabi v7 (even with neon extension disabled, 
> > > though I only disabled it in the example and didn't look through any of 
> > > the osg lib make files for it), so I disabled that in the Application.mk,
> > > 
> > 
> > 
> 
> Aha, so you are compiling for the older armeabi, with Neon disabled. Which 
> OpenGL ES version? 
> 
> J.
> 
>  --
> Post generated by Mail2Forum


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





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


Re: [osg-users] Compiling OSG for Android on Tegra2

2012-02-09 Thread Kyle Gancarz
I think you and i are in the same boat with armeabi v7a (I think we likely 
didn't turn off the extension when compiling the osg libs but not really sure)

anyway try compiling only for armeabi and not v7a, should work. had success on 
my a500 at least

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





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


Re: [osg-users] [build] OSG for Android build on Fedora cpp errors

2012-02-09 Thread Jan Ciger
On Thu, Feb 9, 2012 at 4:53 PM, Kyle Gancarz  wrote:

>
> tommacco wrote:
> > I had that issue with armeabi v7 (even with neon extension disabled,
> though I only disabled it in the example and didn't look through any of the
> osg lib make files for it), so I disabled that in the Application.mk,
>

Aha, so you are compiling for the older armeabi, with Neon disabled. Which
OpenGL ES version?

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


Re: [osg-users] [osgdem] parameter to increase height

2012-02-09 Thread Robert Osfield
On 9 February 2012 16:32, Mohammed Rashad  wrote:
> yes  a lift in block of ups in dems

Sorry, yet another almost meaningless statement.  What are you
specifically talking?? Which piece of software???
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgdem] parameter to increase height

2012-02-09 Thread Mohammed Rashad
On Thu, Feb 9, 2012 at 9:45 PM, Robert Osfield wrote:

> Hi Rashad,
>
> On 9 February 2012 15:26, Mohammed Rashad 
> wrote:
> > How to increase the height of the output elevation?
>
> You'll need to provide a bit more context.  output elevation of what?
> An lift in a local tower block?
>
yes  a lift in block of ups in dems

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



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


Re: [osg-users] OSG on OpenGL 3: Example code and cookbook

2012-02-09 Thread Paul Martz
Sounds good to me, thanks for the changes. So this will be included in GL2 
builds, excellent.

   -Paul


On 2/9/2012 8:34 AM, Robert Osfield wrote:

Hi Paul,

I am just working on merging your gl3example.cpp into svn/trunk and
have renamed it osgsimplegl3 as it's a very bare bones little viewer
example.  I have also added the following lines just before the
viewer.run() so that the example works fine on GL2 etc. builds.

 // for non GL3/GL4 and non GLES2 platforms we need enable the osg_
uniforms that the shaders will use,
 // you don't need thse two lines on GL3/GL4 and GLES2 specific
builds as these will be enable by default.
 gc->getState()->setUseModelViewAndProjectionUniforms(true);
 gc->getState()->setUseVertexAttributeAliasing(true);

Is this OK?

Robert.

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


Re: [osg-users] [osgdem] parameter to increase height

2012-02-09 Thread Robert Osfield
Hi Rashad,

On 9 February 2012 15:26, Mohammed Rashad  wrote:
> How to increase the height of the output elevation?

You'll need to provide a bit more context.  output elevation of what?
An lift in a local tower block?

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


Re: [osg-users] [build] OSG for Android build on Fedora cpp errors

2012-02-09 Thread Kyle Gancarz

tommacco wrote:
> I had that issue with armeabi v7 (even with neon extension disabled, though I 
> only disabled it in the example and didn't look through any of the osg lib 
> make files for it), so I disabled that in the Application.mk,
> 
> 
> 
> Jan Ciger wrote:
> > Hi Kyle, 
> > 
> > On Thu, Feb 9, 2012 at 8:01 AM, Kyle Gancarz < ()> wrote:
> > 
> > >  eh nevermind, just needed to figure out how to use it
> > > 
> > 
> > I am surprised you have managed to get it working on Iconia tablet. We have 
> > been trying to do the same here and the application loads, but crashes 
> > immediately after tapping the screen. What settings did you use to compile 
> > OSG? Which ABI (armeabi or armeabi v7?) and OpenGL ES version (1.1 or 
> > 2.0?). We had to also disable the Neon instructions before it was even 
> > willing to run (Tegra doesn't have them).
> > 
> > We had also some linking/compilation issues with the example code here, but 
> > that was fixed by hacking the makefile a bit.
> > 
> > Regards,
> > 
> > Jan
> > 
> >  --
> > Post generated by Mail2Forum
> 


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





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


Re: [osg-users] [build] OSG for Android build on Fedora cpp errors

2012-02-09 Thread Kyle Gancarz
I had that issue with armeabi v7 (even with neon extension disabled, though I 
only disabled it in the example and didn't look through any of the osg lib make 
files for it), so I disabled that in the Application.mk,



Jan Ciger wrote:
> Hi Kyle, 
> 
> On Thu, Feb 9, 2012 at 8:01 AM, Kyle Gancarz < ()> wrote:
> 
> >  eh nevermind, just needed to figure out how to use it
> > 
> 
> I am surprised you have managed to get it working on Iconia tablet. We have 
> been trying to do the same here and the application loads, but crashes 
> immediately after tapping the screen. What settings did you use to compile 
> OSG? Which ABI (armeabi or armeabi v7?) and OpenGL ES version (1.1 or 2.0?). 
> We had to also disable the Neon instructions before it was even willing to 
> run (Tegra doesn't have them).
> 
> We had also some linking/compilation issues with the example code here, but 
> that was fixed by hacking the makefile a bit.
> 
> Regards,
> 
> Jan
> 
>  --
> Post generated by Mail2Forum


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





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


Re: [osg-users] OSG on OpenGL 3: Example code and cookbook

2012-02-09 Thread Robert Osfield
Hi Paul,

I am just working on merging your gl3example.cpp into svn/trunk and
have renamed it osgsimplegl3 as it's a very bare bones little viewer
example.  I have also added the following lines just before the
viewer.run() so that the example works fine on GL2 etc. builds.

// for non GL3/GL4 and non GLES2 platforms we need enable the osg_
uniforms that the shaders will use,
// you don't need thse two lines on GL3/GL4 and GLES2 specific
builds as these will be enable by default.
gc->getState()->setUseModelViewAndProjectionUniforms(true);
gc->getState()->setUseVertexAttributeAliasing(true);

Is this OK?

Robert.


On 6 January 2012 15:32, Paul Martz  wrote:
> On 1/5/2012 10:18 AM, Robert Osfield wrote:
>>
>> Thanks for this.  Do you feel it'd be appropriate to have this as an
>> one of the OpenSceneGraph/examples?
>
>
> Hi Robert -- I do think it would be good to have it available, so if you'd
> like to include it in the examples, please do. I've attached an updated
> version that cleans up the code and comments a little bit. I'll forgo any
> kind of copyright and donate the code to the public domain (noted at the top
> of the file).
>
> I presume this would need to be added in such a way that it only builds for
> GL3, and there are a few different ways to do that. I'll leave the decision
> up to you to set a precedent for how GL3-specific examples should be added.
>   -Paul
>
>
>
>
>
> ___
> 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] [osgdem] parameter to increase height

2012-02-09 Thread Mohammed Rashad
How to increase the height of the output elevation?

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


Re: [osg-users] Visualize water on dem

2012-02-09 Thread Kim Bale
Hi Mohammed,

There's nothing particularly unique about the islands in osgOcean, they're
a model like any other.

You will need to set the nodemask on any model you include under OceanScene
though to ensure they are included in the various effects.

E.g.
http://code.google.com/p/osgocean/source/browse/trunk/src/oceanExample/Scene.cpp#230

The example application in the osgocean source should give you an idea of
how to combine your own models with osgOcean.

Regards,

Kim.

On 9 February 2012 14:31, Mohammed Rashad wrote:

> i can visualize islands on osgocean
> this is exactly what i want
> but cant visualize my own islands
> how to generate islands for fitting in osgOcean
> or how to chnage osgOcean to fit my own dem generated using osgdem which
> is an ive file
>
> On Thu, Feb 9, 2012 at 5:59 PM, Mohammed Rashad <
> mohammedrasha...@gmail.com> wrote:
>
>> fixed the issue by skipping setlocale VTBuilder/App.cpp 80
>>
>>
>> On Thu, Feb 9, 2012 at 5:45 PM, Sergey Kurdakov 
>> wrote:
>>
>>> Hi
>>>
>>> I would suggest, that you compile http://code.google.com/p/vtp/ there
>>> you will see, how to
>>> lay roads ( they are similar to rivers, just consist of straight
>>> segments, and rivers from curved segments),
>>>
>>> if you  use http://qt.nokia.com/products/developer-tools/ you would be
>>> able to visually set breakpoints
>>> and see, how roads are laid onto terrain.
>>>
>>> also - the project http://osgearth.org/ has code to combine different
>>> layers.
>>>
>>> the other one which might be of interest is
>>> http://www.osgvisual.org/projects/osgvisual/
>>>
>>> so it is only by debugging someones code you would get idea,
>>>
>>> there is also FlightGear simulator which is built using osg  - it also
>>> has rivers etc. You may ask where rivers are laid in code in FlightGear dev
>>> list..
>>>
>>> you may also take a look at delta3d http://www.delta3d.org
>>> though old, this page seems appropriate
>>> http://www.delta3d.org/article.php?story=20051013142113452
>>>
>>> it is not that easy, still, from my experience  - looking for familiar
>>> words like road in code it is possible to set breakpoint or watchpoint (
>>> that the variable changed somewhere ) and then figure out what happens.
>>>
>>> Also I would suggest to search for osg books ( they are available on the
>>> internet in pdf format ) from that books you would get a strong foundation
>>> to move forward.
>>>
>>> Best regards
>>> Sergey
>>>
>>>
>>> On Thu, Feb 9, 2012 at 3:27 PM, Mohammed Rashad <
>>> mohammedrasha...@gmail.com> wrote:
>>>
 Thanks Sergery. But I am a newbie to this OSG,OpenGL and 3D. But I am
 going to do my phd related to virtual reality which I think will help to
 contribute to OSG and entire community because I am on the open source
 coding part. I do C++ well.

 So If you have some free time with you. can you tell me a detailed step
 for visualizing water over dem.

 The mail you posted before may be a detailed step but not for a
 beginner like me.

 Thanks in advance

 On Thu, Feb 9, 2012 at 4:23 AM, Sergey Kurdakov >>> > wrote:

> Hi Rashad,
>
> in case you did not get reply from osgRiver author - few spare
> thoughts ( do not expect too much, just some ideas),
>
> I think, that the approach to render rivers over dem is many  step
> task.
>
> 1) st you decide where river would be in 2D
> 2) nd compute intersections along  river boundaries ( with some
> interval step ), and compute heigh of
> river ( river would be represented as a set of patches ) if it
> approximates those points ( the rivers could change it's height see code
> and first pdf I sent )
>
> 3) if the error between terrain and river is big you should re
> tesselate the whole thing with new points
>
> basically you should change you dem so that river was below highest
> points along the 2D path ( when seen from above).
>
> how to re tesselate?
>
> I think, that it is possible  to use http://gts.sourceforge.net/though 
> tessellating square grid is trivial, then
> you can move internal points to height which are better suite your
> needs.
> then you can join your more tesselated patches with whole dem as
> described in
> http://hal.inria.fr/docs/00/41/62/21/PDF/eusipco09_3_1.pdf
>
> if still it gives too much error you might then develop a custom
> terrain using
>   http://tetgen.berlios.de/ (
> http://tetgen.berlios.de/features.html#F3 )
>
> so that you place a lot of pixels on your terrain ( you might heigh
> test for heights between dem grid )
> and also put desired height for river, then run tetgen over it to get
> new mesh, with this mesh placing river would be just rendering river
> patches  after mesh is rendered.
>
>
> you might try to search for some code which performs similar
> operations ( maybe http://geodynamics.or

Re: [osg-users] Visualize water on dem

2012-02-09 Thread Mohammed Rashad
i can visualize islands on osgocean
this is exactly what i want
but cant visualize my own islands
how to generate islands for fitting in osgOcean
or how to chnage osgOcean to fit my own dem generated using osgdem which is
an ive file

On Thu, Feb 9, 2012 at 5:59 PM, Mohammed Rashad
wrote:

> fixed the issue by skipping setlocale VTBuilder/App.cpp 80
>
>
> On Thu, Feb 9, 2012 at 5:45 PM, Sergey Kurdakov wrote:
>
>> Hi
>>
>> I would suggest, that you compile http://code.google.com/p/vtp/ there
>> you will see, how to
>> lay roads ( they are similar to rivers, just consist of straight
>> segments, and rivers from curved segments),
>>
>> if you  use http://qt.nokia.com/products/developer-tools/ you would be
>> able to visually set breakpoints
>> and see, how roads are laid onto terrain.
>>
>> also - the project http://osgearth.org/ has code to combine different
>> layers.
>>
>> the other one which might be of interest is
>> http://www.osgvisual.org/projects/osgvisual/
>>
>> so it is only by debugging someones code you would get idea,
>>
>> there is also FlightGear simulator which is built using osg  - it also
>> has rivers etc. You may ask where rivers are laid in code in FlightGear dev
>> list..
>>
>> you may also take a look at delta3d http://www.delta3d.org
>> though old, this page seems appropriate
>> http://www.delta3d.org/article.php?story=20051013142113452
>>
>> it is not that easy, still, from my experience  - looking for familiar
>> words like road in code it is possible to set breakpoint or watchpoint (
>> that the variable changed somewhere ) and then figure out what happens.
>>
>> Also I would suggest to search for osg books ( they are available on the
>> internet in pdf format ) from that books you would get a strong foundation
>> to move forward.
>>
>> Best regards
>> Sergey
>>
>>
>> On Thu, Feb 9, 2012 at 3:27 PM, Mohammed Rashad <
>> mohammedrasha...@gmail.com> wrote:
>>
>>> Thanks Sergery. But I am a newbie to this OSG,OpenGL and 3D. But I am
>>> going to do my phd related to virtual reality which I think will help to
>>> contribute to OSG and entire community because I am on the open source
>>> coding part. I do C++ well.
>>>
>>> So If you have some free time with you. can you tell me a detailed step
>>> for visualizing water over dem.
>>>
>>> The mail you posted before may be a detailed step but not for a beginner
>>> like me.
>>>
>>> Thanks in advance
>>>
>>> On Thu, Feb 9, 2012 at 4:23 AM, Sergey Kurdakov 
>>> wrote:
>>>
 Hi Rashad,

 in case you did not get reply from osgRiver author - few spare thoughts
 ( do not expect too much, just some ideas),

 I think, that the approach to render rivers over dem is many  step task.

 1) st you decide where river would be in 2D
 2) nd compute intersections along  river boundaries ( with some
 interval step ), and compute heigh of
 river ( river would be represented as a set of patches ) if it
 approximates those points ( the rivers could change it's height see code
 and first pdf I sent )

 3) if the error between terrain and river is big you should re
 tesselate the whole thing with new points

 basically you should change you dem so that river was below highest
 points along the 2D path ( when seen from above).

 how to re tesselate?

 I think, that it is possible  to use http://gts.sourceforge.net/though 
 tessellating square grid is trivial, then
 you can move internal points to height which are better suite your
 needs.
 then you can join your more tesselated patches with whole dem as
 described in http://hal.inria.fr/docs/00/41/62/21/PDF/eusipco09_3_1.pdf

 if still it gives too much error you might then develop a custom
 terrain using
   http://tetgen.berlios.de/ ( http://tetgen.berlios.de/features.html#F3)

 so that you place a lot of pixels on your terrain ( you might heigh
 test for heights between dem grid )
 and also put desired height for river, then run tetgen over it to get
 new mesh, with this mesh placing river would be just rendering river
 patches  after mesh is rendered.


 you might try to search for some code which performs similar operations
 ( maybe http://geodynamics.org/ ?)


 also take a look at http://code.google.com/p/vtp/ it is virtual
 terrain project, based on OpenSceneGraph,
 it should have some utilities to work with DEM.

 also see
 http://www.ruraltech.org/pubs/theses/mouton/mouton_ms_thesis.pdf
 http://www.geocarto.com.hk/cgi-bin/pages1/mar06/3_Maathuis.pdf



 Best regards
 Sergey


 On Tue, Feb 7, 2012 at 5:56 PM, Mohammed Rashad <
 mohammedrasha...@gmail.com> wrote:

> thanks.  will put a mail to him
>
>
> On Tue, Feb 7, 2012 at 7:19 PM, Sergey Kurdakov <
> sergey.fo...@gmail.com> wrote:
>
>> Hi
>>
>> try to contact initial author

Re: [osg-users] Visualize water on dem

2012-02-09 Thread Mohammed Rashad
fixed the issue by skipping setlocale VTBuilder/App.cpp 80

On Thu, Feb 9, 2012 at 5:45 PM, Sergey Kurdakov wrote:

> Hi
>
> I would suggest, that you compile http://code.google.com/p/vtp/ there you
> will see, how to
> lay roads ( they are similar to rivers, just consist of straight segments,
> and rivers from curved segments),
>
> if you  use http://qt.nokia.com/products/developer-tools/ you would be
> able to visually set breakpoints
> and see, how roads are laid onto terrain.
>
> also - the project http://osgearth.org/ has code to combine different
> layers.
>
> the other one which might be of interest is
> http://www.osgvisual.org/projects/osgvisual/
>
> so it is only by debugging someones code you would get idea,
>
> there is also FlightGear simulator which is built using osg  - it also has
> rivers etc. You may ask where rivers are laid in code in FlightGear dev
> list..
>
> you may also take a look at delta3d http://www.delta3d.org
> though old, this page seems appropriate
> http://www.delta3d.org/article.php?story=20051013142113452
>
> it is not that easy, still, from my experience  - looking for familiar
> words like road in code it is possible to set breakpoint or watchpoint (
> that the variable changed somewhere ) and then figure out what happens.
>
> Also I would suggest to search for osg books ( they are available on the
> internet in pdf format ) from that books you would get a strong foundation
> to move forward.
>
> Best regards
> Sergey
>
>
> On Thu, Feb 9, 2012 at 3:27 PM, Mohammed Rashad <
> mohammedrasha...@gmail.com> wrote:
>
>> Thanks Sergery. But I am a newbie to this OSG,OpenGL and 3D. But I am
>> going to do my phd related to virtual reality which I think will help to
>> contribute to OSG and entire community because I am on the open source
>> coding part. I do C++ well.
>>
>> So If you have some free time with you. can you tell me a detailed step
>> for visualizing water over dem.
>>
>> The mail you posted before may be a detailed step but not for a beginner
>> like me.
>>
>> Thanks in advance
>>
>> On Thu, Feb 9, 2012 at 4:23 AM, Sergey Kurdakov 
>> wrote:
>>
>>> Hi Rashad,
>>>
>>> in case you did not get reply from osgRiver author - few spare thoughts
>>> ( do not expect too much, just some ideas),
>>>
>>> I think, that the approach to render rivers over dem is many  step task.
>>>
>>> 1) st you decide where river would be in 2D
>>> 2) nd compute intersections along  river boundaries ( with some interval
>>> step ), and compute heigh of
>>> river ( river would be represented as a set of patches ) if it
>>> approximates those points ( the rivers could change it's height see code
>>> and first pdf I sent )
>>>
>>> 3) if the error between terrain and river is big you should re tesselate
>>> the whole thing with new points
>>>
>>> basically you should change you dem so that river was below highest
>>> points along the 2D path ( when seen from above).
>>>
>>> how to re tesselate?
>>>
>>> I think, that it is possible  to use http://gts.sourceforge.net/ though
>>> tessellating square grid is trivial, then
>>> you can move internal points to height which are better suite your needs.
>>> then you can join your more tesselated patches with whole dem as
>>> described in http://hal.inria.fr/docs/00/41/62/21/PDF/eusipco09_3_1.pdf
>>>
>>> if still it gives too much error you might then develop a custom terrain
>>> using
>>>   http://tetgen.berlios.de/ ( http://tetgen.berlios.de/features.html#F3)
>>>
>>> so that you place a lot of pixels on your terrain ( you might heigh test
>>> for heights between dem grid )
>>> and also put desired height for river, then run tetgen over it to get
>>> new mesh, with this mesh placing river would be just rendering river
>>> patches  after mesh is rendered.
>>>
>>>
>>> you might try to search for some code which performs similar operations
>>> ( maybe http://geodynamics.org/ ?)
>>>
>>>
>>> also take a look at http://code.google.com/p/vtp/ it is virtual terrain
>>> project, based on OpenSceneGraph,
>>> it should have some utilities to work with DEM.
>>>
>>> also see
>>> http://www.ruraltech.org/pubs/theses/mouton/mouton_ms_thesis.pdf
>>> http://www.geocarto.com.hk/cgi-bin/pages1/mar06/3_Maathuis.pdf
>>>
>>>
>>>
>>> Best regards
>>> Sergey
>>>
>>>
>>> On Tue, Feb 7, 2012 at 5:56 PM, Mohammed Rashad <
>>> mohammedrasha...@gmail.com> wrote:
>>>
 thanks.  will put a mail to him


 On Tue, Feb 7, 2012 at 7:19 PM, Sergey Kurdakov >>> > wrote:

> Hi
>
> try to contact initial author
>
> Quintijn Hendrickx q.j.a.m.hendri...@student.tudelft.nl
>
> not sure is he still available by this address, but I just sent you
> code ( and know it was applied to terrains )
> but cannot assist with anything else.
>
> Regards
> Sergey
>
>
> On Tue, Feb 7, 2012 at 5:42 PM, Mohammed Rashad <
> mohammedrasha...@gmail.com> wrote:
>
>> i had done creating cmake for osgRiver with some fixes for lin

Re: [osg-users] Visualize water on dem

2012-02-09 Thread Mohammed Rashad
CCing osg-users

On Thu, Feb 9, 2012 at 5:45 PM, Sergey Kurdakov wrote:

> Hi
>
> I would suggest, that you compile http://code.google.com/p/vtp/ there you
> will see, how to
> lay roads ( they are similar to rivers, just consist of straight segments,
> and rivers from curved segments),
>
this is giving segmentation fault to me

Starting program: /usr/local/bin/VTBuilder
[Thread debugging using libthread_db enabled]
VTBuilder
Build: Release Unicode
Build date: Feb  9 2012

here is the valgrind output

=16091== Process terminating with default action of signal 11 (SIGSEGV)
==16091==  Access not within mapped region at address 0x8
==16091==at 0x40E9F3D: wxString::mb_str(wxMBConv const&) const (in
/usr/lib/libwx_baseu-2.8.so.0.6.0)
==16091==by 0x80C2D9D: BuilderApp::SetupLocale() (App.cpp:135)
==16091==by 0x80C319A: BuilderApp::OnInit() (App.cpp:80)
==16091==by 0x40C776F: wxEntry(int&, wchar_t**) (in
/usr/lib/libwx_baseu-2.8.so.0.6.0)
==16091==by 0x40C7976: wxEntry(int&, char**) (in
/usr/lib/libwx_baseu-2.8.so.0.6.0)
==16091==by 0x80C2BAA: main (App.cpp:28)
==16091==  If you believe this happened as a result of a stack
==16091==  overflow in your program's main thread (unlikely but
==16091==  possible), you can try to increase the size of the
==16091==  main thread stack using the --main-stacksize= flag.
==16091==  The main thread stack size used in this run was 8388608.
==16091== Invalid free() / delete / delete[]
==16091==at 0x4024B3A: free (vg_replace_malloc.c:366)
==16091==by 0x5579653: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
==16091==by 0x5579119: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
==16091==by 0x401F4F3: _vgnU_freeres (vg_preloaded.c:62)
==16091==  Address 0x5e02318 is not stack'd, malloc'd or (recently) free'd
==16091==
==16091==
==16091== HEAP SUMMARY:
==16091== in use at exit: 538,527 bytes in 5,847 blocks
==16091==   total heap usage: 12,691 allocs, 6,846 frees, 857,523 bytes
allocated
==16091==



Program received signal SIGSEGV, Segmentation fault.
0x001cff3d in wxString::mb_str(wxMBConv const&) const () from
/usr/lib/libwx_baseu-2.8.so.0
(gdb)


> if you  use http://qt.nokia.com/products/developer-tools/ you would be
> able to visually set breakpoints
> and see, how roads are laid onto terrain.
>


goging to try others


BTW, Can you tell me some ways which I can contribute to OpenSceneGraph

>
> also - the project http://osgearth.org/ has code to combine different
> layers.
>
> the other one which might be of interest is
> http://www.osgvisual.org/projects/osgvisual/
>
> so it is only by debugging someones code you would get idea,
>
> there is also FlightGear simulator which is built using osg  - it also has
> rivers etc. You may ask where rivers are laid in code in FlightGear dev
> list..
>
> you may also take a look at delta3d http://www.delta3d.org
> though old, this page seems appropriate
> http://www.delta3d.org/article.php?story=20051013142113452
>
> it is not that easy, still, from my experience  - looking for familiar
> words like road in code it is possible to set breakpoint or watchpoint (
> that the variable changed somewhere ) and then figure out what happens.
>
> Also I would suggest to search for osg books ( they are available on the
> internet in pdf format ) from that books you would get a strong foundation
> to move forward.
>
> Best regards
> Sergey
>
>
> On Thu, Feb 9, 2012 at 3:27 PM, Mohammed Rashad <
> mohammedrasha...@gmail.com> wrote:
>
>> Thanks Sergery. But I am a newbie to this OSG,OpenGL and 3D. But I am
>> going to do my phd related to virtual reality which I think will help to
>> contribute to OSG and entire community because I am on the open source
>> coding part. I do C++ well.
>>
>> So If you have some free time with you. can you tell me a detailed step
>> for visualizing water over dem.
>>
>> The mail you posted before may be a detailed step but not for a beginner
>> like me.
>>
>> Thanks in advance
>>
>> On Thu, Feb 9, 2012 at 4:23 AM, Sergey Kurdakov 
>> wrote:
>>
>>> Hi Rashad,
>>>
>>> in case you did not get reply from osgRiver author - few spare thoughts
>>> ( do not expect too much, just some ideas),
>>>
>>> I think, that the approach to render rivers over dem is many  step task.
>>>
>>> 1) st you decide where river would be in 2D
>>> 2) nd compute intersections along  river boundaries ( with some interval
>>> step ), and compute heigh of
>>> river ( river would be represented as a set of patches ) if it
>>> approximates those points ( the rivers could change it's height see code
>>> and first pdf I sent )
>>>
>>> 3) if the error between terrain and river is big you should re tesselate
>>> the whole thing with new points
>>>
>>> basically you should change you dem so that river was below highest
>>> points along the 2D path ( when seen from above).
>>>
>>> how to re tesselate?
>>>
>>> I think, that it is possible  to use http://gts.sourceforge.net/ though
>>> tessellating square grid is trivial, the

Re: [osg-users] Bug in BB computation in osgText::TextBase

2012-02-09 Thread Robert Osfield
Hi Filip,

If you think your have a bug fix then could you please subscribe to
and post it to osg-submissions mailing list in the form of a complete
modified file, ideally with an explanation of how to reproduce the bug
so that I can formally review.

Thanks,
Robert

On 9 February 2012 11:04, Filip Arlet  wrote:
> Hi,
>
> computation of bb (without tranform cache) doesnt count with text 
> alignment(variable _offset).
>
>
> Code:
> /*virtual*/ osg::BoundingBox BentleyText::computeBound() const
> {
>    osg::BoundingBox  bbox;
>
>    if (_textBB.valid())
>    {
>        for(unsigned int i=0;i<_autoTransformCache.size();++i)
>        {
>            if (_autoTransformCache[i]._traversalNumber>=0)
>            {
>                osg::Matrix& matrix = _autoTransformCache[i]._matrix;
>                
> bbox.expandBy(osg::Vec3(_textBB.xMin(),_textBB.yMin(),_textBB.zMin())*matrix);
>                
> bbox.expandBy(osg::Vec3(_textBB.xMax(),_textBB.yMax(),_textBB.zMax())*matrix);
>            }
>        }
>
>
>        if (!bbox.valid())
>        {
>            // Provide a fallback in cases where no bounding box has been been 
> setup so far.
>            // Note, assume a scaling of 1.0 for 
> _characterSizeMode!=OBJECT_COORDS as the
>            // for screen space coordinates size modes we don't know what 
> scale will be used until
>            // the text is actually rendered, but we haven't to assume 
> something otherwise the
>            // text label will be culled by view or small feature culling on 
> first frame.
>            if (_autoRotateToScreen)
>            {
>                // use bounding sphere encompassing the maximum size of the 
> text centered on the _position
>                double radius = _textBB.radius();
>                osg::Vec3 diagonal(radius, radius, radius);
>                bbox.set(_position-diagonal, _position+diagonal);
>            }
>            else
>            {
>                osg::Matrix matrix;
>                matrix.makeTranslate(_position);
>                matrix.preMultRotate(_rotation);
>                                //matrix.preMultTranslate(-_offset); --- this 
> line shoudl be added !
>                
> bbox.expandBy(osg::Vec3(_textBB.xMin(),_textBB.yMin(),_textBB.zMin())*matrix);
>                
> bbox.expandBy(osg::Vec3(_textBB.xMax(),_textBB.yMax(),_textBB.zMax())*matrix);
>            }
>        }
>    }
>
>    return bbox;
> }
>
>
>
>
> ...
>
> Thank you!
>
> Cheers,
> Filip
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=45355#45355
>
>
>
>
>
> ___
> 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] osgAnimation timeline and actions question

2012-02-09 Thread Sergey Polischuk
Hi

Just wondering if there any reason why osgAnimation::Timeline and 
osgAnimation::Actions use frames instead of time to update animation, weights 
etc..? Because of that, with TimelineAnimationManager there are no 
interpolation between keyframes and  animations not looking smooth.

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


[osg-users] Bug in BB computation in osgText::TextBase

2012-02-09 Thread Filip Arlet
Hi,

computation of bb (without tranform cache) doesnt count with text 
alignment(variable _offset).


Code:
/*virtual*/ osg::BoundingBox BentleyText::computeBound() const
{
osg::BoundingBox  bbox;

if (_textBB.valid())
{
for(unsigned int i=0;i<_autoTransformCache.size();++i)
{
if (_autoTransformCache[i]._traversalNumber>=0)
{
osg::Matrix& matrix = _autoTransformCache[i]._matrix;

bbox.expandBy(osg::Vec3(_textBB.xMin(),_textBB.yMin(),_textBB.zMin())*matrix);

bbox.expandBy(osg::Vec3(_textBB.xMax(),_textBB.yMax(),_textBB.zMax())*matrix);
}
}


if (!bbox.valid())
{
// Provide a fallback in cases where no bounding box has been been 
setup so far.
// Note, assume a scaling of 1.0 for 
_characterSizeMode!=OBJECT_COORDS as the
// for screen space coordinates size modes we don't know what scale 
will be used until
// the text is actually rendered, but we haven't to assume 
something otherwise the
// text label will be culled by view or small feature culling on 
first frame.
if (_autoRotateToScreen)
{
// use bounding sphere encompassing the maximum size of the 
text centered on the _position
double radius = _textBB.radius();
osg::Vec3 diagonal(radius, radius, radius);
bbox.set(_position-diagonal, _position+diagonal);
}
else
{
osg::Matrix matrix;
matrix.makeTranslate(_position);
matrix.preMultRotate(_rotation);
//matrix.preMultTranslate(-_offset); --- this 
line shoudl be added !

bbox.expandBy(osg::Vec3(_textBB.xMin(),_textBB.yMin(),_textBB.zMin())*matrix);

bbox.expandBy(osg::Vec3(_textBB.xMax(),_textBB.yMax(),_textBB.zMax())*matrix);
}
}
}

return bbox;
}



 
... 

Thank you!

Cheers,
Filip

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





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


Re: [osg-users] [build] OSG for Android build on Fedora cpp errors

2012-02-09 Thread Jan Ciger
Hi Kyle,

On Thu, Feb 9, 2012 at 8:01 AM, Kyle Gancarz  wrote:

> eh nevermind, just needed to figure out how to use it
>

I am surprised you have managed to get it working on Iconia tablet. We have
been trying to do the same here and the application loads, but crashes
immediately after tapping the screen. What settings did you use to compile
OSG? Which ABI (armeabi or armeabi v7?) and OpenGL ES version (1.1 or
2.0?). We had to also disable the Neon instructions before it was even
willing to run (Tegra doesn't have them).

We had also some linking/compilation issues with the example code here, but
that was fixed by hacking the makefile a bit.

Regards,

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