[osg-users] [vpb] Artifacts in terrain

2014-01-07 Thread Massimo Tarantini
Hello,

i'm creating terrains using USGS tiles 256x265 pixel at 5 meter/pixel, and NED1 
(30 meter/pixel). 
The following image is part of a 40km x 40km terrain of Mount St. Helens, and 
shows artifacts at the level 4 (the maximum level)

The problem is with lighting on (a problems of normals?).
Any hint?

Thanks

[Image: http://imagizer.imageshack.us/v2/xq90/812/kpyk.png ] 
(https://imageshack.com/i/mkkpykp)

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





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


[osg-users] Vertex shader problem on Android

2013-08-31 Thread Massimo Tarantini
I am developing for Android with OpenGL ES 2 and two devices: Google Nexus 3 
and Archos 80 G9 (8 tablet). On these devices my shaders works fine.

Now, i have bought a Samsung Galaxy Tab 2, and a single vertex shader does not 
work on this device. This shader (from OSGEarth) remove the problem of 
z-fighting for tracks on a 3D terrain, modulating the z value of the vertex. On 
Samsung Galaxy Tab 2 this modulation does not work (!)

This is the shader (modified from original, to work on GLES2)


Code:

std::string vertexShaderSource =
#version 100\n\n

float remap( float val, float vmin, float vmax, float r0, float r1 ) \n
{ \n
   float vr = (clamp(val, vmin, vmax)-vmin)/(vmax-vmin); \n
   return r0 + vr * (r1-r0); \n
} \n\n

mat3 castMat4ToMat3Function(in mat4 m) \n
{ \n
   return mat3( m[0].xyz, m[1].xyz, m[2].xyz ); \n
} \n\n

uniform mat4 osg_ViewMatrix; \n
uniform mat4 osg_ViewMatrixInverse; \n
uniform mat4 osg_ModelViewMatrix; \n
uniform mat4 osg_ProjectionMatrix; \n
uniform mat4 osg_ModelViewProjectionMatrix; \n
uniform float osgearth_depthoffset_minoffset; \n
attribute vec4 osg_Vertex;\n
attribute vec4 osg_Color;\n
varying vec4 v_color; \n\n
varying vec4 adjV; \n
varying float simRange; \n\n

void main(void) \n
{ \n

// transform the vertex into eye space:
   vec4 vertEye  = osg_ModelViewMatrix * osg_Vertex; \n
   vec3 vertEye3 = vertEye.xyz/vertEye.w; \n
   float range = length(vertEye3); \n

// vec3 adjVecEye3 = normalize(vertEye3); \n
// calculate the up vector, that will be our adjustment vector:
   vec4 vertWorld = osg_ViewMatrixInverse * vertEye; \n
   vec3 adjVecWorld3 = -normalize(vertWorld.xyz/vertWorld.w); \n
   vec3 adjVecEye3 = castMat4ToMat3Function(osg_ViewMatrix) * adjVecWorld3; \n

// remap depth offset based on camera distance to vertex. The farther you 
are away,
// the more of an offset you need.
   float offset = remap( range, 1000.0, 1000.0, 
osgearth_depthoffset_minoffset, 1.0); \n

// adjust the Z (distance from the eye) by our offset value:
   vertEye3 -= adjVecEye3 * offset; \n
   vertEye.xyz = vertEye3 * vertEye.w; \n

// Transform the new adjusted vertex into clip space and pass it to the 
fragment shader.
   adjV = osg_ProjectionMatrix * vertEye; \n

// Also pass along the simulated range (eye=vertex distance). We will need 
this
   // to detect when the depth offset has pushed the Z value behind the 
camera.
   simRange = range - offset; \n

   gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex; \n
   v_color = osg_Color; \n

// transform clipspace depth into [0..1] for FragDepth:
   gl_Position.z = max(0.0, (adjV.z/adjV.w)*gl_Position.w ); \n

// if the offset pushed the Z behind the eye, the projection mapping will
// result in a z1. We need to bring these values back down to the
// near clip plan (z=0). We need to check simRange too before doing this
// so we don't draw fragments that are legitimently beyond the far clip 
plane.
   float z = 0.5 * (1.0+(adjV.z/adjV.w)); \n
   if ( z  1.0  simRange  0.0 ) { gl_Position.z = 0.0; } \n

} \n ;



With this code the track on the terrain is not displayed at all on SGT2. 
If a comment the instruction
gl_Position.z = max(0.0, (adjV.z/adjV.w)*gl_Position.w );
the shader works, and the track is displayed, but of course the z-figthing is 
not removed.

My Google Nexus and Samsung Galaxy Tab 2 both use PowerVR SGX 540, so maybe the 
problem is in the Floating Point Math precision of the different CPU's? (Nexus 
should use OMAP4460, and Samsung OMAP4430)

Any ideas?

Thanks
Massimo[/code]

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





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


Re: [osg-users] VPB broken with OSG 3.2

2013-08-22 Thread Massimo Tarantini

robertosfield wrote:
 Hi Massimo,
 
 I can't think of any changes between 3.1.7 and 3.2.0 that are likely to cause 
 a problem.  Could you post the a.tif file so I can test against it.
 
 Thanks,
 Robert.
 


I have upload the file a.tif (73M) at the following link:
https://rapidshare.com/files/1493594275/a.tif

I have also re-dowloaded osg3.2, re-compiled and tested again, and the result 
is the same.
I use GDAL 1.9.2

Massimo

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





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


[osg-users] VPB broken with OSG 3.2

2013-08-20 Thread Massimo Tarantini
Hello,
it seems vpb is broken with OSG 3.2
(it work with OSG 3.1.7)

This is the simple command: 

Code:
osgdem -t a.tif  -l 3 -o furlo.osgt 



the image a.tif is 
[Image: http://img16.imageshack.us/img16/6614/nbon.jpg ]

The result in osgviewer is 
[Image: http://img96.imageshack.us/img96/7932/5dl7.jpg ]


Massimo

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





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


[osg-users] [vpb] VPB broken with OSG 3.2?

2013-08-13 Thread Massimo Tarantini
Hello,
maybe vpb is broken with new release 3.2 of OSG?
This is my simple command:

Code:
osgdem -t a.tif  -l 3 -o furlo.osgt


and the image a.tif is 
[Image: http://img16.imageshack.us/img16/6614/nbon.jpg ]

The result in osgviewer is
[Image: http://img96.imageshack.us/img96/7932/5dl7.jpg ]


Massimo[/img]

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





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


[osg-users] [vpb] Obtain terrain heigth in meters?

2013-06-23 Thread Massimo Tarantini
Hello,

i have no problem to get terrain height in meters if the terrain has a UTM 
projected GCS. But if a use Geographic system, the terrain intersection is in 
degrees. Of course i can use a coefficient to convert from degree to meters, 
but i think it can't give good results.

Probably i'm missing something. 
There is a standard way to get such value?

Thank you!

Massimo

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





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


[osg-users] Problem picking nodes

2013-04-15 Thread Massimo Tarantini
Hello,
i have problems picking nodes on a terrain (osg 3.1.5 + Vpb on Android)

I create Waypoints on the terrain, and want to pick  drag them to new 
positions. The waypoint node is a Transform with computeLocalToWorldMatrix. The 
model matrix contains rotations, translations and scaling (i use scaling to 
mantain invariant the screen dimension of the waypoint when it is moved, and 
when Zoom changes). I use a PolytopeIntersector for picking.

When i create the Waypoint, it is pickable, and can be moved around. BUT when 
the waypoint is moved to some distance from the original position, it is no 
more pickable! 

Now, if a save the waypoint to file, unload it from the scene (and destroy it), 
and then reload it (that is, create a new node with same attributes of the 
original, and with the same position on the terrain), it is pickable again.

The workaround is to destroy the original waypoint and clone it, after a pick  
drag operation.

I don't understand if it's my mistake. 
Any advice?

Cheers,
Massimo

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





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


[osg-users] QT Gui not working with Necessitas/OSG

2012-12-05 Thread Massimo Tarantini
Hi,

I'm developing with Necessitas (QT for Android), Osg/VPB and OpenGLES 2.0
It works fine, but the Qt Gui does not work. If i add a simply QPushButton, the 
opengl rendering stop working.

After many hours of debug i found a problem in the QT Framework, in the file 
qpaintengineex_opengl2.cpp,
 inside the methodQGL2PaintEngineExPrivate::resetGLState().

void QGL2PaintEngineExPrivate::resetGLState()
{
glDisable(GL_BLEND);
glActiveTexture(GL_TEXTURE0);
glDisable(GL_STENCIL_TEST);
glDisable(GL_DEPTH_TEST);
glDisable(GL_SCISSOR_TEST);
glDepthMask(true);
glDepthFunc(GL_LESS);
glClearDepth(1);
glStencilMask(0xff);
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
glStencilFunc(GL_ALWAYS, 0, 0xff);

ctx-d_func()-setVertexAttribArrayEnabled(QT_TEXTURE_COORDS_ATTR, false);
ctx-d_func()-setVertexAttribArrayEnabled(QT_VERTEX_COORDS_ATTR, false);
ctx-d_func()-setVertexAttribArrayEnabled(QT_OPACITY_ATTR, false);

#ifndef QT_OPENGL_ES_2
// gl_Color, corresponding to vertex attribute 3, may have been changed
float color[] = { 1.0f, 1.0f, 1.0f, 1.0f };
glVertexAttrib4fv(3, color);
#endif
}

I must comment the following 3 commands to have OSG working:
// ctx-d_func()-setVertexAttribArrayEnabled(QT_TEXTURE_COORDS_ATTR, 
false);
// ctx-d_func()-setVertexAttribArrayEnabled(QT_VERTEX_COORDS_ATTR, false);
// ctx-d_func()-setVertexAttribArrayEnabled(QT_OPACITY_ATTR, false);

I don't know if it is a problem of OSG or Necessitas. 
Should i report a bug to the kde/Necessitas forum? 

Thank you!

Cheers,
Massimo

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





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


[osg-users] [vpb] Avoid pixel scaling

2012-11-05 Thread Massimo Tarantini
I was used to create terrains with UTM, but now i'm trying with GEOTiff in 
Geographic system. The problem (to me) is that the osgdem apply a pixel scaling 
and the terrain is stretched.

Does exists a way to avoid pixel scaling, to mantain the correct proportions of 
the terrain, while using a Geographic system?

thanks

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





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


Re: [osg-users] [vpb] Texture parameters for Android?

2012-07-08 Thread Massimo Tarantini

Preet wrote:
 On Sat, Jul 7, 2012 at 10:54 AM, Massimo Tarantini  wrote:
 
  Hello,
  
  i have compiled OSG and VPB for Android, and i'm using Necessitas on an 
  Archos 80G9. All the stuff works (well, the touch events are lost...) but i 
  can't see the texture.
  
  I have tryied some combinations for the options --image-ext and 
  [--compressed, --RGBA-compressed, --RGB-16, --RGB-24], but unsuccesfully.
  
  I suppose that OpenGL compression can't work on Android. But if i use for 
  example --image-ext jpeg  --RGB-16, why it does not work?
  
  In the debug output i read:
  [...]
  07-07 16:39:42.039: D/Qt(1611): uncompressed ive stream
  [...]
  07-07 16:39:42.343: D/Qt(1611): TreatBoundariesToValidDataAsDefaultValue=0
  07-07 16:39:42.343: D/Qt(1611):  4
  07-07 16:39:42.343: D/Qt(1611): Created new 0xde6e60 TextureObject, 
  _numOfTextureObjects 5
  07-07 16:39:42.343: D/Qt(1611):  4
  07-07 16:39:42.343: D/Qt(1611): Created new 0xde6e60 TextureObject, 
  _numOfTextureObjects 6
  07-07 16:39:42.343: D/Qt(1611):  4
  07-07 16:39:42.343: D/Qt(1611): Created new 0xde6e60 TextureObject, 
  _numOfTextureObjects 7
  07-07 16:39:42.343: D/Qt(1611):  4
  07-07 16:39:42.351: D/Qt(1611): Warning: detected OpenGL error 'invalid 
  enumerant' at after RenderBin::draw(..)
  
 
 I ran into something like this with GL ES 2. You didn't specify what
 version you compiled against, so this may or may not help you.
 
 Note the error generated. I found a couple of fixes by searching
 through the list and after some trial and error this is what worked on
 my platform:
 
 In the State header file (/include/osg/State i think) there's a
 function called State::applyModeOnTexUnit() that calls
 glEnable(GL_TEXTURE_2D). This isn't valid for GLES 2 so comment it
 out... I did something like:
 
 #ifndef OSG_GLES2_AVAILABLE
 // with opengl es 2, GL_TEXTURE_2D is always enabled
 // so trying to enable it explicitly causes errors
 if (enabled) glEnable(mode);
 else glDisable(mode);
 #endif
 
 Also in State.cpp (/src/osg/State.cpp) there's a function called
 initializeExtensionProcs(). Line 900 [i pulled osg from git] has an
 if() clause that checks for the max number of texture units available.
 I replaced it with:
 
 if ( osg::getGLVersionNumber() = 2.0 ||
 osg::isGLExtensionSupported(_contextID,GL_ARB_vertex_shader) ||
 OSG_GLES2_FEATURES)
 {
 glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS,_glMaxTextureUnits);
 
 #ifdef OSG_GLES2_AVAILABLE
 _glMaxTextureCoords = 1;
 #else
 glGetIntegerv(GL_MAX_TEXTURE_COORDS,_glMaxTextureCoords);
 #endif
 }
 
 After those changes, textures started working for me.
 
 However, I noticed you're using Qt/Necessitas... not sure exactly what
 you're using Qt for, but just as a heads up, I ran into more problems
 using textures with QML that as of now I've been unable to solve (ie
 it makes QML unusable with OSG).
 
 
  07-07 16:39:42.351: D/Qt(1611):  2
  07-07 16:39:42.351: D/Qt(1611): end cull_draw() 0xdbf838
  07-07 16:39:42.351: D/Qt(1611):  5
  
  
  Some advice?
  
  Thank you!
  
  Cheers,
  Massimo
  
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=48741#48741
  
  
  
  
  
  ___
  osg-users mailing list
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
  --
 Post generated by Mail2Forum


Thanks for help.

I'am using GLES1.1
I have tryied to recompiled using _glMaxTextureCoords = 1; but it does not work.

I'm going on debugging...

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





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


[osg-users] [vpb] Texture parameters for Android?

2012-07-07 Thread Massimo Tarantini
Hello,

i have compiled OSG and VPB for Android, and i'm using Necessitas on an Archos 
80G9. All the stuff works (well, the touch events are lost...) but i can't see 
the texture.

I have tryied some combinations for the options --image-ext and [--compressed, 
--RGBA-compressed, --RGB-16, --RGB-24], but unsuccesfully.

I suppose that OpenGL compression can't work on Android. But if i use for 
example --image-ext jpeg  --RGB-16, why it does not work?

In the debug output i read:
[...]
07-07 16:39:42.039: D/Qt(1611): uncompressed ive stream
[...]
07-07 16:39:42.343: D/Qt(1611): TreatBoundariesToValidDataAsDefaultValue=0
07-07 16:39:42.343: D/Qt(1611):  4 
07-07 16:39:42.343: D/Qt(1611): Created new 0xde6e60 TextureObject, 
_numOfTextureObjects 5
07-07 16:39:42.343: D/Qt(1611):  4 
07-07 16:39:42.343: D/Qt(1611): Created new 0xde6e60 TextureObject, 
_numOfTextureObjects 6
07-07 16:39:42.343: D/Qt(1611):  4 
07-07 16:39:42.343: D/Qt(1611): Created new 0xde6e60 TextureObject, 
_numOfTextureObjects 7
07-07 16:39:42.343: D/Qt(1611):  4 
07-07 16:39:42.351: D/Qt(1611): Warning: detected OpenGL error 'invalid 
enumerant' at after RenderBin::draw(..)
07-07 16:39:42.351: D/Qt(1611):  2 
07-07 16:39:42.351: D/Qt(1611): end cull_draw() 0xdbf838
07-07 16:39:42.351: D/Qt(1611):  5 


Some advice?

Thank you!

Cheers,
Massimo

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





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


[osg-users] The cow is alive! .... with Necessitas

2012-06-08 Thread Massimo Tarantini
Hi,

after many days i have been succesfull to display that hell of cow
on my Archos 80 G9, using OSG 3.0.1 compiled for Android under Ubuntu 11,
and Necessitas (QT for Android) using OGLES1.1

[Image: http://img17.imageshack.us/img17/7555/p6082164.jpg ]

Probably i have made some mistakes, but i have been forced to recompile
Necessitas QT Framework to debug some libEGL errors, and i have modified two 
lines of code:

In qandroideglplatformcontext.ccp
//m_eglContext = eglCreateContext(m_eglDisplay,config, 
  EGL_NO_CONTEXT, attribList); 

-  m_eglContext = eglCreateContext(m_eglDisplay,config,   
   EGL_NO_CONTEXT, 0);


In qeglconvenience.cpp
EGLConfig cfg = 0;
QVectorEGLint configureAttributes = 
   q_createConfigAttributesFromFormat(format);
[...]
configureAttributes.append(EGL_OPENGL_ES2_BIT);
configureAttributes.append(EGL_NONE);

-   EGLConfig cfg = 0;
QVectorEGLint configureAttributes = 
   q_createConfigAttributesFromFormat(format);
[...]
configureAttributes.append(EGL_OPENGL_ES_BIT);
configureAttributes.append(EGL_NONE);

I have not enough skills to fully understand this code, but i guess
that QT was initializing EGL for OGLES 2.0 and not for OGLES 1.1, 
while i was using the following defines in QT Creator
DEFINES += \
QT_OPENGL_ES \
QT_OPENGL_ES_1 \
EGL_OPENGL_ES_API \
OSG_GLES1_AVAILABLE \
OSG_GL_MATRICES_AVAILABLE \
OSG_GL_VERTEX_FUNCS_AVAILABLE \
OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE \
OSG_GL_FIXED_FUNCTION_AVAILABLE \
OSG_BUILD_PLATFORM_ANDROID \
OSG_LIBRARY_STATIC

The cow.osg file ha been reduced removing the texture, to avoid errors with 
OGLES 1.1

Cheers,
Massimo[/img]

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





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


[osg-users] OSG for Android with Necessitas?

2012-05-20 Thread Massimo Tarantini
Hi,

i have recompiled OSG 3.0.1 for Android wint Ubuntu 11,
and now i'm trying to compiled the osgviewerQT example
under Windows, using Necessitas (QT Android porting).

I have some problems with EGL initializations. I get eglMakeCurrent:674 error 
3002 (EGL_BAD_ACCESS). 

Someone has been using Necessitas with OSG? Some tricks and tips?

Thank you!

Cheers,
Massimo

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





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


[osg-users] [vpb] short video flying with wiimote

2011-03-25 Thread Massimo Tarantini
Hi all,
this is a short demo of my terrain integrated with a wiimote :

www.youtube.com/watch?v=cGbD5bpu2uY

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





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


[osg-users] [vpb] Problem with tiles

2010-09-14 Thread Massimo Tarantini
Hi all, 

i have the following problem with the terrain i have created. 
The two snapshots show  4 tiles swapped in, but they are not aligned with the 
grid (the texture is well aligned, when is visible).

First
[Image: http://img251.imageshack.us/img251/8871/immagine1rw.jpg ]

After zoom in
[Image: http://img251.imageshack.us/img251/4338/immagine2pb.jpg ]

I have used OSG 2.9.6, and vpbmaster to create the source files. Then i have 
create some .bat files to generate the terrain. 
I Have already used this workflow succesfully, but now i have done some mistake.

Any idea/hint what is wrong?

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





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


Re: [osg-users] [vpb] Are we too optimistic about large database generation ?

2010-02-03 Thread Massimo Tarantini
Hi all,
i work with OSG for fun, and i have created a DataBase for whole Italy at HiRes 
1m/pixel in about 3 weeks.

The final DB is about 600G. The Source Images are about 13000 GeoTiff files 
(700G), and about 10 DEM files (40 meters res, 2.5G)
I have used and old notebook dual core 1.6Ghz, and two USB Disk 1Tera each 
(please, don't LOL |-) ), and i have run ONLY 1 osgdem thread for each script.

I have used vpbmaster to generate the scripts, BUT i have executed the scripts 
manually, for two reasons: 
 . first, vpbmaster executed 2 osgdem threads, and my HD was running to death! 
(i have tried to use --machines, but did not work)
. second, all the scripts use the same build_master.source files, which is 
not optimized, and contains the 13000 GeoTiff files list.

The build_master.source was a big problem, because every script wasted about 
1hour to examine all the 13000 files, to find the few ones to be processed. I 
have written a little C program to create many distinct build_master.source 
files for all the scripts, and of course i have updated the scripts to use the 
correct .source files. 
Every build_master.source is optimized with a list of no more than 10 GTiff 
files.

I Think that a big DB can be created with poor hadware (and poor OS), but:
 1. no more than 1 thread for each USB HD
 2. build_master.source files optimized, if many source files are used
 3. avoid ECW/JPEG200: they are slower that geotiff.
 4. Read from USB HD, but Write to Internal HD (to avoid many and many write 
failures!)
 5. Three weeks is not much time, to create a 600G Db with a 300$ notebook 
1.6Ghz! IT'S GREAT!

...

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





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


Re: [osg-users] Precipitation Effect, Snow, bad rendering at slow speed

2009-12-22 Thread Massimo Tarantini

robertosfield wrote:
 Hi Massimo,
 
 Thanks for the pictures.  Moving slow is a walking pace, not at
 360km/h.. that's pretty fast in my book.  The streaks are motion blurr
 on the particles as when you are moving fast the particle moves
 relative to the eye point between frames will be stretched out.  [...]
 


Thanks for the long answer,
and sorry for my lack of precision about slow speed.

...

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





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


Re: [osg-users] Precipitation Effect, Snow, bad rendering at slow speed

2009-12-21 Thread Massimo Tarantini

 From your description it sounds like an issue that occurs when the
 camera moves very fast relative to the particle system, rather than
 very slow.  My only guess is that you've model units that aren't in
 meters so the velocities are out.
 


Now i have also posted the 3 images to imageshack:

http://img189.imageshack.us/img189/5565/static594.jpg
http://img189.imageshack.us/img189/9955/movingslow526.jpg
http://img189.imageshack.us/img189/5372/movingfast976.jpg

Anyway, the problem is in movingslow526.jpg at 360kmh, while movingfast976.jpg 
at 1800kmh is better, and static594.jpg (stopped) is perfect.
My terrain is generated with osgdem (non Geogentric), and is in UTM33/WGS84. 
The  Geographics coordinates are in meters.

Thanks.[/list]

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





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


[osg-users] Precipitation Effect, Snow, bad rendering at slow speed

2009-12-18 Thread Massimo Tarantini
Hi all,

i have added some snow to my scene (it's Christmas time!), after looking the 
example osgprecipitation. 
It renders very well when the scene is static, and quite well when moving fast, 
but very bad when moving slow.


Code:
osg::ref_ptrosgParticle::PrecipitationEffect precipitationEffect = new 
osgParticle::PrecipitationEffect;
precipitationEffect-snow(1.0);
/* It Does not work, if i set to false: what does it mean? */
precipitationEffect-setUseFarLineSegments(true);
precipitationEffect-getFog()-setDensity(0.00012f);
precipitationEffect-getFog()-setMode(osg::Fog::EXP2);
precipitationEffect-getFog()-setFogCoordinateSource(osg::Fog::FRAGMENT_DEPTH);
root-addChild( precipitationEffect.get() );
root-getOrCreateStateSet()-setAttributeAndModes(precipitationEffect-getFog());



Can you give me some hint? 
It Could a problem of my ATI Radeon 3650 AGP, or could be my code?

Thanks

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




Attachments: 
http://forum.openscenegraph.org//files/moving_fast_976.jpg
http://forum.openscenegraph.org//files/moving_slow_526.jpg
http://forum.openscenegraph.org//files/static_594.jpg


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


Re: [osg-users] Precipitation Effect, Snow, bad rendering at slow speed

2009-12-18 Thread Massimo Tarantini

robertosfield wrote:
 HI Massimo,
 
 What exactly do you mean by bad rendering?
 Do you have vync on?
 
 Robert.
 


Thanks for your answer Sir,
and... sorry for my bad English. 

I have attached 3 Images to show what i mean. 
In the image moving_slow.jpg the camera is moving slowly towards the mountains, 
and the snow looks like rays of light coming out of the screen. 

With vync do you mean Wait Vertical Update ON/OFF?
I have tried both in ATI Control Panel, and nothing change.

...

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





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


Re: [osg-users] Hope this is the right way to post this (osgEphemeris problem with simple example)

2009-10-07 Thread Massimo Tarantini

Don Dakin wrote:
 hi Donald, 
 [...]
 When I try to load 
 
 osgEphemerisModel::EphemerisModel { 
 Latitude 38.4765 
 Longitude -122.493 
 SkyDomeRadius 10 
 } 
 
 
 in an .osg file I always get 
 
 no data loaded.. 
 [...]
 Post generated by Mail2Forum


The DLL osgdb_osgEphemeris.dll must be renamed osgdb_osgEphemerisModel.dll

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





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


[osg-users] [vpb] Loading a 400G DataBase?

2009-09-20 Thread Massimo Tarantini
Hi,
i have just completed to make 3D Terrains for the whole Italy
in ive format with osgdem. The data base includes 73 ive files
100km x 100km each (and each one is the merge (using osgconv) 
of 400 ive files 5km x 5km each), and the total size is about 400G

I have no problem to view a single ive file under Windows XP,
with good fps (when zooming... it's slow when zoomout), but of course
osgviewer fails to load ALL the 73 ive files (osgconv fails too, when
trying to create a single big file)

osgviewer crash where allocated phisical ram raise about 2.5G: i reckon
it is not a virtual memory problem, but an addressable RAM question
under Windows.

My questions are:
 . can i expect to be succesfull to load ALL the 73 files under Linux?
 . osg/vpb can effectively manage such big databases with a Desktop PC?
 . could i estimate the HW resources (RAM, CPU, Video...) to manage decently 
such terrain?

Thank you!

Cheers,
Massimo

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





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


Re: [osg-users] [vpb] Loading a 400G DataBase?

2009-09-20 Thread Massimo Tarantini

robertosfield wrote:
 Hi Massimo,
 Are you saying you have 73 separate databases?  Or 73 files within the same 
 database?
 
 If you have 73 separate databases then it's time to rebuild them into a 
 single databases, as your are destroying the ability of LOD's to properly 
 manage complexity with so many separate subgraphs.
 
 As for the sizes involved 400G is large, but not enormous.  VPB has generated 
 databases 20 times that size, and runtime performance hits 60Hz just fine on 
 these databases.  So if you use the tools as intended then things will scale 
 just fine.
 
 As for using Windows to do visualization then it's possible, but it's memory 
 management, file system and threading capability all hamper best 
 performance.  Linux should give you much better runtime stability and 
 performance stability.  This doesn't change the fact that you probably need 
 to improve the way you manage your database.
 
 Robert.
 


Thanks for answer.

I have 73 db: i have tried to make a single database using osgconv, but it 
crash where RAM raise 2.5G
(ps: to rebuild into a single DB i can simply use osgconv, right?)

I am a beginner with osg/vpb/3D Graphics, and i must study a lot...
My goal is to build an App like vtp (i have used vtp, but it does not not scale 
to big db), with GIS data, routing capabilities etc...

Now i'm going to install Linux and try with it.

Thanks

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





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


Re: [osg-users] [vpb] Loading a 400G DataBase?

2009-09-20 Thread Massimo Tarantini

robertosfield wrote:
 Hi Massimo,
 OK, you can't just combine 73 separate databases and expect them to work [...]
 
 [...] go right back to the source DEM's and Geo tiff's and then use VPB to 
 build a single database from this. [...]
 


Thanks a lot to help a newby.
So, i have done all wrong :( ... 

When i discovered osgconv i believed it could be used to build a DB 
incrementally. I was wrong.

Thanks again.

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





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


[osg-users] [vpb] Resolution of levels?

2009-06-29 Thread Massimo Tarantini
Hi all,

i am building some terrains using Geotiff 1meter/pixel and DEM 40meter.
I use the option -l 30: osgdem generates 6 levels, numbered from 0 to 5.

My question is: what is the resolution of last level 5? The same of the Geotiff?
And of the other levels?

Thanks

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





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