Unity-Technologies / VFXToolbox

Additional tools for Visual Effect Artists
Other
1.11k stars 109 forks source link

How to use the Blender 6-way lighting script? #38

Open jackfmaxwell opened 4 months ago

jackfmaxwell commented 4 months ago

I have a blender fluid simulation explosion. I have imported the unity_6way.py script and have this menu image

Im following this blog post: https://blog.unity.com/engine-platform/realistic-smoke-with-6-way-lighting-in-vfx-graph

image

At this point in the blog post theres a severe lack of information on what you are meant to do. I've setup my settings to be the same as in the blog and now hit Render all.

After rendering I have an EXR file called Lightmaps_00x.exr, for every frame of the animation. If i now go to the compositing tab and hit render I get this error: image

If I try to Export Flipbook I get this error: image

So what exactly am I meant to do with this EXR file? When I drop it into Unity, Unity is unable to read it. Hoping that the script built by Unity for 6-way lighting VFX export from blender actually works and I wont need to be fixing it myself.. Cant find any tutorials on this.

jackfmaxwell commented 4 months ago

I guess the to summarize this is, I am not getting Positive and Negative files. Just lightmap.

jackfmaxwell commented 4 months ago

image

So anytime the script references combiner_node.inputs["something"] it doesnt work. It yields an error key "Something" not found.

jackfmaxwell commented 4 months ago

This appears to be the issue: https://projects.blender.org/blender/blender/issues/111829

"Python code to create group inputs has stopped working. No relevant breaking changes in the release notes. #111829"

"spoke with the developer, not a bug, the changes weren't added to the release notes yet."

https://blenderartists.org/t/how-to-add-inputs-and-outputs-to-group-node-using-python/1506828/2

image

The method of adding inputs/outputs changed in blender 4.0 so the repo is now broken for Blender 4.0 exportings

jackfmaxwell commented 4 months ago

I think the exporter may be working in blender 3.4.0. Will be testing with a new explosion tomorrow

jackfmaxwell commented 4 months ago

Yes works in blender 3.4.0

jackfmaxwell commented 4 months ago

Positive Negative

Here is the result using this exporter. It seems its not working correctly or perhaps my setup is wrong but the results are very very dark. This is particularly strange since the temporary files saved during rendering each frame appear fine image