Re: [osg-users] no texture on object loaded from obj file

2012-01-31 Thread Sebastian Messerschmidt
Hi John? I guess your obj/osg file simply doesn't supply texture coordinates. Search the forum/mailing list for similar problems, it has been discussed several times (AFAIR) cheers Sebastian Hi, i load a model from an obj or osg file an set a texture to the stateset. after starting the prog

[osg-users] osgParticle and transparent objects

2012-01-29 Thread Sebastian Messerschmidt
Hello, After including osgparticle into my renderer I've discovered a problem with alpha blended geometries. For a simple test (to ensure the problem is not on my side) I loaded the cessnafire model along with some alpha blended geometry in osgviewer and the transparent faces are always in fro

[osg-users] Memory leak when resizing

2012-01-28 Thread Sebastian Messerschmidt
Hello, I've just discovered a very strange behavior. In my setup ( Windows7 64bit, osg3.0.1rc1, Nvidia Quadro 2000M, 285.62) i've found that my memory consumption raised with every resize of the viewer window. After doing some research I didn't find anything in my program, so I tried the same

Re: [osg-users] osgUtil::Optimizer and transparent objects

2012-01-26 Thread Sebastian Messerschmidt
ites are off for blended stuff. cheers Sebastian Cheers 26.01.2012, 20:19, "Sebastian Messerschmidt": Anyone any hint regarding this? I'd really need an advice if I should fix the optimizer or where to solve this. cheers Sebastian Hello, I've encountered a problem when

Re: [osg-users] osgUtil::Optimizer and transparent objects

2012-01-26 Thread Sebastian Messerschmidt
Anyone any hint regarding this? I'd really need an advice if I should fix the optimizer or where to solve this. cheers Sebastian Hello, I've encountered a problem when using the OpenFlight plugin with preserveFace/preserveObject option not used. If the perserveFace options is not used, the

Re: [osg-users] How to get osg::State?

2012-01-24 Thread Sebastian Messerschmidt
I strongly suggest using gDebugger. It solved about 99% of my problems, as it can break at OpenGL errors and step into source code. cheers Sebastian I just hacked the State constructor and now I get this message:. Warning: detected OpenGL error 'invalid value' at Geometry::drawImplementatio

Re: [osg-users] Help: wrong ouput from frag shader.

2012-01-18 Thread Sebastian Messerschmidt
is read via Image, the output is: 0.188235,0,0,1 0.560784,0,0,1 so this time it works! I really cannot figure out why this happens! Thank you very much in advance for any advice! Shuiying On 01/18/2012 08:11 AM, Sebastian Messerschmidt wrote: I suppose you are using a

Re: [osg-users] Help:what is openGl shader version 140?

2012-01-17 Thread Sebastian Messerschmidt
Hello shuiying, either your card doesn't support glsl version 1.40 or you might have some other error in the shader. GLSL comes in different versions that are (AFAIK) defined by the GPU Architecture/Driver and Base OpenGL version. I had such warning sometimes if there was another problem in the

Re: [osg-users] Help: wrong ouput from frag shader.

2012-01-17 Thread Sebastian Messerschmidt
I suppose you are using a normal framebuffer. I this case it is pretty normal, that your original value that is in the image (you unfortunately didn't tell use if the value comes from a texture) doesn't exactly match the value in the framebuffer. Usually the framebuffer has 8bit per color channe

[osg-users] osgUtil::Optimizer and transparent objects

2012-01-16 Thread Sebastian Messerschmidt
Hello, I've encountered a problem when using the OpenFlight plugin with preserveFace/preserveObject option not used. If the perserveFace options is not used, the importer uses the Optimizer with the following options: osgUtil::Optimizer::SHARE_DUPLICATE_STATE |

Re: [osg-users] Help:Is there a way for a single fragment to know its index during per-fragment operation?

2012-01-14 Thread Sebastian Messerschmidt
Hi Shuiying, The fragments coordinates(or index as you call it) can be accessed via gl_FragCoord. This will give unnormalized device coordinates (i.e. [0,xRes] [0,yRes]) which are also called window relative coordinates If you pass your screen resolution as uniform vec2 you can normalize them

Re: [osg-users] Multipass RTT and near far plane computation

2011-12-30 Thread Sebastian Messerschmidt
Hi Again, FYI: I was able to solve the problem partially. If I set the second RTT pass to ABSOLUTE_RF and set the modelview matrix for the RTT2 in the main-camera initialDrawCallback and the projection in the clampProjectionCallback I get the correct depths. Unfortunately the transparent pass

[osg-users] Multipass RTT and near far plane computation

2011-12-30 Thread Sebastian Messerschmidt
Hello, I've encountered a problem which I#m not able to solve easily. In my current setup I have to separate the opaque geometry from the transparent ones. For this I set up two RTT-cameras that render to different texture targets and combine them afterwards. This setup works really fine with

Re: [osg-users] World to Screen Space

2011-12-08 Thread Sebastian Messerschmidt
Hello Martin, there are some things I'd check: 1. Transformation order (i'm not quite sure about the osg::Matrix order) So trymat * vec instead of vec* mat 2. viewMat, this should take you from object space to view-space if I'm not mistaken. So if you really have world-space you just need

Re: [osg-users] Problem with deferred rendering

2011-12-07 Thread Sebastian Messerschmidt
Hi Micael, as J-S already pointed out, you have to be aware of the space you are working in. I don't really agree that it has to be done directly in world space, but that is not important, as you can get correct results in view-space too. In my point light lighting pass I do: Vertex: varying

Re: [osg-users] Sharing depth buffer between fbos

2011-12-05 Thread Sebastian Messerschmidt
l - De: "Sebastian Messerschmidt" À: "OpenSceneGraph Users" Cc: "Frederic Bouvier" Envoyé: Lundi 5 Décembre 2011 17:02:17 Objet: Re: [osg-users] Sharing depth buffer between fbos Hi Frederic, I'm using a similar setup. I simply attach the the depth-buffer-texture

Re: [osg-users] Sharing depth buffer between fbos

2011-12-05 Thread Sebastian Messerschmidt
Hi Frederic, I'm using a similar setup. I simply attach the the depth-buffer-texture to the first RTT pass and later on bind it to multiple passes that need to have depth writes disabled. This way everything works as expected. My RTT cameras are childs of the root node of the scene. Setting th

Re: [osg-users] (no subject)

2011-12-03 Thread Sebastian Messerschmidt
Hello Michael, I guess with instancing you mean not loading the geometry more than once. By default, when loading a let's say openflight database OSG will load every external, even it has been encountered before. There are 2 options you can try. 1, Set up a readFileCallback and cache the model

Re: [osg-users] ShadowMapping in a multipass deferred setup

2011-12-01 Thread Sebastian Messerschmidt
Hello Wojciech, first of all, thank you for taking a reasonable amount of time to dig in to my problems. Hi Sebastian, Unfortuantely I do not have enough time to get as deep as neccessary into this complex problem you are considering. There could be many approaches to integration of deffered

Re: [osg-users] ShadowMapping in a multipass deferred setup

2011-11-29 Thread Sebastian Messerschmidt
okay, I've gotten a bit further with this one. I realized that what I really need are two separate things. The first one is to specify the texture the shadow-pass renders in by myself so I can bind the appropriate texture object and set the render order individually. The second step is to tell t

[osg-users] ShadowMapping in a multipass deferred setup

2011-11-28 Thread Sebastian Messerschmidt
Hello, I have used the osg shadow implementations with great success in state of the art forward rendering. Right now I'm trying to implement shadowmapping into my deferred rendering approach. Can anyone point me into the right direction, regarding the correct usage of the view dependent shado

Re: [osg-users] switch colored display to grayscale

2011-11-27 Thread Sebastian Messerschmidt
The easiest solution I can think off, is to write a simple fragment shader that outputs the luminance of each pixel. I don't know about anything that does this out of the box. cheers Sebastian Hi, I'm new to OSG but need a switch by using flightgear. Is it somewhere simple to switch colored o

Re: [osg-users] How to manipulate a scene node using the mouse

2011-11-26 Thread Sebastian Messerschmidt
Hello Jasper, you might want to take a look at the osgManipulator example. It should give a good overview over the per-node manipulators cheers Sebastian Hi, I know that using Trackballmanipulator as a camera manipulator enables the user to roate/translate/scale the entire scene. In my applic

Re: [osg-users] VBO Bug ?

2011-10-13 Thread Sebastian Messerschmidt
I've just tried this, and indeed: Setting Threaded Optimization from Auto to Off yields the "good" result. So maybe we should try to reproduce this with pure OpenGL and send a sample to NVidia (they have been very responsive in the past if you send an example) cheers Sebastian Dear Wojtek et

Re: [osg-users] VBO Bug ?

2011-10-12 Thread Sebastian Messerschmidt
Hi Wojciech, I get the bad result, running on NVidia Quadro NVS 140M, Driver version 186.94, Windows 7 Enterprise 32bit. Hi Robert and Community, I am seeing strange problem with VBOs in OSG on Windows and several NVidia boards and several driver versions. Basically a set of geometries with c

Re: [osg-users] Multipass render to texture order again

2011-10-05 Thread Sebastian Messerschmidt
y work. sorry, I'm not sure how to do it either. Someone with knowledge about slave cameras might be able to help you. I suggest posting another question with that as topic. rgds jp cheers Sebastian Hi, On 05/10/2011 11:39, Sebastian Messerschmidt wrote: Hi JP I've tried single

Re: [osg-users] Multipass render to texture order again

2011-10-05 Thread Sebastian Messerschmidt
Am 05.10.2011 11:39, schrieb Sebastian Messerschmidt: Hi JP I've tried single and multithreaded, but this doesn't seem to change anything. So first camera attached should be the first one to be rendered If I understood you correctly? Can you give me a pointer on how to force i

Re: [osg-users] Multipass render to texture order again

2011-10-05 Thread Sebastian Messerschmidt
ou running SingleThreaded? Cameras (siblings) under the same node are normally rendered in the order they have been attached (you can force this with TRAVERSAL_ORDER bin too). jp On 05/10/2011 11:05, Sebastian Messerschmidt wrote: Hi, I know this has been discussed more then once before, b

[osg-users] Multipass render to texture order again

2011-10-05 Thread Sebastian Messerschmidt
Hi, I know this has been discussed more then once before, but I still don't get the details. In my setup I'd like to use something like (this is supposed to be a table InputCamOutput Tex1Cam1Tex2 Tex2Cam2Tex3 Tex3Cam3Tex4 ... and

Re: [osg-users] RTT second pass

2011-09-30 Thread Sebastian Messerschmidt
Hello Sergey, Thanks for the hints so far. I'll check the approaches. Hi Sebastian, as for depth buffer - you might try ( not sure though ) two approaches a) use depth replace shader ( replace current depth with provided depth ) b) use depth testing in shader - such that you manually compute

Re: [osg-users] RTT second pass

2011-09-30 Thread Sebastian Messerschmidt
I'm quite desperate on this one, any advises how to setup the camera in the second pass, anyone? Hello again, In my project I need to setup a second render pass that performs the following: Render the scene from the original camera's view (as in the first RTT pass). Set the second camera t

Re: [osg-users] Passing node transformations to the vertex shader

2011-09-30 Thread Sebastian Messerschmidt
I've encountered the same problem, and setting the context->getState()->setUseModelViewAndProjectionUniforms(true); for each context didn't work in any case (with a multi-pass offscreen rendering). So the simple solution for me was to use the #version 150 compatibility profile, which let's you

[osg-users] RTT second pass

2011-09-28 Thread Sebastian Messerschmidt
Hello again, In my project I need to setup a second render pass that performs the following: Render the scene from the original camera's view (as in the first RTT pass). Set the second camera to be pre-render with render-order increased. Render some volumes and apply a shader a those positions

[osg-users] Texture2DMultisample usage example

2011-09-23 Thread Sebastian Messerschmidt
Hello, I'm experimenting a bit with multisampled RenderTargets and need some advice with Texture2DMultisample. As far as I understood this, it can be used like usual textures (i.e. binding it to a COLOR_BUFFER for a MRT setup) with a specific sampler inside the shader. Unfortunally I get an er

Re: [osg-users] Shadowing + Multitexture

2011-09-23 Thread Sebastian Messerschmidt
Hello Alastair, If you parse the forum/mailing list for shadow and multitexturing or other terms you will find a heap of information about this. In general you'll have to write your own custum shader in order to use shadow with more than one texture /3d-texture and so on. The stock shadow-shade

Re: [osg-users] RTT multipass on same geometry

2011-09-22 Thread Sebastian Messerschmidt
Thanks to all replies but I was able to figure it out. My initial idea was to modify a color attachment created in the first pass in the second pass only where fragments were created(i.e. depth was written) I came up with the following solution: 1. Pass RTT-Cam1 - DEPTH, COLOR1, COLOR2, .

Re: [osg-users] RTT multipass on same geometry

2011-09-21 Thread Sebastian Messerschmidt
scene? On 9/21/2011 10:54 AM, Sebastian Messerschmidt wrote: Hello, I've have a question regarding RenderToTexture in a multipass setup. I have to RTT cameras, the first one has DEPTH and 3 color attachments, while the second has only one color attachment. I need to use the data fro

[osg-users] RTT multipass on same geometry

2011-09-21 Thread Sebastian Messerschmidt
Hello, I've have a question regarding RenderToTexture in a multipass setup. I have to RTT cameras, the first one has DEPTH and 3 color attachments, while the second has only one color attachment. I need to use the data from the first RTT-pass in the second camera, so the renderorder is set acco

[osg-users] osgSim::OverlayNode view dependent

2011-09-19 Thread Sebastian Messerschmidt
Hi, I need to project some geometry onto the surface of my database. I tried osgSim::Overlaynode for this. Using the OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY i get good results for relatively small overlays. For testing purposes I've added a bunch of lines to one drawable. Naturally this le

Re: [osg-users] Camera returns NULL viewport on Windows but not Linux

2011-08-10 Thread Sebastian Messerschmidt
Hi Paul, This is expected behaviour as far as I know. The viewer camera won't return you a viewport if more than one device context is used (i.e. more than monitor) Ok now I am making some progress. If I set the environment variable OSG_SCREEN to 1 then the problem goes away and the pointer

Re: [osg-users] OSG 2.8.3 & 3.0.1 view dependent shadow clipping plane

2011-08-02 Thread Sebastian Messerschmidt
Hi Cyril, have you tried setting the MinLightMargin of the shadowmap to a high value? I didn't look to closely, but i recall having such problems when using the standard settings. Also the LightSpacePerspective shadow mapping works very well for me, so maybe try this one for the bigger outdoor

Re: [osg-users] osg::ProxyNode and osg::ComputeBoundsVisitor

2011-07-25 Thread Sebastian Messerschmidt
Am 25.07.2011 17:15, schrieb Oren Fromberg: Hey Sebastian! Thanks for the interesting reply. So, I guess that explains why the dimensions of my bounding box are tending to infinity! I have some questions though: 1) what do you mean by "load the proxy node at least once"? does that mean to add

Re: [osg-users] osg::ProxyNode and osg::ComputeBoundsVisitor

2011-07-24 Thread Sebastian Messerschmidt
Hello Oren, It seems that the node isn't loaded at all. As I do something similar in my database compiler, I think you will have to actually load the proxy node at least once to calculate the correct bounds for it: You code is correct, but as you defer loading of the real model, the ComputeBou

Re: [osg-users] osgAnimation and official Kinect SDK

2011-07-07 Thread Sebastian Messerschmidt
Hi Aitor, Usually when I encounter something like this, the best way to analyze is to use the axes model delivered with the openscenegraph data. This way you can find out which axis is pointing which way. Usually you then come up with something like: x_org = -y y_org = x z_org = -z Mathemati

Re: [osg-users] Shadow mapping using different scene graph for mapping

2011-07-06 Thread Sebastian Messerschmidt
DEEP_COPY_NODES | DEEP_COPY_DRAWABLES), strip statesets out of it completely, and then use it for rendering. Cheers, Sergey. 05.07.2011, 22:43, "Sebastian Messerschmidt": Hi, Currently I'm trying to improve performance regarding shadow mapping. So far I've managed to ge

Re: [osg-users] PagedLOD for shared nodes

2011-07-05 Thread Sebastian Messerschmidt
Am 06.07.2011 00:33, schrieb Luigi Calori: On 05/07/2011 20.32, Sebastian Messerschmidt wrote: Am 05.07.2011 17:42, schrieb Chris 'Xenon' Hanson: On 7/5/2011 5:50 AM, Sebastian Messerschmidt wrote: Hi, It seems like referencing e.g. tree1 multiple times in the graph creates multi

[osg-users] Shadow mapping using different scene graph for mapping

2011-07-05 Thread Sebastian Messerschmidt
Hi, Currently I'm trying to improve performance regarding shadow mapping. So far I've managed to get reasonable results for large outdoor scenes using LightSpacePerspectiveMaps. In order to improve performance further, I did come up with the following idea: As my scene-graph consists of many ob

Re: [osg-users] PagedLOD for shared nodes

2011-07-05 Thread Sebastian Messerschmidt
Am 05.07.2011 17:42, schrieb Chris 'Xenon' Hanson: On 7/5/2011 5:50 AM, Sebastian Messerschmidt wrote: Hi, It seems like referencing e.g. tree1 multiple times in the graph creates multiple render instances instead of sharing the node. So loading the master.ive almost certainly co

[osg-users] PagedLOD for shared nodes

2011-07-05 Thread Sebastian Messerschmidt
Hi, I have a very big OpenFlight based database in which I've converted the ProxyNodes for terrain-tiles into PagedLOD nodes. The general layout of the database looks like this: master |PagedLOD (flight_0_0) | |-PagedLOD(tree

Re: [osg-users] Looking for the best modeling approach in terms of performance

2011-06-09 Thread Sebastian Messerschmidt
The general answer to your problem is: depends ;-) Seriously, for me option B) is likely to get you more performance, as you are using one texture for a bigger chunk of geometry. On the other hand this might largely depend on the actual size of the chunk. Less materials will perform better, as

Re: [osg-users] too much computation

2011-06-07 Thread Sebastian Messerschmidt
From the first look I'd advise to split up the geometries and put them into multiple nodes. Looking at the code I don't know which limit you're hitting here, but there are limits in the opengl implementations that might dissallow buffers beyond certain sizes. cheers Sebastian Hi I have modif

Re: [osg-users] [vpb] vpb generated .osga model seems disturb shared memory in qt4

2011-04-21 Thread Sebastian Messerschmidt
Just a guess, are you mixing debug and release builds? (i.e. linking in the debug build to release libraries) I've encountered the strangest memory corruptions and crashes (due to differently sized STL data structures) under windows however. Since I'm not quite know the stl implementation you u

Re: [osg-users] GL_POLYGON could not using osgFX::Bumpmapping?

2011-03-31 Thread Sebastian Messerschmidt
Am 31.03.2011 07:49, schrieb litingbaotou: > win7, nVidia GTX 260, driver vision 8.17.12.6099 > I use GL_POLYGON to display a polygon, why? Polygons are known to be of less performance and add some other oddities, because rendering of polygons can't be done with the usual algorithms. Therefore the

Re: [osg-users] How can I change the RGBA value of the shadow?

2011-03-04 Thread Sebastian Messerschmidt
Hi Matthew, I think i have answered this question like two times before, so please try to look into the forum/archives next time. Anyway, probably you'll have to modify the shader source to change the color. Usually after the depth compare the shadowed fragments are given the a biased ambient

Re: [osg-users] Using osgShadows I can't see widgets

2011-02-10 Thread Sebastian Messerschmidt
Hi Daniele, When using shadow techniques, you have to put all your child that are supposed to be shadowed in separate scene below the shadowed scene, as a sibling to the rest of the scene. E.G. if you have a hud: root | || HUD SHADOW

Re: [osg-users] How can I change the RGBA value of the shadow?

2010-12-16 Thread Sebastian Messerschmidt
Am 15.12.2010 08:57, schrieb Duan Linghao: Hi, I want to control the color of shadow.How can I change the RGBA value of the shadow? ... You'll have to be a little more specific. Why shadowing technique are you using? In case you use standard shadow-mapping you can set a emissive ambient color

Re: [osg-users] so big different performance in debug and release?

2010-08-31 Thread Sebastian Messerschmidt
John Water schrieb: Hi, recently, I trace 3D application'performance in debug, frame rate always is low and cull time always is high, I use lots of method to speed application; it improve a little. but today after I compile application as release version, the culling time drops from 100ms to

Re: [osg-users] PageLOD externals

2010-07-06 Thread Sebastian Messerschmidt
are being tried - there is a chance that the external files aren't being found for some reason. Second suggestion is to output your files to .osg and then inspect the file references and distances by hand to see if they all make sense. Robert. On Tue, Jul 6, 2010 at 6:45 PM, Sebastian Messerschmi

[osg-users] PageLOD externals

2010-07-06 Thread Sebastian Messerschmidt
Hello, I've managed to convert a relatively large OpenFlight database to a pagedLOD - database. Therefore I replace all terrain-tile references (proxyNodes) in the master.flt with PagedLOD nodes that reference the converted .ive page. In another step I also replaced all references inside the t

Re: [osg-users] Loader Plugin callback mechanism

2010-07-01 Thread Sebastian Messerschmidt
Hi Ulrich, Hi Sebastian, On 1/07/10 1:18 , Sebastian Messerschmidt wrote: I would suggest reading up on previous discussions about UserData class that supports various generic attribute representation. It does seem like there would be a big overlap with what you are after. What a callback is

Re: [osg-users] Loader Plugin callback mechanism

2010-06-30 Thread Sebastian Messerschmidt
Robert Osfield schrieb: HI Sebastien, On Wed, Jun 30, 2010 at 10:27 AM, Sebastian Messerschmidt wrote: Do you think that such extension would be general enough to be applied to loaders? Um... I can't really say but I kinda doubt it'll be ideal way to tackle the problem. Ok, th

[osg-users] Loader Plugin callback mechanism

2010-06-30 Thread Sebastian Messerschmidt
Hi, Some file formats like OpenFlight can contain various data, which might not be directly related to rendering but can be important in other contexts. While I fully agree that the loaders can and should skip this information when constructing the scene-graph, I would find it extremly useful

Re: [osg-users] [ANN] osgScaleViewer

2010-05-18 Thread Sebastian Messerschmidt
Hello Stefan, that are great news. Thanks for sharing this! Hello All, We'd like to announce the availability of osgScaleViewer, a scalable, cluster-ready OpenSceneGraph viewer based on the Equalizer parallel rendering toolkit. Th integration with Equalizer offers a number of high-level featur

Re: [osg-users] self shadow support in osgShadow

2010-04-09 Thread Sebastian Messerschmidt
Hi summit, Most of the osgShadow implementations support self-shadowing. So it is more a matter of the used implementation. If you use any form of shadow-mapping, there always be self-shadowing per se. Look at the osgShadow example to find out more. cheers Sebastian Hi, I was wonderin

Re: [osg-users] Website not reachable from france and austria

2009-05-31 Thread Sebastian Messerschmidt
same for germany Hi, i can access: blog.openscenegraph.org forum.openscenegraph.org but not www.openscenegraph.org / openscenegraph.org Seems to be a dns problem? ping www.openscenegraph.org PING lemonvm-osg.ai2.upv.es (158.42.9.50) 56(84) bytes of data. Thank you! Cheers, Johannes --

Re: [osg-users] vertex shader help: compare position

2009-05-27 Thread Sebastian Messerschmidt
Hi Paul, I guess the problem is related to the "varying". AFAIR it is interpolated over the primitive. So maybe this is the problem. The other odd thing is that you do if (inside) discard; instead of if (inside == 1.0) discard; cheers Sebastian Hi, Im trying to use a shader to make p

Re: [osg-users] Referencing loaded models

2009-05-23 Thread Sebastian Messerschmidt
Thanks Kim and Paul, My problem seems to be elsewhere. Me stupid hasn't tried his own minimal example. In my application I sort of wrap certain scene elements (like models) for an more abstract interface to loaded entities (as the models geometrical/graphical representation is only one aspect)

Re: [osg-users] Referencing loaded models

2009-05-23 Thread Sebastian Messerschmidt
Hi Paul, but isn't this just cloning? With other words: is there something that is shared between the nodes? Plus, i would favour something not involving static data ;-) cheers Sebastian I does this: const static osg::ref_ptr< osg::Node > staticNode = osgDB::readNodeFile("Shapes/Shape.osg");

[osg-users] Referencing loaded models

2009-05-23 Thread Sebastian Messerschmidt
Hi, This might be a total beginners question, but I didn't find any sufficient information in the forum nor in the documentation. Let's assume I have a scene composed of some models, let's say a trees/houses which are the same model. If I want to load the model once and use it multiple times (w

Re: [osg-users] World space bounding box

2009-05-14 Thread Sebastian Messerschmidt
Hi, Hi Paul, const osg::MatrixList& m = node->getWorldMatrices(); osg::ComputeBoundsVisitor cbv; node->accept( cbv ); osg::BoundingBox bb = cbv.getBoundingBox(); osg::Vec3 minV = bb._min * m.front(); osg::Vec3 maxV = bb._max * m.front(); osg::notify( osg::ALWAYS ) <<

Re: [osg-users] World space bounding box

2009-05-14 Thread Sebastian Messerschmidt
Hello Harold, There is another method to get the axis aligned box from an arbitrary transformed box: I can provide you some pseudo-code: Given a aabox (box) and a matrix (mat) that transforms the box the following will return a new axis aligned box: See reference [1] void bbox::Transform(

[osg-users] Openflight converter

2009-02-17 Thread Sebastian Messerschmidt
Hello folks, I need all essential data inside several openflight files. For instance I'm interested in the triangle data, the surface material codes/feature codes and the DOFs and switches. Also I need externals that are referenced by the file (with name and transform). I need to convert these

Re: [osg-users] Porting RenderMonkey's NightSky Effect to OSG in GLSL

2008-10-13 Thread Sebastian Messerschmidt
Hello, Just guessing: But this looks like wrong Texture-Repeating to me. hth Hi All, I want to create sky night effect on simple quad.3ds model with using GLSL like RenderMonkey-> Examples-> GL2->ScreenSpace Effects->NightSky. I opened up render monkey and analyzed the given sample and it'

Re: [osg-users] Using SSE within OSG

2008-07-29 Thread Sebastian Messerschmidt
Hi All, Regarding question 2: Wouldn't it be possible to dynamically link different versions of the OSG-DLLs? So there would be two Version of the DLLs, one with the SSE-Optimizations and one with the straightforward code. I've seen examples of games some years ago, where they linked different

Re: [osg-users] Problem using osg::ColorMatrix

2008-07-28 Thread Sebastian Messerschmidt
Hi Rahul. If I recall correctly the color matrix isn't working on most consumer cards. You need the the GL_ARB_IMAGING extension. Alternatively you can achieve the desired effect with a shader. cheers psy Hi all, I am trying to use OpenFL color matrix functionality through osg::ColorMatrix but n

Re: [osg-users] 144 errors in gl.h (resend with clean text)

2008-07-02 Thread Sebastian Messerschmidt
As far as I remember I had this error, too. It was somehow related to the windows.h. Try to include it later. hth Sebastian Hi, I don't know for the compilation errors, but "new osg::Camera;// execute main loop" will not do anything... try "viewer.run()" ... Vincent. Le 2 juillet 2008 12:25

Re: [osg-users] Adding a shader cancels shadows!

2008-05-22 Thread Sebastian Messerschmidt
Hi Art and Mail, it is right that you have to combine the shaders yourself. But beware! If you are using a vertex shader you'll have to write the projection part for the shadow mapping yourself. Just search the archives or drop me a line if you are not finding anything. I have those shaders st

Re: [osg-users] Shapefile troubles

2008-05-02 Thread Sebastian Messerschmidt
Hi Kimmo, I’ve been testing the plugin some days ago and noticed that some files are not loaded correctly. The problem here was, that the loader only loaded the first record. This happened with some files generated in Multigen. I have to test this before I submit a patch. Dunno if this is rela

Re: [osg-users] Night Vision

2008-04-25 Thread Sebastian Messerschmidt
Hi Julien, This effect can be achieved using the color matrix or a pixel shader. It's only a fake, but looks quite convincing. For a night-vision like colors you can multiply your color by r *= .15 g*= .3 b*= .05 For additional effects you might wan't to add scanlines and so on. You might also

Re: [osg-users] GLSL Setting up gl_EyePlane

2008-04-23 Thread Sebastian Messerschmidt
Hi Paul, depending on what you are trying to achieve, you've got to update the planes every frame in the way you mentioned. If your matrix is somehow connected to the View or Modeling matrices, you need to update them. You can use a updateCallback or look into the samples for TexGenNode IIRC.

[osg-users] Transform Feedback

2008-04-21 Thread Sebastian Messerschmidt
Hi, I'm using geometry shaders with openscenegraph. I'd like to ask if there are plans to implement transform feedback soon. I'm just wondering, since this extension seems to be NV only. Is this the same for geometry-shaders ( i.e. are there ATi cards that support geometry shaders) ? cheers p

Re: [osg-users] Projective Texturing in GLSL shader

2008-04-13 Thread Sebastian Messerschmidt
Hi Paul, In the vertex shader try this vec4 ecPosition = gl_Vertex * gl_ModelViewMatrix; gl_TexCoord[0].s = dot(ecPosition, gl_EyePlaneS[0]) ; gl_TexCoord[0].t = dot(ecPosition, gl_EyePlaneT[0]) ; gl_TexCoord[0].p = dot(ecPosition, gl_EyePlaneR[0]); gl_TexCoord[0].q = 1.0;

Re: [osg-users] osgShadow example and gerneral question

2008-03-16 Thread Sebastian Messerschmidt
Hi Adrian, As I’ve pointed out in the osg-users list, there seems to be a bug in recent ATI drivers where the t-coordinate in the generated shadow texture is screwed up, i.e. inversed. Your screenshots don’t look exactly like the artefacts I’ve seen but it might be related I reckon. To check

Re: [osg-users] Complete darkness

2008-02-29 Thread Sebastian Messerschmidt
osg::LightModel::setAmbientIntensity(const osg::Vec4& ambient) IIRC this controls the global ambient intensity. So setting this to zero might solve your problem. hth, Sebastian Necdet Can Atesman schrieb: > Hi folks, > > I am unable to create complete darkness in osg. I'm setting the only > lig

Re: [osg-users] GLSL Preprocessor

2008-02-25 Thread Sebastian Messerschmidt
Joachim E. Vollrath schrieb: > Hi Sebastian, > > certainly would be a nice feature, although maybe shader synthetization > should perhaps be done in a library of its own.. > I agree that high level modifications shouldn't be part of the osg::Shader / Program. But I consider the preprocessor ma

Re: [osg-users] GLSL Preprocessor

2008-02-25 Thread Sebastian Messerschmidt
nstructor: > > std::string source = loadShaderFile(filename); > source = "#define SIMPLE \n" + source; > osg::Shader* shader = new osg::Shader(osg::Shader::VERTEX, source); > > Sebastian Messerschmidt a écrit : > >> Hello, >> >> I was wondering if the preprocess

[osg-users] GLSL Preprocessor

2008-02-25 Thread Sebastian Messerschmidt
Hello, I was wondering if the preprocessor language in GLSL is somehow useable for osg. Imagine I had a shader with .. #ifdef SIMPLE vec4 Color = vec4(1.0); #else if NOT_SO_SIMPLE vec4 Color = unimaginableComplicatedColorFunction(...) #endif Can I pass those defines to osg::Shader? I didn't fin

Re: [osg-users] How to save the rendering scene as a ".avi" file ?

2008-02-25 Thread Sebastian Messerschmidt
Hi, there has been a similar request some weeks ago .. If you just want to capture the rendering result you can use an external tool such as "fraps" for win32. There was some tool for linux also but I cannot recall ... HTH Sebastian loy_1987 schrieb: I am not familiar with this problem.I hop

Re: [osg-users] ShadowMapping on recent ATI - repost

2008-02-22 Thread Sebastian Messerschmidt
since I've been debugging I tried almost everything ;-) ) thx a lot Sebastian Sebastian Messerschmidt schrieb: > Hi Christian, > > I think i've seen your post on gamedev.net and tried to answer ...;-) > Coincidence. > Problem for me is, that even on 7.1 it's

Re: [osg-users] ShadowMapping on recent ATI - repost

2008-02-21 Thread Sebastian Messerschmidt
Hi Christian, I think i've seen your post on gamedev.net and tried to answer ...;-) Coincidence. Problem for me is, that even on 7.1 it's not working (but I've downgraded driver which might obscurify this issue a bit). I recently read some articles, where most of them were stating that binding

[osg-users] ShadowMapping on recent ATI - repost

2008-02-21 Thread Sebastian Messerschmidt
Sorry for wrong posting :-( Hello, I've encountered a very strange problem with osgShadow::ShadowMap. As I've posted before I have managed to write a perpixel shader that uses shadow mapping. And what shall I say: Works like a charme ... at least on a geForce 8600, X600, X1300 with older driver

[osg-users] ShadowMapping on recent ATI

2008-02-21 Thread Sebastian Messerschmidt
Hello, I've encountered a very strange problem with osgShadow::ShadowMap. As I've posted before I have managed to write a perpixel shader that uses shadow mapping. And what shall I say: Works like a charme ... at least on a geForce 8600, X600, X1300 with older drivers. Until I tried it with a ne

Re: [osg-users] osgShadow one shot shadow map

2008-02-12 Thread Sebastian Messerschmidt
Hi, I've implemented this and it works reasonably well. But there is a catch though ... When creating my shadowed scene (usually by loading elements) I set the ShadowMap to "updateMode" in order to render the new Elements. However, due to multithreading I need a way to be certain, that all elem

Re: [osg-users] osgShadow one shot shadow map

2008-02-12 Thread Sebastian Messerschmidt
Hi Wojciech, Thanks for clarifying. I was looking into it yesterday but didn't find the right spots. Maybe this could be integrated into the current implementation. I'm pretty sure it might be usefull for other users too. > Hi, > > ShadowMap::cull invokes culls traversal for both main camera >

[osg-users] osgShadow one shot shadow map

2008-02-11 Thread Sebastian Messerschmidt
Hi everyone, I'm quite confused regarding the osgShadow implementation. My scene and my light-positions are static. My idea was to capture the shadow-map only once and apply it consecutively in all frames. I'm a bit lost where to start. Neither update nor cull seems to be the right place. Any hi

Re: [osg-users] ShadowMap and TEXTURE_COMPARE_MODE

2008-02-06 Thread Sebastian Messerschmidt
Hi Jean-Sébastien > Hi Sebastian, > > >> I derived my shader from the shader in the sources. >> > > Ok, that's what I was wondering about. > > >> I really need the vertex shader in order to >> calculate lighting on per pixel base. >> > > Of course, I didn't mean to remove the ve

Re: [osg-users] ShadowMap and TEXTURE_COMPARE_MODE

2008-02-06 Thread Sebastian Messerschmidt
Hello again, I derived my shader from the shader in the sources. I really need the vertex shader in order to calculate lighting on per pixel base. Sampler names should not matter, as the texture objects are rebound to my names (which should take all texgens etc into account). Sadly I suspect th

Re: [osg-users] ShadowMap and TEXTURE_COMPARE_MODE

2008-02-06 Thread Sebastian Messerschmidt
Hello Jean-Sébastien, I reckon that my assumption regarding the texture compare mode were wrong. But indeed the whole problem seems to be with my shaders. I'm willing to provide the per-pixel modifications. I guess I'm doing something very wrong in my vertex shader. Upon completion and testing t

[osg-users] ShadowMap and TEXTURE_COMPARE_MODE

2008-02-06 Thread Sebastian Messerschmidt
Hi everyone, I've been struggling with the implementation of osgShadow::ShadowMap in osg 2.2.0. It seems to me the shadow texture compare mode is not set, which results in strange results. My project requieres per pixel illumination, which is why I have to calculate all projections in the verte

Re: [osg-users] making a movie of an OSG simulation

2008-02-06 Thread Sebastian Messerschmidt
IIRC a little tool called "fraps" is doing the job. cheers psy > hi > > I wanted to make a movie of whatever is displayed on the screen when > running an osg program. > how do i do it ? > > Thank You > ___ > osg-users mailing list > osg-users@lists.opens

<    5   6   7   8   9   10   11   >