Re: [osg-users] OSG logo, now in 3D!

2013-12-07 Thread michael kapelko
Nice! Can you save it as Collada or similar format for better interoperability? 2013/12/7 Farshid Lashkari > I was surprised to find that there is no 3D version of the OpenSceneGraph > logo, at least not in the osg-data repository. I think OSG has been around > long enough to deserve a 3D logo,

Re: [osg-users] [3rdparty] New OpenSceneGraph and Newton Dynamics 3.13 physics engine integration.

2013-11-14 Thread michael kapelko
Nice! I wish you could make a video to depict that. 2013/11/15 Julio Jerez > Hello > > I'm happy to announce a new Open Scene Graph tool. > > The name is osgNewton and can be acquired here: > > http://code.google.com/p/osgnewton/ > > > > This is a wrapper that integrates Newton Dynamics version

Re: [osg-users] Is it possible to use EffectCompositor to describe effects per object?

2013-11-08 Thread michael kapelko
materials relative to the used pipeline, because separate pipelines with materials allow for easy video setup changes (low, medium, high), easy theming (different material sets), etc.. Any ideas? Thanks. 2013/11/7 Sebastian Messerschmidt > Am 07.11.2013 14:04, schrieb michael kapelko: > &g

Re: [osg-users] Is it possible to use EffectCompositor to describe effects per object?

2013-11-07 Thread michael kapelko
an object manages its > define-set? > In my case, I simply get the object's StateSet and setup uniforms. But I > don't get how to setup defines. > Thanks. > > > 2013/11/7 Sebastian Messerschmidt > >> Am 07.11.2013 12:55, schrieb michael kapelko: >> >&

Re: [osg-users] Is it possible to use EffectCompositor to describe effects per object?

2013-11-07 Thread michael kapelko
Can you please provide an example of how an object manages its define-set? In my case, I simply get the object's StateSet and setup uniforms. But I don't get how to setup defines. Thanks. 2013/11/7 Sebastian Messerschmidt > Am 07.11.2013 12:55, schrieb michael kapelko: >

Re: [osg-users] Is it possible to use EffectCompositor to describe effects per object?

2013-11-07 Thread michael kapelko
ormat so that it resembles the one > of EffectCompositor. > > Thanks. > > > 2013/10/31 michael kapelko > >> Hi, Wang. >> >> I've just checked if I can use some uber shader and control its >> behaviour per object by setting the object's

Re: [osg-users] Is it possible to use EffectCompositor to describe effects per object?

2013-11-07 Thread michael kapelko
Hi. I decided to go with single pipeline that provides big shaders and objects using own uniforms and textures to change the pipeline behaviour. I started to design a simple material format so that it resembles the one of EffectCompositor. Thanks. 2013/10/31 michael kapelko > Hi, W

Re: [osg-users] Is it possible to use EffectCompositor to describe effects per object?

2013-10-30 Thread michael kapelko
see how normal and deferred > shaded objects are merged. At present I haven't had a better idea about > this problem. :-) > > Wang Rui > > > > 2013/10/30 michael kapelko > >> Hi. >> I've recently implemented deferred shading with normal mapping an

[osg-users] Is it possible to use EffectCompositor to describe effects per object?

2013-10-30 Thread michael kapelko
Hi. I've recently implemented deferred shading with normal mapping and shadow mapping using EffectCompositor, but it has effect on the whole scene, not a single object. Is it possible to use EffectCompositor to apply effects per object? Thanks. ___ osg-us

Re: [osg-users] How to add shadows to deferred shading?

2013-10-30 Thread michael kapelko
Hi. I've refactored my example to work using plain OSG or EffectCompositor. Makefile builds both versions. They only differ in how passes are organized: http://goo.gl/9KaqZT The final result: http://youtu.be/AjWOSuLxZ68 Thanks. 2013/10/28 michael kapelko > Hi. > Thanks. > I

Re: [osg-users] How to add shadows to deferred shading?

2013-10-27 Thread michael kapelko
t if we could get your work into the OSG as > an example of deferred rendering/shadowing using GLSL. > > Regards > Paul > > > On 27/10/13 23:09, michael kapelko wrote: > > I decided to simply use more suitable geometry for shadows. > The result: http://youtu.be/-63

Re: [osg-users] How to add shadows to deferred shading?

2013-10-27 Thread michael kapelko
I decided to simply use more suitable geometry for shadows. The result: http://youtu.be/-63E6SKsMo0 2013/10/27 michael kapelko > Hi. > I finally came up with the way to use OSG shadows in deferred shading. > Since ShadowedScene produces the result in Screen space (same as other > G

Re: [osg-users] How to add shadows to deferred shading?

2013-10-27 Thread michael kapelko
incorrectly shadowed walls, I think I should not simply multiply shadow color with diffuse one, but instead check brightness and only multiply if it's high enough. Thanks. 2013/10/25 michael kapelko > Hi. > I've decided to try to take shadow map from osgShadow::ShadowMap. I've &g

Re: [osg-users] How to add shadows to deferred shading?

2013-10-25 Thread michael kapelko
the texture is still white. What am I doing wrong? Thanks. 2013/10/21 michael kapelko > Hi. > Can the third bug be related to different view projection matrices? My > shadow camera uses ortho. > Thanks. > > > 2013/10/21 Marcel Pursche > >> Hi, >> >> the

Re: [osg-users] How to add shadows to deferred shading?

2013-10-21 Thread michael kapelko
Hi. Can the third bug be related to different view projection matrices? My shadow camera uses ortho. Thanks. 2013/10/21 Marcel Pursche > Hi, > > the shadow on the wall is probably created, because the wall is outside of > the shadow cameras view frustum. How do you setup the wrapping of your >

Re: [osg-users] How to add shadows to deferred shading?

2013-10-21 Thread michael kapelko
wall; * there's a strange stain at toruses' bottom which is altered by the main camera; * the shadow, as seen under the lowest torus, is altered by the main camera, too. What am I doing wrong? Thanks. 2013/10/21 Robert Osfield > HI Michael, > > On 21 October 2013 03:30, michael

Re: [osg-users] axis rotation

2013-10-20 Thread michael kapelko
Hi. Do you mean something like this: https://sites.google.com/site/alexvaqp/tutb001.jpg ? 2013/10/21 Айдар Ильдарович > Hi! > Help me, please. > How to paint center rotation (axis) in osg scene? > > Thanks. > > ___ > osg-users mailing list > osg-users

Re: [osg-users] How to add shadows to deferred shading?

2013-10-20 Thread michael kapelko
Hi. Why is it the other way around? I use osg::Matrixf everywhere. I've made a simple color value converter that generates different colors for different ranges of values and then converts screenshot colors back to values. I've used it to find out the values of shadowTexCoord.z when shadowViewProj

Re: [osg-users] How to add shadows to deferred shading?

2013-10-20 Thread michael kapelko
Hm, I tried View * Projection and Projection * View. Both produce the same result! Why? 2013/10/20 michael kapelko > Hi. > I don't get the VP matrix = View * Projection matrices. Shouldn't it be > vice versa? > E.g., here: > http://www.swiftless.com/tutorials/opengl4

Re: [osg-users] How to add shadows to deferred shading?

2013-10-20 Thread michael kapelko
Hi. I don't get the VP matrix = View * Projection matrices. Shouldn't it be vice versa? E.g., here: http://www.swiftless.com/tutorials/opengl4/3-opengl-4-matrices.html MVP is P * V * M, not vice versa. Thanks. 2013/10/17 Marcel Pursche > Hi, > > it is a bit complex to explain in detail how the

Re: [osg-users] How to add shadows to deferred shading?

2013-10-15 Thread michael kapelko
rking. Thanks. 2013/10/14 michael kapelko > I've decided to assign colors to different shadowTexCoord.z values. > That's my final pass fragment shader now: http://goo.gl/n6FrVB > Turns out shadowTexCoord.z is in the range (-51.85;-50.80) for the scene > for some reason. > A

Re: [osg-users] How to add shadows to deferred shading?

2013-10-13 Thread michael kapelko
TexCoord.z values change when I move main camera. I don't know how to interpret this. Any idea? Thanks. 2013/10/14 michael kapelko > Hi. > My shadow pass fragment shader looks like this: http://goo.gl/R5r7Z1 > So all xyzw contain the depth fragment. I tried .x too. > My current

Re: [osg-users] How to add shadows to deferred shading?

2013-10-13 Thread michael kapelko
Hi. My shadow pass fragment shader looks like this: http://goo.gl/R5r7Z1 So all xyzw contain the depth fragment. I tried .x too. My current problem is in interpreting shadowTexCoord.z The shadow projection matrix setup is: http://goo.gl/ly2u7F Does that mean my shadowTexCoord.z should be in the ran

Re: [osg-users] How to add shadows to deferred shading?

2013-10-13 Thread michael kapelko
Hi. I finally came up with the projected shadow map (not shadows yet): http://youtu.be/geTIxhqT4x4 This is my final pass fragment shader: http://goo.gl/LNtYNh It's simply the projected shadow map for each fragment. Although, when I output shadowTexCoord.z: gl_FragColor = vec4(shadowTexCoord.z / 2

Re: [osg-users] How to add shadows to deferred shading?

2013-10-13 Thread michael kapelko
Hi. Do you mean this: vec4 p_worldspace4 = texture2DRect(posMap, gl_FragCoord.xy); vec4 shadowTexCoord = shadowViewProjection * p_worldspace4; float depth = texture2D(shadowMap, shadowTexCoord.x/2 + 0.5, shadowTexCoord.y/2 + 0.5).z; float visibility = 1.0; if (p_worldspace.z < depth) visibility

Re: [osg-users] How to add shadows to deferred shading?

2013-10-12 Thread michael kapelko
Hi. I've been thinking some more about my misplaced shadows, and I finally came to realize that the fragment shaders of the first pass (that fill G-buffers) produce fragments in Screen space, not in World space, and thus all G-buffers contain Screen space fragments. That's why shadow Screen space i

Re: [osg-users] How to add shadows to deferred shading?

2013-10-11 Thread michael kapelko
Additional questions: 1) Why shadowPassCamera->setClearColor(osg::Vec4f(1000.0f, 0.0f, 0.0f, 1.0f))? 2) Why length() in all the shadow related shader code? 2013/10/12 michael kapelko > Thanks for the example. I've forked it and playing with it now to find out > the difference.

Re: [osg-users] How to add shadows to deferred shading?

2013-10-11 Thread michael kapelko
Thanks for the example. I've forked it and playing with it now to find out the difference. Why is there only shadow when I use light directions of (0, 0.8, 1), (0, 0.0001, 1), but not when I try (0, 0, 1)? That's the direction I use for my own example. Thanks. 2013/10/11 Marcel Pursche > Hi, >

Re: [osg-users] How to add shadows to deferred shading?

2013-10-11 Thread michael kapelko
e images on the right are clearly not in worldspace. But I really don't get why. 2013/10/11 michael kapelko > (Repeating since I erroneously replied to Sebastian only). > > Thanks. I used osg::Matrixf explicitely, and it doesn't complain anymore. > However, I get misplaced s

Re: [osg-users] How to add shadows to deferred shading?

2013-10-11 Thread michael kapelko
.gl/JRRq6Y 2) 1 pass light camera FS: http://goo.gl/fIYeze 3) 2 pass main camera FS: http://goo.gl/nBdWwr What am I doing wrong? Thanks. 2013/10/11 Sebastian Messerschmidt > Am 11.10.2013 08:39, schrieb michael kapelko: > > Hi. > Thanks for the info. I'm now using sh

Re: [osg-users] How to add shadows to deferred shading?

2013-10-10 Thread michael kapelko
Hi. Thanks for the info. I'm now using shaders to process depth: 1) vertex: http://goo.gl/G9ehmB 2) fragment: http://goo.gl/bAutb1 As you see, I'm trying to output depth texture in world space using 'vmi' (view matrix inverse) which I apply later in the 2nd pass. vmi setup: http://goo.gl/n3A84N How

Re: [osg-users] How to add shadows to deferred shading?

2013-10-10 Thread michael kapelko
Hi. I've fixed the problem with the depth texture display, now it looks like this: http://youtu.be/XMOalXm0KdE I had to use [0; 1] scale for the quad to display DEPTH_BUFFER texture: http://goo.gl/xU9u3u The quad creation function: http://goo.gl/TbGaet However, I don't get why the display of all th

Re: [osg-users] How to add shadows to deferred shading?

2013-10-09 Thread michael kapelko
But is it ok that the whole depth buffer texture is gray no matter how I turn the scene? Shouldn't it be completely white (or black) where there's no scene at all? 2013/10/9 Sebastian Messerschmidt > Am 09.10.2013 10:58, schrieb michael kapelko: > > Hi. > I've a

Re: [osg-users] How to add shadows to deferred shading?

2013-10-09 Thread michael kapelko
e. And when I'm behind it, it's gray again. Here's my: 1) depth texture setup: http://goo.gl/plsc1U 2) RTT camera that writes to the depth texture: http://goo.gl/eYS6pC 3) display of the resulting depth texture: http://goo.gl/N5hUxb What am I doing wrong? Thanks. 2013/10/9 mich

Re: [osg-users] How to add shadows to deferred shading?

2013-10-08 Thread michael kapelko
Hi. Thanks a lot! I totally missed vec4 position when I tried to use only vec3 one with osg_ViewMatrixInverse. 2013/10/8 Marcel Pursche > Hi, > > I don't know if you already found the solution to your problem, but this > is how you can calculate the camera position in worldspace: > > > Code: >

Re: [osg-users] How to add shadows to deferred shading?

2013-10-07 Thread michael kapelko
I've corrected camera position and now it looks better: http://youtu.be/9LUOO9VfFTc with more highlights. Again, thanks for the help. 2013/10/7 michael kapelko > I think this produces (0, 0, 0) too... So turns out camera is always at > (0, 0, 0) in every space? > Or I can't

Re: [osg-users] How to add shadows to deferred shading?

2013-10-07 Thread michael kapelko
I think this produces (0, 0, 0) too... So turns out camera is always at (0, 0, 0) in every space? Or I can't really invert (0, 0, 0) vector? 2013/10/7 michael kapelko > I've changed it to: > > vec3 cameraPos_worldspace = mat3(osg_ViewMatrixInverse) * vec3(0, 0, 0); > &

Re: [osg-users] How to add shadows to deferred shading?

2013-10-07 Thread michael kapelko
I've changed it to: vec3 cameraPos_worldspace = mat3(osg_ViewMatrixInverse) * vec3(0, 0, 0); I hope that's correct now. 2013/10/7 Marcel Pursche > Hi, > > your right, this part of the shader code is wrong. This direction needs to > be calculated: > > Code: > > posDir_worldspace = normalized(c

Re: [osg-users] How to add shadows to deferred shading?

2013-10-07 Thread michael kapelko
Hm. If posDir_worldspace is actually the direction from the vertex to the camera (eye), then may be it's not really in world space, but in camera (eye) space? And all of the 2nd pass FS calculations too? 2013/10/7 Marcel Pursche > Hi, > > your comments are looking good so far. A good name for t

Re: [osg-users] How to add shadows to deferred shading?

2013-10-07 Thread michael kapelko
Thanks for the info. I'll try to do as you suggested. Can anyone please check if my conclusions are correct in the shader comments? The 1st and 2nd pass shaders are right at the top: https://bitbucket.org/kornerr/osg-deferred-shading/src/9a2bb7f2c800f3f3d4632ba4fcc27549aa4b7967/main.cpp?at=default

[osg-users] How to add shadows to deferred shading?

2013-10-04 Thread michael kapelko
Hi. I've been reading Cookbook's chapter 6 describing various visual effects with OSG. However, the g-buffer and deferred shading code were producing wrong results. I took one of the tutorials that I found on the web ( http://steps3d.narod.ru/tutorials/ds-tutorial.html ) starting off from g-buffer

[osg-users] Question about multipass rendering of Cookbook simple water example

2013-09-29 Thread michael kapelko
Hi. I'm having the problem understanding the multipass rendering of the simple water effect as seen in here: https://github.com/xarray/osgRecipes/blob/master/cookbook/chapter6/ch06_08/simple_water.cpp The example contains: * scene (airplane); * RTT camera (renders reversed scene to texture); * wate

[osg-users] Trying to add normal mapping shader to osgShadow::SoftShadowMap

2013-09-24 Thread michael kapelko
Hi. I'm on my way to add normal mapping to SoftShadowMap. As far as I understood, it only uses fragment shader. I started by adding a very simple vertex shader into SoftShadowMap::createShaders(). That's what createShaders() looks like by default: https://bitbucket.org/openscenegraph/osg/src/defau

Re: [osg-users] [ANN] Blog and github repository with OpenSceneGraph Examples

2013-08-27 Thread michael kapelko
Nice! Thanks. 2013/8/27 Marcel Pursche > Hello dear OSG-community, > > I want to present you my new blog Advanced 3D Computer Graphic Tutorials ( > http://3dcgtutorials.blogspot.de/). It could be interesting to some of > you. > Among other topics, there will be some tutorials for OpenSceneGraph

Re: [osg-users] Node visitor pattern

2013-07-30 Thread michael kapelko
012 10:30, michael kapelko wrote: > > Am I understanding correctly that Object::STATIC is a flag that says > > something won't be traversed/updated each frame (based on some > > internal decision), and Object::DYNAMIC says: traverse/update it each > > frame? > >

Re: [osg-users] osg 3.0.1 Windows: GUIEventAdapter.getUnmodifiedKey() always returning 0 ?

2013-06-25 Thread michael kapelko
I used it on both Linux and Windows, and it's NOT always 0. 2013/6/25 Christian Buchner > > I am doing some Qt integration, which might complicate things. > > class OpenGLScene : public QGraphicsScene, public osgViewer::Viewer; > > My osg Viewer is also a QGraphicsScene and displays UI elements

Re: [osg-users] Deprecating vertex indices in osg::Geometry

2013-06-15 Thread michael kapelko
Hi. I'm not sure I follow the discussion, since each post is starting to become a separate article, but I'll try to tell what I think. I don't know the policy on OSG ABI, but if it's to keep ABI compatible between some releases, I would: * add compile flag to select between old and new Geometry (de

Re: [osg-users] Vec{2,3,4}{b,s,i,f,d,ub,us,ui} harmonisation

2013-06-12 Thread michael kapelko
Those implementations are truly ugly. 2013/6/13 Aurelien Albert > Forgotten link from previous message : > > http://devmaster.net/forums/topic/10009-swizzle-operator-in-c/ > > => interesting ideas on how to implement "developper friendly but asm > efficient" swizzle in C++ > > --

Re: [osg-users] questions about frame rate lock(locking FPS)

2013-06-02 Thread michael kapelko
It's logic is simple: it pauses for the necessary period of time to achieve lower FPS. You can easily take the code from run(), it's about 1-2 lines total. 2013/6/3 Kim JongBum > i found > > viewer.setRunMaxFrameRate(20); > > i found that They are only available when using the run() method. > >

Re: [osg-users] osgWindows Example Crashing on Linux

2013-05-28 Thread michael kapelko
he approach. Thanks for the feedback. 2013/5/28 Robert Osfield > Hi Micheal, > > On 27 May 2013 17:39, michael kapelko wrote: > > I've stripped down my OSG app to the attached archive. Upon exit there's > > some threading error, not real crash. But when I ma

Re: [osg-users] osgWindows Example Crashing on Linux

2013-05-27 Thread michael kapelko
I've stripped down my OSG app to the attached archive. Upon exit there's some threading error, not real crash. But when I make my mCamera reference-count-controlled by osg::ref_ptr my app crashes. So may be I'm having my threading exit hanging due to not using osg::ref_ptr. 2013/5/27 Robert Osfiel

Re: [osg-users] osgWindows Example Crashing on Linux

2013-05-27 Thread michael kapelko
Not sure if it's the same issue, but I experienced constant reproducible crashes with my OSG program at the time of exit until I added the call stopThreading() at the end. 2013/5/27 Robert Osfield > Hi Abhishek, > > On 27 May 2013 06:59, Abhishek Bansal wrote: > > So I tried with > > > > viewer

[osg-users] [OT] Is it legal to collect video card information?

2013-05-24 Thread michael kapelko
Hi. Sorry for off-topic question, but I'm curious if it's legal to collect user video card information like GL_VENDOR, GL_MAX_TEXTURE_UNITS and such to create some possibly public DB with very detailed info about various video cards for the purpose of video settings autoselection in games? Thanks.

Re: [osg-users] osg Notification

2013-05-24 Thread michael kapelko
http://lmgtfy.com/?q=__FUNCTION__ 2013/5/24 Sajjadul Islam > Hi forum, > > I am going through a source of a plugin and they have mentioned something > as follows: > > > Code: > > . > . > osg::notify(osg::WARN) > << __FUNCTION__ << ": osg::Grap

Re: [osg-users] How to apply textures to a model in openscenegraph?

2013-05-23 Thread michael kapelko
Totally agree on the OSG books. They are must-read. 2013/5/23 Sergey Kurdakov > Hi Lokesh > > in http://www.packtpub.com/openscenegraph-3-0-beginners-guide/book on > support tab for the page of the book you may download sample code, > > in \2824_12_Code\2824_12_Code folder from download zip the

Re: [osg-users] Configure failure on OSX 10.8.3 - OSG_OSX_SDK_NAME

2013-05-05 Thread michael kapelko
Hi. Have you specified "Xcode" generator for CMake? 2013/5/5 Eduardo Poyart > Hi, > > I have a configure failure on OSX 10.8.3: > > - > (...) > -- Found TIFF: /opt/local/lib/libtiff.dylib (found version "4.0.3") > CMake Error at CMakeModules/Fi

Re: [osg-users] OSG Architecture

2013-05-02 Thread michael kapelko
Hi. Simply add your Sofa to Room as a child, and that's it. 2013/5/3 Sujan Dasmahapatra > I am newbie OSG user. Please help understanding my concept. I create a > Geode node called 'Room'. Can we have another Geode node called 'Sofa' > derived from 'Room' so that when I rotate 'Room' my 'Sofa'

Re: [osg-users] Shadowed scene distortion after 3rd window recreation

2013-04-22 Thread michael kapelko
I've found out that the glitches are fixed by simply recreating ShadowTechnique (SoftShadowMap). If anyone is interested, here's the working example: https://dl.dropboxusercontent.com/u/12634473/osg/osg_recreate_window_fixed.tar.bz2 2013/4/21 michael kapelko > For those who on

Re: [osg-users] Shadowed scene distortion after 3rd window recreation

2013-04-21 Thread michael kapelko
For those who only read forum, here's the link to the full source code: https://dl.dropboxusercontent.com/u/12634473/osg/osg_recreate_window.tar.bz2 2013/4/20 michael kapelko > Hi. > I'm implementing video settings change (and thus window recreation) in my > game with

[osg-users] Shadowed scene distortion after 3rd window recreation

2013-04-20 Thread michael kapelko
Hi. I'm implementing video settings change (and thus window recreation) in my game without game restart. I experience graphics glitches after re-running Viewer 3rd time: http://youtu.be/xOgTjENn2MM I recreate the window the following way: * Stop the viewer, stop threading. * Create new graphics co

Re: [osg-users] How does computeIntersections() work?

2013-04-11 Thread michael kapelko
Hi. By the time you waited you could have already looked at the sources and asked for the moments you didn't understand. 2013/4/12 hornuda > Any Ideas? > > Hello, >> >> I sucessfully used view->computeIntersections(..) to select a Drawable in >> a osg scene. >> But how does it work? >> Can some

[osg-users] What's the progress of osgPango?

2013-04-03 Thread michael kapelko
Hi. I've been researching Cairo / Pango for GUI use with OSG, and googled this up: http://forum.openscenegraph.org/viewtopic.php?t=6394 The osgPango page ( http://code.google.com/p/osgpango/ ) says: Screenshots COMING BACK SOON (August, 2012) I wonder how's osgPango doing? Thanks. __

Re: [osg-users] GPS-like map

2013-02-20 Thread michael kapelko
OT. As a player of GTA 4 and Mafia 2 I hated GPS very much, because it prevented me from feeling the game, I was always like a blind man in there having to look at GPS. I turned it off in GTA 4, but Mafia 2 had no such ability. If you're making a game I would advise to make GPS optional. 2013/2/20

Re: [osg-users] How to use texture atlases in OSG?

2013-02-14 Thread michael kapelko
u aren't CPU or > GPU batch limited then using a texture atlas will help very little. > > Robert. > > On 14 February 2013 09:23, michael kapelko wrote: > > Hi. > > I want to be able to have to specify several textures which will be > mapped > > using the same

[osg-users] How to use texture atlases in OSG?

2013-02-14 Thread michael kapelko
Hi. I want to be able to have to specify several textures which will be mapped using the same UV, a collection of textures. I want to put them into a single file, texture atlas. I've grepped OSG examples on 'tlas' word. Didn't find any example. I've googled for OSG atlas and only found osgUtil::Opt

Re: [osg-users] Is there a way to remove certain nodes and images from cache?

2013-02-12 Thread michael kapelko
Looks like osgDB::Registry::removeFromObjectCache does it. 2013/2/12 michael kapelko > Hi. > osgDB::readNodeFile and osgDB::readImageFile have Options which can > specify to CACHE_NODES and CACHE_IMAGES. > I want to be able to unload/clear/erase certain nodes and images from

[osg-users] Is there a way to remove certain nodes and images from cache?

2013-02-11 Thread michael kapelko
Hi. osgDB::readNodeFile and osgDB::readImageFile have Options which can specify to CACHE_NODES and CACHE_IMAGES. I want to be able to unload/clear/erase certain nodes and images from the cache (changing game level, etc). Is it possible? Thanks. ___ osg-us

[osg-users] Picking child node results in parent node returned first

2013-01-18 Thread michael kapelko
Hi. I'm trying to pick a child node of another node. Here's the example source code: https://dl.dropbox.com/u/12634473/osg/osg_pick.tar.bz2 Here's the log of running it: http://pastie.org/5715829 First, you can see my scene structer. And then goes 2 clicks: 1) I click cessna and MatrixTransfor

[osg-users] How to get node rotation in world coordinates?

2013-01-10 Thread michael kapelko
Hi. I have one PAT node as child of another one. I've implemented retrieval of its position in world coordinates this way: node->getPosition() * osg::computeLocalToWorld(node->getParentalNodePaths()[0]) This works fine. I've tried the same for rotation: node->getAttitude() * osg::computeLocalTo

[osg-users] Is there a way to subscribe to matrixtransform position/rotation changes?

2012-12-24 Thread michael kapelko
Hi. I have a class that encapsulates osg::MatrixTransform. I want it to update its internal position/rotation values when encapsulated osg::MatrixTransform is updated. Is there a way to achieve it? Thanks. ___ osg-users mailing list osg-users@lists.opensc

[osg-users] How to set mouse position

2012-12-20 Thread michael kapelko
Hi. Can anyone tell me how to set mouse position in OSG? I tried to google it up without any success. Thanks. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Re: [osg-users] Tutorials

2012-12-05 Thread michael kapelko
I personally read Wang Rui books and recommend those (found in the first link). 2012/12/6 Peterakos > Hello > > Here are the books + quick guide: > http://www.openscenegraph.com/index.php/documentation/books > > And you can also download the source code of many examples using svn: > http://www.o

Re: [osg-users] What units does Quat::makeRotate accept?

2012-12-04 Thread michael kapelko
Damn it. I only used DegreesToRadians in std::cout, not in actual makeRotate call! Thanks! :) 2012/12/5 michael kapelko > I apply it on key presses only. > > I have code like that on key press: > > static float angle = 0; > angle += 0.1; > quat->makeRotate(angle, Vec3(

Re: [osg-users] What units does Quat::makeRotate accept?

2012-12-04 Thread michael kapelko
I apply it on key presses only. I have code like that on key press: static float angle = 0; angle += 0.1; quat->makeRotate(angle, Vec3(1, 0, 0)); 2012/12/5 Ulrich Hertlein > On 5/12/12 15:36, michael kapelko wrote: > > Hi. I can't understand what units (degrees? radians?)

[osg-users] What units does Quat::makeRotate accept?

2012-12-04 Thread michael kapelko
Hi. I can't understand what units (degrees? radians?) Quat::makeRotate accepts. I tried to pass degrees, and it wasn't it (with small angle increase there was large rotation). I tried to pass radians with the help of DegreesToRadians, and then it's not it, too (when angle was going from 1 to 14, th

[osg-users] What part of osgViewer listens to window resize events?

2012-11-28 Thread michael kapelko
Hi. My osgViewer::Viewer only has my custom handler attached (getEventHandlers() call returns only mine) which does nothing about resize, but somehow the window is still resizeable with the mouse. Can anyone tell me what part of osgViewer does it? Thanks. __

[osg-users] How to invert mouse so that Y goes 0 to N from top to bottom?

2012-11-28 Thread michael kapelko
Hi. osgViewer reports mouse Y at the bottom of the windows as 0, and as N at the top. I want Y of the mouse to start at the top, not bottom. I tried to call Viewer->getEventQueue()->getCurrentEventState()->setMouseYOrientation(osgGA::GUIEventAdapter::Y_INCREASING_UPWARDS) and DOWNWARDS, but it d

Re: [osg-users] How to remove or reduce shivering in soft shadow map?

2012-11-22 Thread michael kapelko
Hi. It turned out the problem was in setting receive/cast shadow masks. After I removed them from every object in the scene, the soft shadow became very soft and non-shivering. Not sure why. ___ osg-users mailing list osg-users@lists.openscenegraph.org ht

Re: [osg-users] Are shaders not saved during osgDB::writeNodeFile?

2012-11-17 Thread michael kapelko
Any idea what's wrong with my code, then? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Re: [osg-users] Ideas about a resource system, and deferred rendering framework

2012-11-16 Thread michael kapelko
What's the progress on this? And is there any open repository? 2012/9/17 Jeremy Moles > On Tue, 2012-09-11 at 10:54 +0800, Wang Rui wrote: > > Hi Jeremy, > > > > Thanks for the tests and feedback. I'm focusing on creating a material > > system which may be a little similar to the Ogre one but w

[osg-users] Are shaders not saved during osgDB::writeNodeFile?

2012-11-16 Thread michael kapelko
Hi. I've attached custom shader for a node in a ShadowedScene. I then called osgDB::writeNodeFile upon it and found out that it doesn't save those shaders into osg file. Is it so by design or am I doing it wrong? PS: Source code: http://pastie.org/5390724 Source code archive: https://dl.dropbox.co

[osg-users] Cannot set custom shader for a node

2012-11-16 Thread michael kapelko
Hi. I'm using SoftShadowMap scene and I want to assign custom shader to one of the nodes, but it doesn't work. I do it like that: osg::ref_ptr frag = new osg::Shader(osg::Shader::FRAGMENT, code); osg::StateSet *ss = box->getOrCreateStateSet(); osg::ShaderAttribute *sa = new osg::ShaderAttribute;

[osg-users] Positioning the camera

2012-11-15 Thread michael kapelko
Hi. I have default viewer without any special manipulator specified. I try to setViewMatrix for camera to position it, but it doesn't work. Code: http://pastie.org/5382807 It needs to be run from Data directory. Am I doing it wrong? ___ osg-users mailing

[osg-users] How to remove or reduce shivering in soft shadow map?

2012-11-13 Thread michael kapelko
Hi. I'm using SoftShadowMap. I've tried to change jittering scale, but couldn't get rid of shivering/moving of shadow with it. Here's the video that depicts the shivering: https://dl.dropbox.com/u/12634473/ssmjittering.ogv Is there any way to remove that shivering, or at least reduce it? Thanks. __

[osg-users] How to combine soft shadow mapping with normal mapping (and possibly other techs)?

2012-11-12 Thread michael kapelko
Hi. I know OSG has built-in soft shadow mapping, but I'm not sure if it has normal mapping. I only know how to implement normal mapping in GLSL, but not how to combine built-in OSG soft shadow mapping with custom normal mapping shader. Please tell me how to do it. Thanks. __

Re: [osg-users] Open Asset Import Library

2012-10-25 Thread michael kapelko
I've just tried to load Collada object with materials with the help of your assimp plugin, and it worked fine. However, blend files created with Blender 2.64 didn't produce any visual output. So it turns out assimp isn't the holy grail :| ___ osg-users ma

Re: [osg-users] Can we add Viewer::setSkipCloseWindowEvent to prevent Window from being closed upon receiving CLOSE_WINDOW?

2012-10-25 Thread michael kapelko
Well, something like Alt-F4 is very-very intuitive, so forbidding it will increase the number of angry people :) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Re: [osg-users] Open Asset Import Library

2012-10-25 Thread michael kapelko
For the same *object. Sorry. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Re: [osg-users] Open Asset Import Library

2012-10-25 Thread michael kapelko
Wang Rui, I research what format best to use for moving objects from Blender to OSG, and I see Assimp claiming to load Blender files directly. Since you said you wrote the plug-in already for it, I'd like to try it out. I have a follow up question: can I possibly differentiate Blender model from Bl

Re: [osg-users] Can we add Viewer::setSkipCloseWindowEvent to prevent Window from being closed upon receiving CLOSE_WINDOW?

2012-10-25 Thread michael kapelko
Should I create the patch for the functionality? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

[osg-users] Forum not working

2012-10-25 Thread michael kapelko
Hi. I get the following error when try to access the forum: phpBB : Critical Error Could not connect to the database ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

[osg-users] Can OSG store materials externally for an object?

2012-10-20 Thread michael kapelko
Hi. Does OSG have some sort of material files that can be applied to the same mesh? So far I've looked into osgt files and they store both mesh and material inside one file. Thanks. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://list

[osg-users] Can we add Viewer::setSkipCloseWindowEvent to prevent Window from being closed upon receiving CLOSE_WINDOW?

2012-10-19 Thread michael kapelko
Hi. I've looked at the code (OSG 3.0.1) of Viewer::eventTraversal and noticed that it checks for CLOSE_WINDOW event and closes the window, so there's no way to prevent the window from closing. I've googled for window close prevention with no luck, too. Can we add something like Viewer::setSkipClose

Re: [osg-users] Cyrillic (russian) in Qt inside OSG

2012-10-09 Thread michael kapelko
E.g., I've had problems with Qt (not OSG) with UTF-8 russian text. I recall there were some problems with QTextCodec as well. So more context is required. And test case would be the best. ___ osg-users mailing list osg-users@lists.openscenegraph.org http:

Re: [osg-users] Cyrillic (russian) in Qt inside OSG

2012-10-09 Thread michael kapelko
Can you provide some simple test case of what you want (which anyone can 'make')? It's hard to conclude anything from what you've posted. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-

Re: [osg-users] Cyrillic (russian) in Qt inside OSG

2012-10-09 Thread michael kapelko
Have you tried const char* (string) and UTF-8 instead of wide ones? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Re: [osg-users] [ANN] osgRecipes: Integrate OSG with almost everything, the second wave

2012-09-14 Thread michael kapelko
Hikari is Windows only: http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Comparison+of+GUIs&structure=Libraries ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Re: [osg-users] [ANN] osgRecipes: Integrate OSG with almost everything, the second wave

2012-09-11 Thread michael kapelko
I've just recalled that there also exist gameswf project which allows for Flash UI inside games. http://tulrich.com/textweb.pl?path=geekstuff/gameswf.txt Would be nice to see this one integrated. Would make a lot of hype with some easy flash demos :P ___

Re: [osg-users] [ANN] osgRecipes: Integrate OSG with almost everything, the second wave

2012-08-26 Thread michael kapelko
I thought it's bound to dtEntity, that's why I was requesting. If it can be used for any OSG project, then great! ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Re: [osg-users] [ANN] osgRecipes: Integrate OSG with almost everything, the second wave

2012-08-23 Thread michael kapelko
Good work! I'm not sure if I voted for libRocket, so here it is. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

<    1   2   3   4   >