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

2013-11-07 Thread michael kapelko
. 2013/11/7 Sebastian Messerschmidt sebastian.messerschm...@gmx.de Am 07.11.2013 12:55, schrieb michael kapelko: Hi, Sebastian. So you compose one shader per object? No, one program per define-set (e.g. #define NORMAL_MAPPING,#define PARALLAX_MAPPING, ...) The idea is not to compose

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

2013-10-31 Thread michael kapelko
are merged. At present I haven't had a better idea about this problem. :-) Wang Rui 2013/10/30 michael kapelko korn...@gmail.com Hi. I've recently implemented deferred shading with normal mapping and shadow mapping using EffectCompositor, but it has effect on the whole scene

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 korn...@gmail.com Hi. Thanks. I'm

[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. ___

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

2013-10-27 Thread michael kapelko
at the 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 korn...@gmail.com Hi. I've decided to try to take shadow map from osgShadow::ShadowMap. I've derived

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 korn...@gmail.com 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

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

2013-10-27 Thread michael kapelko
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/-63E6SKsMo0 2013/10/27 michael kapelko korn

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

2013-10-25 Thread michael kapelko
is still white. What am I doing wrong? Thanks. 2013/10/21 michael kapelko korn...@gmail.com Hi. Can the third bug be related to different view projection matrices? My shadow camera uses ortho. Thanks. 2013/10/21 Marcel Pursche marcel.purs...@student.hpi.uni-potsdam.de Hi, the shadow

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

2013-10-21 Thread michael kapelko
; * 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 robert.osfi...@gmail.com HI Michael, On 21 October 2013 03:30, michael

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 marcel.purs...@student.hpi.uni-potsdam.de Hi, the shadow on the wall is probably created, because the wall is outside of the shadow cameras view frustum.

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 marcel.purs...@student.hpi.uni-potsdam.de Hi, it is a

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 korn...@gmail.com 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

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

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 Айдар Ильдарович e...@inbox.ru Hi! Help me, please. How to paint center rotation (axis) in osg scene? Thanks. ___ osg-users mailing list

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

2013-10-15 Thread michael kapelko
. Thanks. 2013/10/14 michael kapelko korn...@gmail.com 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. And, as you see from

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-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 /

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

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

2013-10-13 Thread michael kapelko
values change when I move main camera. I don't know how to interpret this. Any idea? Thanks. 2013/10/14 michael kapelko korn...@gmail.com 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

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

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

2013-10-11 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

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

2013-10-11 Thread michael kapelko
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 sebastian.messerschm...@gmx.de Am 11.10.2013 08:39, schrieb michael kapelko: Hi. Thanks for the info. I'm now using shaders

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

2013-10-11 Thread michael kapelko
on the right are clearly not in worldspace. But I really don't get why. 2013/10/11 michael kapelko korn...@gmail.com (Repeating since I erroneously replied to Sebastian only). Thanks. I used osg::Matrixf explicitely, and it doesn't complain anymore. However, I get misplaced shadows now, they're always

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

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 korn...@gmail.com 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-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

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

2013-10-09 Thread michael kapelko
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 michael kapelko korn...@gmail.com

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 sebastian.messerschm...@gmx.de Am 09.10.2013 10:58, schrieb michael kapelko: Hi. I've

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 marcel.purs...@student.hpi.uni-potsdam.de Hi, I don't know if you already found the solution to your problem, but this is how you can calculate the camera

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:

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 marcel.purs...@student.hpi.uni-potsdam.de Hi, your comments are

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 marcel.purs...@student.hpi.uni-potsdam.de Hi, your right, this part of the shader code is wrong. This direction needs to be calculated: Code:

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 korn...@gmail.com I've changed it to: vec3 cameraPos_worldspace = mat3(osg_ViewMatrixInverse) * vec3(0, 0, 0); I hope

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 korn...@gmail.com 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

[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); *

[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:

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

2013-08-27 Thread michael kapelko
Nice! Thanks. 2013/8/27 Marcel Pursche marcel.purs...@student.hpi.uni-potsdam.de 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

Re: [osg-users] Node visitor pattern

2013-07-30 Thread michael kapelko
, On 22 June 2012 10:30, michael kapelko korn...@gmail.com 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? DataVariance

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 christian.buch...@gmail.com 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

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

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 aurelien.alb...@alyotech.fr 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 osgfo...@tevs.eu i found viewer.setRunMaxFrameRate(20); i found that They are only available when using the run()

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

2013-05-28 Thread michael kapelko
for the feedback. 2013/5/28 Robert Osfield robert.osfi...@gmail.com Hi Micheal, On 27 May 2013 17:39, michael kapelko korn...@gmail.com 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 make my mCamera reference

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 robert.osfi...@gmail.com Hi Abhishek, On 27 May 2013 06:59, Abhishek Bansal

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

Re: [osg-users] osg Notification

2013-05-24 Thread michael kapelko
http://lmgtfy.com/?q=__FUNCTION__ 2013/5/24 Sajjadul Islam dosto.wa...@gmail.com 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-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?

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 sergey.fo...@gmail.com 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

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 poy...@gmail.com 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

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 sujan.dasmahapa...@gmail.com 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

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 korn...@gmail.com For those who only

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 korn...@gmail.com Hi. I'm implementing video settings change (and thus window recreation) in my game without game

[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

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 horn...@googlemail.com Any Ideas? Hello, I sucessfully used view-computeIntersections(..) to select a Drawable in a osg scene. But how does it work?

[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.

[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

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

2013-02-14 Thread michael kapelko
atlas will help very little. Robert. On 14 February 2013 09:23, michael kapelko korn...@gmail.com wrote: 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

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 korn...@gmail.com 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-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

[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-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] 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 hay...@gmail.com 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:

[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,

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 u.hertl...@sandbox.de On 5/12/12 15:36, michael kapelko wrote: Hi. I can't understand what units (degrees? radians

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 korn...@gmail.com 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

[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

[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.

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

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

[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_ptrosg::Shader frag = new osg::Shader(osg::Shader::FRAGMENT, code); osg::StateSet *ss = box-getOrCreateStateSet(); osg::ShaderAttribute *sa = new

[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:

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 cubic...@gmail.com 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

[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

[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-26 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

[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

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

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

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] 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

[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

[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

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] 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

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

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+GUIsstructure=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] Full screen with resolution change problem, resources lost

2012-08-23 Thread michael kapelko
Thanks for the reply, Robert. What Sergey said was enough in my situation. Thanks for this, Sergey. I was simply quiet not to generate unnecessary thank you post :) ___ osg-users mailing list osg-users@lists.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

Re: [osg-users] Siggraph 2012 OpenSceneGraph BOF articles

2012-08-14 Thread michael kapelko
Dad of the three. Yay. Keep it up! :) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Re: [osg-users] [forum] Site web down

2012-08-09 Thread michael kapelko
May be it's finally time to put an end to its misery? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Re: [osg-users] ESC key: Error: pthread_cond_destroy(, ) returned error status, status = 16

2012-08-04 Thread michael kapelko
Thanks. ViewerBase::setKeyEventSetsDone(0) did help so that Viewer doesn't listen to ESC, but now when I call ViewerBase::setDone(true) myself, Viewer still fails to exit and prints: Error: pthread_cond_destroy(,) returned error status, status = 16 after that, only Ctrl+C helps, because app hangs.

[osg-users] Can we please remove static initializations in OSG?

2012-07-05 Thread michael kapelko
Hi. I'm trying to build OSG into my application. I've started with OSG logging. I've attached sample code that depicts the problem. After you run the program and than stop it by pressing ESC, you can see the following output: $ ./test abc DatabasePager::RequestQueue::~RequestQueue() Destructing

Re: [osg-users] Does OSG have INI config file reader?

2012-06-30 Thread michael kapelko
Well, I don't want to use POCO just for reading INI. I wonder if OSG has one. If not, I'll have to write one myself, it's not that hard, but would be good if OSG has one already. ___ osg-users mailing list osg-users@lists.openscenegraph.org

<    1   2   3   4   >