Re: [osg-users] lightmap generated from lightcone geometry

2013-04-04 Thread Sergey Polischuk
Hi

you can do this in a way similar to shadows
for this you can use prebaked texture of light cone shape in section 
perpendicular to axis
knowing cone angle and position you can set up transformation matrix to 
calculate texture coords to mentioned prebaked light spot texture (kind of 
projective texturing) when drawing geometry

i dont know if it is doable with osg::TexMat, osg::TexGen and fixed pipeline 
blending, but surely doable with shaders and uniforms

Cheers.

02.04.2013, 09:59, Daniel Schmid daniel.sch...@swiss-simtec.ch:
 Hi all

 I have a number of modeled lightcones that simulate the illumination area of 
 spotlights in my scene. These lightcones allow me to render lightshafts very 
 nicely.

 Now I want to render the impact of the light on the lit geometry, known as 
 lightmap. imagine a street lamp and the floor area beeing lit.

 I couldn't find any good documentation about rendering lightmaps. An 
 important note, some lights may move, so rendering is on a per frame basis, 
 no pre-baked lightmap.

 Anybody has some more experience?

 Thank you!

 Cheers,
 Daniel

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

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


Re: [osg-users] lightmap generated from lightcone geometry

2013-04-04 Thread Trajce Nikolov NICK
You can also do it in shaders so you get real lighting but then you are
limited (ehm ... well, there are papers for this to have it done proper) to
8 lights I think. Ping me on email, I can send you some sample shaders for
cone lighting or how you call it

Nick


On Thu, Apr 4, 2013 at 2:04 PM, Sergey Polischuk pol...@yandex.ru wrote:

 Hi

 you can do this in a way similar to shadows
 for this you can use prebaked texture of light cone shape in section
 perpendicular to axis
 knowing cone angle and position you can set up transformation matrix to
 calculate texture coords to mentioned prebaked light spot texture (kind of
 projective texturing) when drawing geometry

 i dont know if it is doable with osg::TexMat, osg::TexGen and fixed
 pipeline blending, but surely doable with shaders and uniforms

 Cheers.

 02.04.2013, 09:59, Daniel Schmid daniel.sch...@swiss-simtec.ch:
  Hi all
 
  I have a number of modeled lightcones that simulate the illumination
 area of spotlights in my scene. These lightcones allow me to render
 lightshafts very nicely.
 
  Now I want to render the impact of the light on the lit geometry, known
 as lightmap. imagine a street lamp and the floor area beeing lit.
 
  I couldn't find any good documentation about rendering lightmaps. An
 important note, some lights may move, so rendering is on a per frame basis,
 no pre-baked lightmap.
 
  Anybody has some more experience?
 
  Thank you!
 
  Cheers,
  Daniel
 
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=53406#53406
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 ___
 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


[osg-users] lightmap generated from lightcone geometry

2013-04-01 Thread Daniel Schmid
Hi all

I have a number of modeled lightcones that simulate the illumination area of 
spotlights in my scene. These lightcones allow me to render lightshafts very 
nicely.

Now I want to render the impact of the light on the lit geometry, known as 
lightmap. imagine a street lamp and the floor area beeing lit.

I couldn't find any good documentation about rendering lightmaps. An important 
note, some lights may move, so rendering is on a per frame basis, no pre-baked 
lightmap.

Anybody has some more experience?

Thank you!

Cheers,
Daniel

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





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