[osg-users] Caustics for UnderWater Effect by GLSL

Ümit Uzun umituzun84 at gmail.com
Wed Sep 17 05:35:47 PDT 2008


Hi All,

I have researched and decided to create my underwater caustics effect by
GLSL. I have been studying GLSL for a week and grasp the main structure
Shading technique. But when I search the osg mail list and shader samples I
couldn't find using texturing models by GLSL exxamples. So I could't find a
way to create my texture animation on my terrain model.

I haven't coded GLSL so my plan is creating simple shader. In program I get
the frame time and then send it by attribute or uniform variables to the
framegment shader than I decide which texture will use and then texture the
given terrain with it and so on. So I can create animated caustics above the
terrain surface. May be I can create Projective Texturing on the terrain so
the other models on the terrain can effected by this animation.

Any idea, sample, source or advice appreciated with glad.

Thanks so much, Best Regards.

Umit Uzun

2008/9/5 Ümit Uzun <umituzun84 at gmail.com>

> Hi Robert,
>
> Thanks for reply. I am looking for osgTexture3D for create caustics on
> terrain surface with alpha value between 0.0-0.5 When I texture I want to
> see terrain surface with caustics but I can only see textures with different
> state like transparance and opaque version in sliding. What can I do? I mean
> I want to see like multitexture viewing form surface which is combination of
> terrain and textures.
>
> And another simple question which makes me feel shame while asking :( When
> I texture the created 3D model how can I specify TexCoord? Because when I
> texture the model without specification of TexCoord the result like *THAT*<http://img84.imageshack.us/my.php?image=cowbh3.png>.
>
>
> Thanks so much.
> Best Regards.
>
> Umit Uzun
>
> 2008/9/4 Robert Osfield <robert.osfield at gmail.com>
>
> Hi Umit,
>>
>> I'd use a Texture3D to animate through the images (see osgtexture3D
>> for an example), or if you don't need blending ImageSequence would
>> work on a Texture2D (see osgimagesequence for an example).
>> Texture2DArray is also possible, but it's only supported on latest
>> hardwares/drivers.
>>
>> Robert.
>>
>> On Thu, Sep 4, 2008 at 2:50 PM, Ümit Uzun <umituzun84 at gmail.com> wrote:
>> > Hi All,
>> >
>> > I have 30 textures for caustics. I want to make a underwater effect so
>> have
>> > to alpha blend texture to terrain surface which was created with
>> > VirtualPlanetBuilder.
>> >
>> > My question is, how should I animate these textures on the terrain?
>> > Should I read all texture images to the Texture2DArray and then change
>> the
>> > texture images by the time with using NodeCallback?
>> > Is there any sample like that or which osg example would help me much?
>> >
>> > Best Regards.
>> >
>> > Umit UZUN
>> >
>> > _______________________________________________
>> > osg-users mailing list
>> > osg-users at lists.openscenegraph.org
>> >
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>> >
>> >
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080917/2784c255/attachment-0002.htm>


More information about the osg-users mailing list