[osg-users] Animating Textures
sam
brkopac at gmail.com
Thu Aug 27 15:59:06 PDT 2015
Hi Laurens,
I created a osg::StateSetCallback that took a osg::TexMat in the ctor and a
delay variable. In the operator () I do a check to see if the delay has
occurred and then I do a texMax->setMatrix with some incrementing
variables. I then attach the callback to the geometries stateset.
Thanks, Sam
On Thu, Aug 27, 2015 at 12:48 AM, Voerman, L. <l.voerman at rug.nl> wrote:
> Hi Sam,
> I once solved this with an sequence of textureMatices, (example attached).
> Wat solution did you find?
> Regards, Laurens.
>
> On Thu, Aug 27, 2015 at 12:12 AM, sam <brkopac at gmail.com> wrote:
>
>> Nevermind! As always, simply searching OSG popped up what I needed.
>> Thanks!
>>
>> On Wed, Aug 26, 2015 at 3:10 PM, sam <brkopac at gmail.com> wrote:
>>
>>> I can appreciate your stance on going to shaders, and I completely
>>> agree. I'd like to quickly prototype this up and swapping to shaders will,
>>> unfortunately, take me a little bit. Is there an example of modifying the
>>> texture matrix? Also would I be better of attaching an update callback to
>>> the state set itself?
>>>
>>> Thanks, Sam
>>>
>>> On Wed, Aug 26, 2015 at 3:04 PM, Sebastian Messerschmidt <
>>> sebastian.messerschmidt at gmx.de> wrote:
>>>
>>>> As always I'd suggest shaders, as fixed function pipeline has been
>>>> deprecated 10 years ago ;-)
>>>> You could use the osg_SimulationTime uniform to modify the
>>>> uv-coordinates based on the time passed.
>>>> Else you will need to modify the texture matrix each frame (like in the
>>>> suggested callback)
>>>>
>>>> Cheers
>>>> Sebastian
>>>>
>>>> Hi All,
>>>>
>>>> I have individual nodes that have textures on them that animate; That's
>>>> to say the texture moves not the actual mesh. I've been trying to figure
>>>> out how to accomplish this in OSG. Is there a way to define a texture
>>>> matrix that does movement? The only other way I can think of is
>>>> manipulating the UV coordinates in an update callback.
>>>>
>>>> Thanks, Sam
>>>>
>>>>
>>>> _______________________________________________
>>>> osg-users mailing listosg-users at lists.openscenegraph.orghttp://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
>>>>
>>>>
>>>
>>
>> _______________________________________________
>> 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/20150827/683165d2/attachment-0002.htm>
More information about the osg-users
mailing list