On 16/04/2018 at 17:59, xxxxxxxx wrote:
I'm stumped by an issue with a created hair material not rendering at first.
I create a spline, a hair material, a hair tag, and then add the tag to the spline.
Just to be safe I do this:
mat.Update(True, True)
mat.Message(c4d.MSG_UPDATE)
If I drop the material into the console I see:
<c4d.BaseMaterial object called 'Fade: 1/Hair Material' with ID 1017730 at 0x00000181D66C5350>
If I drop the tag into the console I see:
<c4d.BaseTag object called 'Tag: Fade: 1/Hair Material' with ID 1017729 at 0x00000181D66C5410>
The ID's look correct.
The problem is it won't render by either pressing "Render View" or pressing "Render to Picture Viewer."
I then tried clicking on Material box>Menu>Function>Render All Materials.
This doesn't cause them to render.
What does work, is clicking:
Material box>Menu>Create>Shader>Hair Material.
And then rendering.
I don't apply the newly created shader; in fact, I can delete it before I render, and the previously non-rendering materials render perfectly.
Just the act of creating a hair shader suddenly makes C4D render correctly.
What the heck?
Further testing:
-
If I save the non-rendering scene to a file, and then close C4D, re-open C4D and load the file, it still doesn't render.
-
If I create the hair shader with the menu, delete it, and then save the scene to a file. Upon reloading the scene, everything renders correctly. Once the scene has had a menu created shader, it will render fine, even if saved and reloaded.
What is C4D doing?
I've uploaded the file so you can see for yourself:https://drive.google.com/open?id=1gEo3_UYwQMoWNgMc51FmkAaEYgeF9TjB
I'm using R17 by the way.
Thanks,
Chris