boberfly / GafferCycles

Cycles for Gaffer
BSD 3-Clause "New" or "Revised" License
85 stars 10 forks source link

gaffer crash when I turn on OSL #21

Closed willDTF closed 5 years ago

willDTF commented 5 years ago

Hi, If I turn on OSL in cyclesOptions node, gaffer instantly crash and return an arnold related error

tried with the last version of both gaffer (0.54.2.0) and gaffercycle (0.9.1) here is the console log

image

boberfly commented 5 years ago

Hi @Kaiz3rTool,

I'd recommend running without Arnold in your path so that Arnold isn't loaded in with Cycles, just in case it's a symbol clash over conflicting OSL libraries. Also I don't recommend changing the shading mode while IPR is rendering, it probably puts it in a weird state but I'm not sure.

I just tried it on my end with Arnold 5.4 loaded and swapped between SVM and OSL and they both work fine while the IPR is running. Are you trying to run OSL on GPU? That's not supported by Cycles: https://docs.blender.org/manual/en/latest/render/cycles/gpu_rendering.html#supported-features-and-limitations

boberfly commented 5 years ago

Btw unrelated, but your UVMap primvars look like they are getting tripped up by the conversion code. I'm not too sure how you are bringing those in, but if their interpretation is not set to GeometricData::UV it'll give you that error that you're getting. I'm not sure how to force that or if the Alembic or USD code is not converting that for you.

willDTF commented 5 years ago

hi, I run it only on CPU Yes there is not real interest to switch during interactive, it's more for testing purpose of gaffercycles

maybe it crash from my side because of the order it load module (gaffercycles then arnold)

yes the UV data are strange, it's just a cube exported in alembic with blender

cheers

boberfly commented 5 years ago

Ah right I will take a look if the Alembic importer is applying the Geometric::UV properly, or that Blender's exporter is doing that.

As for the OSL problem it caused a crash on my end but it was unrelated to your debug dump, I've found something which could be causing this which is a mistake on my part (I am managing the list of shaders in Gaffer and overriding Cycles' list, but disregarding that the first 4 shaders are managed by Cycles so those were being lost and would cause a crash if referenced again). Surprisingly SVM hasn't crashed because of that! Next build I will have a fix for that...

Cheers!

boberfly commented 5 years ago

Alright give this one a whirl and see if you get crashes: https://github.com/boberfly/GafferCycles/releases/tag/0.10.0

willDTF commented 5 years ago

hi, what a quick fix, I will give it a try asap then let you know

willDTF commented 5 years ago

works nicely to me, thanks !