ChaosGroup / blender_with_vray_additions

Blender with patches for V-Ray *.vrscene export
Other
28 stars 13 forks source link

Drivers in shading tree (Python node trees) #240

Closed philstopford closed 6 years ago

philstopford commented 6 years ago

V-ray for blender nodes offer the potential to use drivers, but they aren't showing up in the graph editor for configuration. I'm not certain whether this is supposed to work (it would be great if they could, to enable rigged surface using empties to drive blending of images, etc. for an entire surface).

I started a forum thread here (https://forums.chaosgroup.com/forum/v-ray-for-blender-forums/v-ray-for-blender-tips-tricks-and-tutorials/1008491-using-drivers-in-v-ray-shading-networks), but wanted to also file a ticket for tracking purposes.

philstopford commented 6 years ago

Here's a simple example using Cycles, with an empty driving a blend between the red and green images as it moves in Y over 10 frames. I can't reproduce this in V-ray, to affect both objects across their entire surface.

driver_demo_compact.zip

bdancer commented 6 years ago

Cycles is using completely different shading networks (written in C), while V-Ray uses Python node trees and those trees unfortunately do not support drivers.

philstopford commented 6 years ago

That's a shame. Has there been contact with the blender developers to see whether they could add the support you need?

bdancer commented 6 years ago

I'll check what could be done about that...

philstopford commented 6 years ago

I wanted to follow up in case there was news or more that I could do to help. This is one of my main pain-points right now.

bdancer commented 6 years ago

You could report that drivers do not work with Python nodes. I can't do much about this issue.

philstopford commented 6 years ago

A thread on devtalk.blender.org brought up this : https://github.com/LuxCoreRender/BlendLuxCore/issues/167

Would that approach help?

bdancer commented 6 years ago

Would that approach help?

Not much.

bdancer commented 6 years ago

@philstopford I've added a bit hacky way to evaluate drivers on Python node trees. Will be available in the next nightly build; please, check if this works for you. Builds are uploaded.

philstopford commented 6 years ago

With build ddba5f3 I see the input value on Float updating, but the luminosity or color blend does not respond. It looks like there was a later commit that might be related, but I wanted to ask. Updated blend file with the V-ray setup is attached, in case useful. driver_demo_compact.zip

bdancer commented 6 years ago

You mean self-illumination doesn't work? This is another issue. TexFloat output has incorrect type and it's a bug. It should have "grey" float-type socket output. Use driver along with "Float To Color" texture instead (which has "yellow" color-type output).

philstopford commented 6 years ago

It doesn't look like the blend sees the output of the float (even routed through color to float) : capture driver_demo_compact.zip

bdancer commented 6 years ago

Ok, this is also not related to drivers. This is some export bug. As a workaround use driver directly in "Blend Amount".

philstopford commented 6 years ago

Using the workaround makes things OK. Do you need a separate ticket for the 'export bug' as you describe it?

bdancer commented 6 years ago

@philstopford, I've logged this issue in our internal system, tnx =)