Motion blur doesnt sample materials per sub frame

Forums: Motion blur doesnt sample materials per sub frame
Maxon Cinema 4D (Export script developed by abstrax, Integrated Plugin developed by aoktar)

Moderator: aoktar

Motion blur doesnt sample materials per sub frame

Postby boxfx » Mon Feb 19, 2024 12:47 pm

boxfx Mon Feb 19, 2024 12:47 pm
I have a material, purple with a green stripe. This is placed onto a static null object. Inside is a moving object which spins.

When I render this, octane is seemingly applying the material once, then blurring that material for the motion blur. This means at fast shutter speeds (0.01s) the green segment is visible. But if I extend the shutter to 0.04s so the object blurs more, it also blurs the material even though the material is 100% static and not moving.

Is there any way to get octane to sample material per subframe for motion blur?

0.01s on the left, 0.04 on the right, project attached.
blur time.jpg
Attachments
bluetexture.zip
(831.23 KiB) Downloaded 16 times
boxfx
Licensed Customer
Licensed Customer
 
Posts: 220
Joined: Fri Apr 27, 2012 9:13 am

Re: Motion blur doesnt sample materials per sub frame

Postby frankmci » Tue Feb 20, 2024 5:06 pm

frankmci Tue Feb 20, 2024 5:06 pm
It's not the motion blur that's the problem, it's the texture projection. The texture is in geometry UV space instead of world space. Since a simple gradient does not have texture projection info, you can stick it into a Bake node, then plug the Projection node there. XYZ to UVW is an easy way to do it. If World Space doesn't work for your usage, you can also use YXZ to UVW with Object Space, and use your Null to set the texture position.
Attachments
texturespace.png
XYZ to UVW texture projection
Technical Director - C4D, Maya, AE, - Washington DC
frankmci
Licensed Customer
Licensed Customer
 
Posts: 827
Joined: Fri May 26, 2017 2:00 pm

Re: Motion blur doesnt sample materials per sub frame

Postby boxfx » Tue Feb 20, 2024 5:53 pm

boxfx Tue Feb 20, 2024 5:53 pm
Thanks for the help, but how is it not a motion blur problem when motion blur breaks it?

Why can octane not read the texture projection information from the texture tag which is set to flat projection? The data is obviously there otherwise it wouldnt be able to work throughout the rest of the app.

Baking nodes are slow as heck, im trying to avoid them at all costs

Cant possibly use world space, the objects will be animated moving, unless im misunderstanding something

I lose any ability to see my texture projection in the realtime c4d editor if im forced to use nulls as inputs for textures. octanes directx texture display is bad enough as it is.

How is a set of 3d coordinates for a null object any different from a 3d set of coordinates for a texture projection tag?
boxfx
Licensed Customer
Licensed Customer
 
Posts: 220
Joined: Fri Apr 27, 2012 9:13 am

Re: Motion blur doesnt sample materials per sub frame

Postby aoktar » Tue Feb 20, 2024 6:48 pm

aoktar Tue Feb 20, 2024 6:48 pm
Motion blur is supported just for objects and camera. Not for materials/textures and uv coordinates
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
User avatar
aoktar
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 15970
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye

Re: Motion blur doesnt sample materials per sub frame

Postby frankmci » Tue Feb 20, 2024 9:49 pm

frankmci Tue Feb 20, 2024 9:49 pm
It's not the motion blur "breaking" it. It's blurring exactly the way I would expect it to with UV mapping. The way you have constructed your Octane shader, it has no Octane native texture projection info. Without that, Octane is defaulting to UV mapping. If I understand what you are trying to do, you want the texture space to be associated with the Null farther up the hierarchy so that it does not spin with the geometry and so that the texture remains stationary relative to that Null. To do that, you need to give Octane some more info.

You are currently driving Emission with an OSL Gradient utility node, which isn't really a texture, so it doesn't have texture Projection inputs. Instead of using a Baking node with an OSL Gradient to get access to Projections, you could use a Gradient Generator node, which has its own Projection input. An Octane Gradient Generator node generates float data, though, not RGB, so you need a standard Octane color Gradient node to colorize it. Here is an example.

In this case, I'm using a hidden sphere as my External Transform object for clarity's sake, but it could just as well be the Blades Null or any other object in XYZ space. With this hierarchy you can move Blades Null anywhere you want, and the texture will remain still, relative to it, since the External Transform object is a child of the Blades Null.

Yes, there are limitations to what Octane textures C4D can interpret and display natively. The render pipeline mostly goes in one direction C4D>Octane, not Octane>C4D. Fortunately, we have the Live Viewer for that.
Attachments
TextureSpace.02.png
Non-Baking Gradient
Technical Director - C4D, Maya, AE, - Washington DC
frankmci
Licensed Customer
Licensed Customer
 
Posts: 827
Joined: Fri May 26, 2017 2:00 pm

Re: Motion blur doesnt sample materials per sub frame

Postby boxfx » Wed Feb 21, 2024 12:00 pm

boxfx Wed Feb 21, 2024 12:00 pm
But im not using uv mapping, im using a static flat projection attached to the null. My setup does fundamentally work, the texture projects correctly and remains attached to the parent null as the object inside spins, the motion blur system however only seems to be assessing the flat projection of the texture on the first frame and then simply assumes it must be rotating around with the fan blade on subsequent subframes. Honestly, this is just coming across as a missing refresh somewhere.

I know youre thinking, "why doesnt he just attach the projection to a null like Ive told him?" the problem is I need this material applied to 100's of objects, all with different flat projections. Duplicating and keeping track of 100's of visually identical materials just so they can all have a different null linked is not doable. Currently my only solution is to just not spin the fane blades too fast so the problem doesnt show up quite as much.
boxfx
Licensed Customer
Licensed Customer
 
Posts: 220
Joined: Fri Apr 27, 2012 9:13 am

Return to Maxon Cinema 4D


Who is online

Users browsing this forum: No registered users and 42 guests

Sun Apr 28, 2024 11:41 am [ UTC ]