Re: [osg-users] Simulating Light Lobes with Projected Textures (Range mapping)

2016-08-12 Thread Trajce Nikolov NICK
nevermind .. I was not able to make it through the construction of the
texture matrix but made it in the shader.

Nickolai, suddenly can not share the code due to contractual obligations
but can give some hints

Thanks anyway
Nick

On Fri, Aug 12, 2016 at 2:59 PM, Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Maybe I made it a bit confusing.
>
> My problem is the clipping of the projected texture based on some near/far
> distances and the ones specified in the projection matrix have no effect
>
> On Fri, Aug 12, 2016 at 11:14 AM, Nickolai Medvedev 
> wrote:
>
>> Hello, Trajce!
>>
>> As far as I have understood, a problem with near/far?
>> Try to increase them.
>>
>> By the way, I will be glad to see shaders, publish them, please.
>>
>> Thank you!
>>
>> Cheers,
>> Nickolai
>>
>> --
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=68358#68358
>>
>>
>>
>>
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
>
> --
> trajce nikolov nick
>



-- 
trajce nikolov nick
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Simulating Light Lobes with Projected Textures (Range mapping)

2016-08-12 Thread Trajce Nikolov NICK
Maybe I made it a bit confusing.

My problem is the clipping of the projected texture based on some near/far
distances and the ones specified in the projection matrix have no effect

On Fri, Aug 12, 2016 at 11:14 AM, Nickolai Medvedev 
wrote:

> Hello, Trajce!
>
> As far as I have understood, a problem with near/far?
> Try to increase them.
>
> By the way, I will be glad to see shaders, publish them, please.
>
> Thank you!
>
> Cheers,
> Nickolai
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=68358#68358
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
trajce nikolov nick
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Simulating Light Lobes with Projected Textures (Range mapping)

2016-08-12 Thread Nickolai Medvedev
Hello, Trajce!

As far as I have understood, a problem with near/far?
Try to increase them.

By the way, I will be glad to see shaders, publish them, please.

Thank you!

Cheers,
Nickolai

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68358#68358





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Simulating Light Lobes with Projected Textures (Range mapping)

2016-08-11 Thread Trajce Nikolov NICK
Hi Community,

I have F+ lighting system and I am about to "integrate" projected textures
to act as lights instead of the original physics based lighting. I have
managed to have the projected textures to work nicely and the only thing
left is light (the projected texture) attenuation to fully simulate lights.

The shaders are very simple ( I can post them here if needed ). The thing
that hurts my head is the construction of the texture matrix - I am
updating it via  uniform update callback where the computation is done, it
is something like:

osg::Matrixf m = osg::Matrixf::inverse(worldMatrix) * viewMatrix *
osg::Matrixf::perspective(120, 1.0, 0.001, 10);

For reasons I guess the far/near planes are not being taken into account,
if that is the way of how this texture matrix calculus should work

Anyway, I am struggling with this and will appreciate any hints or insights

Thanks a bunch as always!

Cheers,
Nick

-- 
trajce nikolov nick
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org