[osg-users] Model texture is distorted in HUD Camera Group
Hi Everyone, I have a very simple sphere model in 3ds and obj, the sphere works fine when I place it in the root group. When I add the same model group to a Camera group that is my game's HUD the model's texture is distorted. The sphere mesh is fine. This Camera group works fine for Text and Line objects. Also, the coordinate system for the HUD appears different than when I just place the Sphere at 0,0,0 in the root group. Is there something related to a Camera that makes it work fine for text and line objects but differently for a mesh object such as a sphere. I am really puzzled by this and appreciate any suggestions. Thank you, -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=58618#58618 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Model texture is distorted in HUD Camera Group
Thank you Robert, I found a problem with my Camera, I had it set for setProjectionMatrixAsOrtho2D which worked fine for text and simple 2d lines. Can you, or anyone, suggest a Camera ProjectionMatrix that would be best for both 2d text and also a mesh model? I am thinking that I may need 2 cameras, 1 for 2d text and another for the mesh model. Thanks again, -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=58629#58629 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSG Linker Problem and 13.10
Hi, Earlier this year I upgraded my linux from 12.4 to 13.10 and had problems related to a change in the toolchain and linker that caused me build problems. Instead of fixing the problem I reinstalled 12.4 and was very happy to have everything working again. This problem was described in detail in the following thread: http://comments.gmane.org/gmane.comp.compilers.clang.devel/19782 I would like to upgrade to the latest release of OSG and 13.10. Can anyone tell me if the toolchain/linker problem described above has been resolved? I understand that this was not a OSG specific issue but a linux build issue. Any suggestions are very welcome. ... Thank you very much! Cheers, Mike -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60611#60611 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG Linker Problem and 13.10
Hi, Thank you Jan and Robert. I was able to install a clean version of Ubuntu 14.10 and had my OSG apps working without a problem very quickly. Seems very fast and solid. Thank you for responding to my earlier post. ... Thank you! Cheers, Mike -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60745#60745 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Flight Sim Cockpit Frame
Hi, There is an osg example, osgsimulation, that shows a plane flying above the earth. I am building a simple flight simulator and would like to put a cockpit frame around the view so it would look like the plane in osgsimulation is being followed by a 2nd plane. What is the best way to frame a view with a graphic so it does not obstruct the movement of the earth or the plane? Is there an example of such a frame? Can a single graphic be used as the cockpit with a transparent center for the leading plane and terrain? Thank you very much! Cheers, Mike -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62678#62678 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Convert random points to a mesh
Hi, I am collecting data of 500 points at a time and the x,y,z points are randomly distributed around the center. I would like to render this collection of points into a surface map using OpenSceneGraph. What is the best way to do this without reinventing the wheel? Thank you very much! Cheers, Mike -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=63573#63573 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Replacement for
Hi, I am porting a java3d flight simulator program to OSG and there is not a direct replacement for rotateToPoint within OSG. In Java3d my code is: Point3d intercept = new Point3d(xx_l,yy_l,zz_l); plane.rotateToPoint(startPt, intercept); I want the plane to rotate and point directly to the intercept x,y,z. Have you a good example of how to do this? Sorry for the simple question. Thank you! Cheers, Mike -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47050#47050 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] HUD Text Background
Hi, What is the best way to place a contrasting color background behind HUD text so that the text is always easy to read? I did not see anything in osgText to do this Also no examples that do this easily. Thank you, for your suggestions! Cheers, Mike -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68011#68011 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Mesh Functionality
Hi, I am working with a mesh and would like to turn off color bleed from one face to the next face. I want each face to be a solid color. Sorry for the basic question... Thank you! Cheers, Mike -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68794#68794 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Mesh Functionality
Hi Robert, Thank you, this changed my mesh and it looks much better. Now I can see that I am indexing through the mesh to set colors and only changing colors on half of the mesh face. The mesh face is a square and I am only setting the color on a triangle half of the square. How do I index through the mesh so i change colors on every triangle face? Thank you again, ... Thank you! Cheers, Mike -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68797#68797 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Mesh Functionality
Hi, Thank you again, I am using a TRIANGLE_STRIP and BIND_PER_VERTEX. Then indexing through the array via simple initialization: for (int r = 0; r < ISLAND_LAND_DEPTH;r++) { (*terrain)[thisIndex][0] = column_x_loc; (*terrain)[thisIndex][1] = column_z_loc; (*terrain)[thisIndex][2] = column_y_loc; (*terrain_colors)[thisIndex][0] = 46.0f/256.0f; (*terrain_colors)[thisIndex][1] = 76.0f/256.0f; (*terrain_colors)[thisIndex][2] = 100.0f/256.0f; (*terrain_colors)[thisIndex][3] = 1.0f; column_z_loc += ISLAND_LAND_TRIANGLE_DEPTH; thisIndex++; } But only 1/2 of the face is set to the color I need... I am doing something wrong. Any suggestions are very welcome. Thank you! Cheers, Mike -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68799#68799 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] TriangleStrip mesh is not smooth...
Hi, I have a TriangleStrip mesh that I use for a simple data collection app to show data changes in real time. Most of the time the mesh looks very clean and smooth. However, sometimes the triangles look like spikes and not smooth. I do not understand why the mesh is broken by the spikes. Can you suggest a solution? Also my mesh is only 500 x 500 triangle, is there a better way to implement a mesh this size? ... Thank you! Cheers, Mike[/img] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73927#73927 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] TriangleStrip mesh is not smooth...
Hi, Thank you Robert... Here is how I create the mesh: float column_x_loc = -(LAND_WIDTH * LAND_TRIANGLE_WIDTH)/2; float column_z_loc = -(LAND_DEPTH * LAND_TRIANGLE_DEPTH)/2 float column_y_loc = DETAIL_TERRAIN_FLOOR; for (int c = 0;c < LAND_WIDTH;c++) { for (int r = 0; r < LAND_DEPTH;r++) { (*terrain)[thisIndex][0] = column_x_loc; (*terrain)[thisIndex][1] = column_z_loc; (*terrain)[thisIndex][2] = column_y_loc; (*terrain_colors)[thisIndex][0] = 46.0f/256.0f; (*terrain_colors)[thisIndex][1] = 76.0f/256.0f; (*terrain_colors)[thisIndex][2] = 100.0f/256.0f; (*terrain_colors)[thisIndex][3] = 0.3f; column_z_loc += LAND_TRIANGLE_DEPTH; thisIndex++; } } On an update I move all of the rows back one and replace the 1 row with new data. I use a transparent_weight value to have older data disappear as it is updated. float transparent_weight = 1.0; float transparent_adjustment = 0.02; for (int r = 0; r < LAND_DEPTH - 1; r++) { transparent_weight = 0.1; for (int c = 1;c < 50; c++) { col_index = (c * LAND_WIDTH); (*terrain)[col_index + r][2] = (*terrain)[col_index + r + LAND_WIDTH][2]; (*terrain_colors)[col_index + r][0] = (*terrain_colors)[col_index + r + LAND_WIDTH][0]; (*terrain_colors)[col_index + r][1] = (*terrain_colors)[col_index + r + LAND_WIDTH][1]; (*terrain_colors)[col_index + r][2] = (*terrain_colors)[col_index + r + LAND_WIDTH][2]; (*terrain_colors)[col_index + r][3] = transparent_weight;//(*terrain_colors)[col_index + r + LAND_WIDTH][3]; transparent_weight += transparent_adjustment; } } The data at the first row is always smooth. I get missing triangles only in the middle or rear of the terrain. Any suggestions are welcome. I have the program working the way I want if I can get this mesh problem solved. Thank you again! Cheers, Mike -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73930#73930 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] TriangleStrip mesh is not smooth...
Hi, "it kinds seems like an odd thing that are doing, shifting and replacing rows for some reason is not normally how one manages terrain. Could you take a step back and explain what you are trying to achieve in your application w.r.t terrain" I am just starting to develop a 3D app my usual domain is deep learning and searching. I saw a demo of OSG using a simple terrain and thought I could turn my boring 2D app into a sexy 3D app. I underestimated the effort involved. I use linux named pipe message queue to send real time data from my java application to my osg application. Once in osg I fill my terrain matrix as data is received. The shifting of rows is to move data from front to back as data is received. It works very well and much better than my old 2D user interface. I started this tread trying to solve a mesh problem and fixed that problem by cleaning my original data much better. Now my terrain is looking very nice. Thank you for your comments that made me stop and look at data again. Your comment 'this is not normally how one manages terrain'. Probably, what approach would you suggest to build a 3d mesh that is filled in real time? Can you point me to an example? ... Thank you! Cheers, Mike -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73960#73960 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Color of shapes in HeightField
Hi, I have a very simple grid of 1000x1000 using HeightField. The heights are constantly changing. Is there a way to change the color of a shape at row & col? My project seems too small to use osgTerrain. Thank you for helping with this simple question! Cheers, -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=76626#76626 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org