The relative time goes from zero (shutter opens) to one (shutter closes), while the frame time actually matches the timeline.
Details
Diff Detail
- Repository
- rB Blender
- Branch
- time_shader
- Build Status
Buildable 256 Build 256: arc lint + arc unit
Event Timeline
The functionality seems fine, but I don't think this belongs in the light path node? That's about describing the light path and bounces to do tricks.
Perhaps we should add a new Time node with outputs named "Frame" and "Shutter"? A "Seconds" output would also be useful to animate things independent of the frame.
Eventually it would be nice to support animation curves for shader node sockets, by auto inserting a node in the shader graph that reads values from a baked animation curve. But this is a good step and makes sub frame shader animation possible already.
| intern/cycles/blender/blender_camera.cpp | ||
|---|---|---|
| 503–508 | Maybe this should be done in camera.cpp in device_update rather than be Blender export specific, and shuttertime_offset could be renamed to frame? To share the logic between renderers and have an easier to understand value in XML scene files. | |
Just a heads up, Opencl Kernel doesn't compile on Master for 3-4 days when rendering in viewport or F12.
Compiling OpenCL program base
OpenCL build failed with error CL_BUILD_PROGRAM_FAILURE, errors in console.
OpenCL program base build output: C:\Blender-Git\Broken_build_windows_Full_x64_vc14_Release\bin\Release\2.78\scripts\addons\cycles\kernel\kernels/opencl\../..\../../kernel_shader.h:280:17: error: no member named 'ob_tfm' in 'struct ShaderData'
ccl_fetch(sd, ob_tfm) = lamp_fetch_transform(kg, lamp, false);
~~ ^C:\Blender-Git\Broken_build_windows_Full_x64_vc14_Release\bin\Release\2.78\scripts\addons\cycles\kernel\kernels/opencl\../..\../../kernel_types.h:757:31: note: expanded from macro 'ccl_fetch'
define ccl_fetch(s, t) (s->t)
^
C:\Blender-Git\Broken_build_windows_Full_x64_vc14_Release\bin\Release\2.78\scripts\addons\cycles\kernel\kernels/opencl\../..\../../kernel_shader.h:281:17: error: no member named 'ob_itfm' in 'struct ShaderData'
ccl_fetch(sd, ob_itfm) = lamp_fetch_transform(kg, lamp, true);
~~ ^C:\Blender-Git\Broken_build_windows_Full_x64_vc14_Release\bin\Release\2.78\scripts\addons\cycles\kernel\kernels/opencl\../..\../../kernel_types.h:757:31: note: expanded from macro 'ccl_fetch'
define ccl_fetch(s, t) (s->t)
^
2 errors generated.
error: Clang front-end compilation failed!
Frontend phase failed compilation.
Error: Compiling CL to IR
@James W E Bird (3dLuver), please don't report such things in unrelated code reviews. Check the bug tracker, it seems to be already reported in T49901.
Sorry my Bad, Im still getting used to how it works on here. Is there a rules guide for devs on here you can point me in the direction. to make sure i do things in the right way in future.
@James W E Bird (3dLuver), there is no specific guideline about this, but just generally it's a good idea to stay on topic. Some info on how the project works is here:
https://wiki.blender.org/index.php/Dev:Doc/Process
https://wiki.blender.org/index.php/Dev:Doc/Contact