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

2013-10-21 Thread Robert Osfield
HI Michael, On 21 October 2013 03:30, michael kapelko korn...@gmail.com wrote: Hi. Why is it the other way around? History :-) The OSG uses row major because it was the predominant convention used at the time of the OSG's inception, row major has the advantage that one doesn't need to

[osg-users] problem about sequence of intersection points using osgUtil::PlaneIntersector

2013-10-21 Thread Tianyun Su
Hi, I am trying to get the intersection points between an intersection plane and a terrain using osgUtil::PlaneIntersector。 The code is listed as following: osg::Plane planeLeft( osg::Vec3(1,0,0), osg::Vec3(0+1,0,0) );//define an intersetion plane osg::Polytope polytopeLeft;//define the range of

Re: [osg-users] problem about sequence of intersection points using osgUtil::PlaneIntersector

2013-10-21 Thread Robert Osfield
Hi Tianyun, The sequence that the points are joined up in will depend upon the algorithm which stitches all the triangle intersection segments together, it's objective is to stick things together not sort things into an order governed by the user - it's a complicated enough task that adding extra

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

2013-10-21 Thread michael kapelko
Hi. I see. After I made shadowViewProjectionMatrix = V * P * translate(1, 1, 1) * scale(0.5, 0.5, 0.5) I finally got almost correct shadows: http://youtu.be/8KOCxiUkNsQ The final fragment shader is: http://goo.gl/cSYYfN Although, there are 3 problems: * there's wrong shadow at the left wall; *

Re: [osg-users] problem about sequence of intersection points using osgUtil::PlaneIntersector

2013-10-21 Thread Tianyun Su
Hi Robert, As you suggested, I am ordering the sequence of intersection points with extra code after intersecting operation. But, I am wondering which operation of my program affects the algorithm stitching all the triangle intersection segments together and generate different order of

[osg-users] deferred shading in osg explained

2013-10-21 Thread Trajce Nikolov NICK
Hi Community, is there some materials on this topic available somewhere? I know Wang Rui pointed to some code in osgRecipes for this, I am more into books, papers etc. Thanks, Nick -- trajce nikolov nick ___ osg-users mailing list

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

2013-10-21 Thread 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 depth texture? You could fix it, if you set the mode to clamp to border and set the border color to your far plane. This way everything that

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] [3rdparty] OSG EXPORTER for 3DS MAX - Y-up

2013-10-21 Thread Tim Larson
We are using Version 1.1.0, installed from here: http://sourceforge.net/projects/osgmaxexp/files/OpenSceneGraph%20Max%20Exporter/1.1.0/ Tim -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56913#56913

Re: [osg-users] [3rdparty] OSG EXPORTER for 3DS MAX - Y-up

2013-10-21 Thread Farshid Lashkari
Hi Tim, That exporter should behave correctly, meaning it should export the model in OSGs Z-up coordinate system. Which version were you previously using that exported as Y-up? Cheers, Farshid On Mon, Oct 21, 2013 at 7:31 AM, Tim Larson tlar...@hunter.com wrote: We are using Version 1.1.0,