MaterialX icon indicating copy to clipboard operation
MaterialX copied to clipboard

GLSL ShaderGen: `time_float` and `frame_float` do not have any effect

Open hybridherbst opened this issue 1 year ago • 6 comments

Related to #1951

I believe the attached file should have some animation based on application time, however it just stays still in MaterialXWebViewer. marbleTime.mtlx.zip

image

hybridherbst avatar Jul 26 '24 09:07 hybridherbst

Edit: in some applications the time nodes show up as not connected, this one here should work: myFile2.mtlx.zip

hybridherbst avatar Jul 26 '24 15:07 hybridherbst

There is no "play" functionality here nor in the desktop viewer. For the hardware case the u_frame shader uniform needs to be updated and bound as mentioned here

kwokcb avatar Jul 27 '24 13:07 kwokcb

Please consider it a feature request :)

hybridherbst avatar Jul 29 '24 08:07 hybridherbst

Thanks for this feature request, @hybridherbst, and I've just updated the title to clarify that this feature is missing in our GLSL shader generation, which both the Viewer and Graph Editor leverage for rendering

jstone-lucasfilm avatar Aug 03 '24 21:08 jstone-lucasfilm

Thanks @jstone-lucasfilm! I think in addition to the shader generation, the host application also needs to updates the uniforms, right?

hybridherbst avatar Aug 05 '24 06:08 hybridherbst

Good point, @hybridherbst, and indeed those updates should be made to the Viewer and Graph Editor when this feature is added.

jstone-lucasfilm avatar Aug 06 '24 16:08 jstone-lucasfilm

Hello, I'd like to work on this for ASWF Dev Days 2025.

fnRaihanKibria avatar May 08 '25 20:05 fnRaihanKibria

Excellent, thanks @fnRaihanKibria!

jstone-lucasfilm avatar May 08 '25 20:05 jstone-lucasfilm

Thanks for posting this original issue, @hybridherbst, and thanks to @fnRaihanKibria for the fix in #2389!

If there's still an outstanding compatibility issue with this feature on MacOS, feel free to write up a new GitHub Issue for this, so that we don't lose track.

jstone-lucasfilm avatar May 18 '25 00:05 jstone-lucasfilm

Thanks for all the work here! However, the file I originally attached to the issue still is not animated – I think this issue here should be reopened.

hybridherbst avatar May 26 '25 09:05 hybridherbst

Thanks for all the work here! However, the file I originally attached to the issue still is not animated – I think this issue here should be reopened.

Are you on a Mac? There is an issue on Macs unfortunately: https://github.com/AcademySoftwareFoundation/MaterialX/issues/2391

fnRaihanKibria avatar May 26 '25 13:05 fnRaihanKibria

Oh – yes, I am. The referenced issue seems to have a proposed solution though – are you able to make a PR with that? Thanks!

hybridherbst avatar May 26 '25 17:05 hybridherbst

Oh – yes, I am. The referenced issue seems to have a proposed solution though – are you able to make a PR with that? Thanks!

Looks like the person who suggested the solution made a PR already! https://github.com/AcademySoftwareFoundation/MaterialX/pull/2415

fnRaihanKibria avatar May 27 '25 09:05 fnRaihanKibria

The PR got merged – I see time working in MaterialXView and MaterialXGraphEditor, but not in the web viewer. Does that need another update?

hybridherbst avatar May 28 '25 09:05 hybridherbst

The PR got merged – I see time working in MaterialXView and MaterialXGraphEditor, but not in the web viewer. Does that need another update?

I believe so. I'm not familiar with it at all and haven't touched it. Might be good to make a new bug ticket?

fnRaihanKibria avatar May 28 '25 09:05 fnRaihanKibria

Seems I'm able to fix it myself, I'll make a PR :)

hybridherbst avatar May 28 '25 09:05 hybridherbst