[osg-users] Colour map

2011-08-31 Thread Clement.Chu
Anyone knows how many colour does osg support? I would like to generate 65536 colour map by using the code below. The size of the object colorMap is 65535. Is it possible? I am sure osg can support 8 bit colour, how about 32bit? Thanks. osg::TransferFunction1D::ColorMap colorMap;

Re: [osg-users] Colour map

2011-08-31 Thread Robert Osfield
Hi Clement, TransferFunction1D is really meant for making it easy to handle sparse data when setting up a 1D Texture for use as a colour look up on the GPU. For data where you are just encoding the colours directly in packed form then it would be more appropriate to simply create a osg::Image

Re: [osg-users] Drawing a simple sphere...

2011-08-31 Thread Stephan Maximilian Huber
Hi, there seems to be a problem with the llvm-gcc compiler, osg and acosf, see this thread for a possible solution: http://forum.openscenegraph.org/viewtopic.php?t=8963highlight=llvm If that doesn't help, can you post a stack-trace? cheers, Stephan Am 30.08.11 20:16, schrieb Yann Blaudin de

Re: [osg-users] Colour map

2011-08-31 Thread Clement.Chu
Hi Robert, Does osg support 32 bit color and have up to 65536 colours? I used TransferFunction1D because I will use the generated index to find out the colour later. Would you give me an example how to simply create osg::image and assign to texture1d? Thanks. Regards, Clement

Re: [osg-users] Colour map

2011-08-31 Thread David Callu
Hi Clement, Take a look to example/osgtexture1D in OpenSceneGraph source. Color are defined with 4 float value clamp between 0.0f and 1.0f. then image are create with GL_RGBA for the pixel format and GL_FLOAT for value type. you can change the value type to GL_BYTE

[osg-users] Picking ShapeDrawables in osg

2011-08-31 Thread Hartmut Leister
Hello, (since I couldn't find this problem searching the www, I'm trying here) I'm quite new to osg and want to pick a ShapeDrawable in my scene. I got 2 issues: (1) How can i get a pointer to a picked ShapeDrawable? (2) I'm not sure whether the intersection I started from the standard

[osg-users] [bug] plugin jpg, osg 3.0.1, Windows XP, VC2010

2011-08-31 Thread jOan
Hello, I have a bug when loading jpg images with osg 3.0.1. After having issue loading jpg images of my 3D models in osgViewer, I have found out that osgDB::readImageFile(*.jpg) keeps on returning NULL. With the preceding version osg 3.0.0 the jpg plugin was working fine. My environnement is

[osg-users] ANN: osgEarth 2.1 released

2011-08-31 Thread Glenn Waldron
Folks, osgEarth Version 2.1 is here! Thanks to everyone in the community that contributed to this latest release. osgEarth is a run-time terrain rendering toolkit for OSG. http://osgearth.org This version includes loads of new functionality, including: * Enhanced support for rendering vector

[osg-users] Lion build (Re: Drawing a simple sphere...)

2011-08-31 Thread Ulrich Hertlein
Hi guys, I'm using the following settings (and the 'CGDisplayBitsPerPixel' patch submitted to osg-submissions on 29/8/2011) to compile OSG on OS X 10.7 (with Xcode-4.1): $ /usr/bin/g++ --version i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build

[osg-users] Color grid overlay question/help

2011-08-31 Thread Kevin DeMott
I'm trying to create a 4x1 (row x col) grid on top of my scene. The rows should equally fill up the height of the window while the column width should be 1/4 the width of the window. The intent is to have the user be able to specify a color for each cell. Not all cells may be specified at a

Re: [osg-users] Color grid overlay question/help

2011-08-31 Thread Paul Martz
On 8/31/2011 8:02 AM, Kevin DeMott wrote: I'm trying to create a 4x1 (row x col) grid on top of my scene. The rows should equally fill up the height of the window while the column width should be 1/4 the width of the window. The intent is to have the user be able to specify a color for each

[osg-users] [build] how to skip symlink

2011-08-31 Thread Gianni Ambrosio
Dear All, I'm trying to build OSG with cmake on linux. It works fine but if someone builds on a mounted windows disk the symlink generation fails (obviously). Now, is there a way to skip the creation of all symlinks for the generated .so libs? I found something that may be related in cmake

[osg-users] Fairly Repeatable Crash in Osg 3.0.1 with StateSet

2011-08-31 Thread Colin Branch
I'm using VC9 64-bit. The application creates multiple threads and loads and saves files (think of it like a parallel osgConv). It is crashing here. static TextureGLModeSet getTextureGLModeSet() { static TextureGLModeSet s_textureGLModeSet; return s_textureGLModeSet; } This is called by

Re: [osg-users] Color grid overlay question/help

2011-08-31 Thread Kevin DeMott
There is no reason I have to use osgWidget. I'm rather new to using osg and it seemed to fit into the scheme of everything else that was going on. Is there perhaps a basic example you can point me to regarding the implementation you suggested? -- Read this topic online here:

Re: [osg-users] Fairly Repeatable Crash in Osg 3.0.1 with StateSet

2011-08-31 Thread Robert Osfield
Hi Colin, I'm not in favour of adding a mutex just to protect a possible static initialization issue as this would add an overhead to all calls to isTextureMode(..) when it's just multi-threaded initialization that is problematic. Perhaps a global static initializer object could call te

Re: [osg-users] [bug] plugin jpg, osg 3.0.1, Windows XP, VC2010

2011-08-31 Thread Tony Horrobin
Hi jOan, One thing to try is set OSG_NOTIFY_LEVEL to DEBUG and look at the output. It should tell you what paths are being searched for the jpeg plugin. Make sure you have a clean build of osg 3.0.1 and that the plugins directory for that version is on your PATH and contains osgdb_jpeg.dll or

[osg-users] Collada models, texture resolution and texture mipmaps?

2011-08-31 Thread Christian Buchner
Hi all, thanks to all contributors for the great OpenSceneGraph 3.0.1! we are currently loading a couple of detailed Collada files into a city scenery which displays a mobile radio network in operation. These collada files often have textures that wildly vary in resolution and size. Some of them

Re: [osg-users] [bug] plugin jpg, osg 3.0.1, Windows XP, VC2010

2011-08-31 Thread jOan
Hello, That was the first thing I did but the plugin loads without problems... The DEBUG level doesn't give info. I wrote *.jpg to show that any jpg file doesn't load. Of course I didn't debug using this file name ! the issue seems to be around std::istream that is passed to the loader

Re: [osg-users] [bug] plugin jpg, osg 3.0.1, Windows XP, VC2010

2011-08-31 Thread Robert Osfield
Hi Joan, I don't know the cause of the problem at your end, but I can say that the JPEG plugin didn't change between 3.0.0 and 3.0.1. In fact the last time it changed was back in March of 2010. Given the you've seen a change between 3.0.0 and 3.0.1 but no code has changed I would suggest a

[osg-users] Strange error with opening osg, osgt, osgb type files - ive files work ok.

2011-08-31 Thread Sanat Talmaki
Hi, I am creating a 3d geometry model and saving it out to osg, osgb, osgt and ive formats. I tried to view the saved files in osgviewer and strangely, I can only view the ive file. The others (osg, osgb, osgt) are not visible in viewer as only the background clear_color is seen. As can be

[osg-users] setImage error

2011-08-31 Thread Clement.Chu
Hi, I got an error. Anyone know what is it? I am using visual studio. The program will stop at _callthreadstartex method in threadex.c. Error track: 'Test.exe': Loaded 'C:\OSG\bin\osgPlugins-3.0.0\osgdb_glsld.dll', Symbols loaded. First-chance exception at 0x77c47124 in Test.exe:

Re: [osg-users] General render debugging question

2011-08-31 Thread Brad Huber
I'm getting one of these problems again so let me elaborate a little bit. I am generalizing about several types of bugs that we have seen in this category. Our OSG based application currently works fairly reliably on several machines. Occasionally when we try operating on a new machine, we

Re: [osg-users] Density of the SmokeTrailEffect

2011-08-31 Thread Jason Daly
On 08/31/2011 02:16 PM, Brad Colbert wrote: Hi folks, I have a simple rocket model with a SmokeTrailEffect added and the trail is more like a train of puffs. How do I control the density or closeness of the puffs to make it look more like a trail? The SmokeTrailEffect's ModularEmitter

Re: [osg-users] General render debugging question

2011-08-31 Thread Jean-Sébastien Guay
Hi Brad, In the case below, what osg drawable were these Ushort elements associated with? If you're in debug, and in the debugger, then you can go up the call stack and find out which drawable it was. In your example, you would double-click on the osg::Geometry::drawImplementation line, and

Re: [osg-users] Color grid overlay question/help

2011-08-31 Thread Paul Martz
On 8/31/2011 8:48 AM, Kevin DeMott wrote: There is no reason I have to use osgWidget. I'm rather new to using osg and it seemed to fit into the scheme of everything else that was going on. Is there perhaps a basic example you can point me to regarding the implementation you suggested? I

[osg-users] Rendering ONLY to texture...

2011-08-31 Thread Frank Sullivan
Greetings, everyone. Is there any way to get OSG into a state where it renders everything to an offscreen FBO? In addition to this, I would need to suppress any sort of window creation or rendering to a back buffer. That's my basic question, but here's a little background just in case. What I

Re: [osg-users] Rendering ONLY to texture...

2011-08-31 Thread Frank Sullivan
Oh, one more thing. So, I'm sure it's probably not possible to create a render context without having a window of some kind. My guess is that (in Windows, at least), creating a render context requires a Win32 device context, and that getting a device context requires an HWND. So, I suppose my

Re: [osg-users] Rendering ONLY to texture...

2011-08-31 Thread Jean-Sébastien Guay
Hi Frank, So, I'm sure it's probably not possible to create a render context without having a window of some kind. My guess is that (in Windows, at least), creating a render context requires a Win32 device context, and that getting a device context requires an HWND. So, I suppose my only

Re: [osg-users] Density of the SmokeTrailEffect

2011-08-31 Thread Brad Colbert
No luck so I tried: osgParticle::ModularEmitter* emitter = dynamic_castosgParticle::ModularEmitter*( smoke-getEmitter() ); if ( emitter ) { osgParticle::ConstantRateCounter* counter =

Re: [osg-users] Strange error with opening osg, osgt, osgb type files - ive files work ok.

2011-08-31 Thread Wang Rui
Hi Sanat, Unfortunately I didn't find the attached osg file in the mail, so I can't figure out why osgb and osgt files fail to load. Could you please send the file again? Wang Rui 2011/9/1 Sanat Talmaki sanat.sch...@gmail.com: Hi, I am creating a 3d geometry model and saving it out to osg,

Re: [osg-users] Strange error with opening osg, osgt, osgb type files - ive files work ok.

2011-08-31 Thread Sanat Talmaki
Hi Wang, Sure, I'm attaching the files with this post. I was having trouble attaching them in the morning, guess they didn't get attached after all. Thanks, Sanat -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42352#42352 Attachments:

Re: [osg-users] Strange error with opening osg, osgt, osgb type files - ive files work ok.

2011-08-31 Thread Wang Rui
Hi Sanat, After taking a quick glance at the osg file, I've found that there are questionable matrix values setting in the MatrixTransform node. For example, you have a transformation node with such invalid matrix: Matrix { 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN

[osg-users] [osgPlugins] How to register custom loader plugin dll with OSG?

2011-08-31 Thread Joseph Louis
Hello all! I have followed Wang Rui's excellent tutorial on how to create a custom loader plugin (in the tutorial, he creates an example loader for a .tri format). I am however confused as to proceed in order to register the generated files (.dll, .pdb, .ilk) with the OSG Registry. The

Re: [osg-users] [osgPlugins] How to register custom loader plugin dll with OSG?

2011-08-31 Thread Wang Rui
Hi Joseph, You don't have to take care of the registration of new plugins as the work will be done on the fly. OSG will automatically try to load a dynamic library named osgdb_tri will reading or writing to .tri files. And if it fails to find the .dll/.so file or the plugin can't work properly,

[osg-users] A problem about the cylinder Animation in its height direction

2011-08-31 Thread Jason Oramo
Hi, I want to draw a cylinder which could be stretched in one direction, such as z-axis positive direction. In other word, the height of cylinder would be longer with the time. Using the callback function and matrix to scale, the result is unexpected, and the cylinder is scale in two

Re: [osg-users] Strange error with opening osg, osgt, osgb type files - ive files work ok.

2011-08-31 Thread Sanat Talmaki
Hi Wang, The large translation values are intended as they are UTM coordinate values which can get pretty large. I'm not sure whether these are reasonable in your application or there is something wrong while saving to osg files. But these will cause the bound of the entire graph too large

Re: [osg-users] How can I get the vertices of an .obj or how can I draw a geometry in OSG with a vertices array?

2011-08-31 Thread Sanat Talmaki
Hi Jose, If you choose to go the NodeVisitor route, depending on how your model(s) are built up in your graph - keep in mind you will need to collect the Transforms along the graph and apply them to the geometry below or get the world coordinates and transform the geometries accordingly.

Re: [osg-users] How can I get the vertices of an .obj or how can I draw a geometry in OSG with a vertices array?

2011-08-31 Thread Sanat Talmaki
I just remembered that TriangleFunctor is also useful for this task, in case you haven't seen that already. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42359#42359 ___ osg-users mailing list

Re: [osg-users] Picking ShapeDrawables in osg

2011-08-31 Thread Sanat Talmaki
Hi Hartmut, I would take a look at the osgpick example. It covers a lot of the stuff you might be interested in. Thanks, Sanat. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42360#42360 ___

Re: [osg-users] A problem about the cylinder Animation in its height direction

2011-08-31 Thread Magnus Kessler
On Thursday 01 Sep 2011 04:59:10 Jason Oramo wrote: Hi, I want to draw a cylinder which could be stretched in one direction, such as z-axis positive direction. In other word, the height of cylinder would be longer with the time. Using the callback function and matrix to scale, the result