I'm dynamically adding prefabs to my scene using instantiate via C#, and rendering frames using Octane Recorder.
When I record, I can see the objects in the Editor, but they aren't appearing in the rendered/output image.
If I add these prefabs manually in the editor, they render as expected.
Is it possible to render dynamically spawned in Unity via Octane?
Spawned prefabs not rendering in Octane
Moderator: ChrisHekman
- ChrisHekman
- Posts: 1062
- Joined: Wed Jan 18, 2017 3:09 pm
That is an interesting problem. I tried to recreate the issue by making a script that intantiates a prefab, but that worked on my end.
Could you share your scene with us? PM it to me?
Could you share your scene with us? PM it to me?
Hi Chris, I'll still send you a project to test, but I think I found the issue.
If I put an instance of each game object into the scene Hierarchy that I want to spawn via code, the cloned / instantiated copies will appear in the Octane render. If not, the items appear in the Unity editor window but not the Octane render.
I wonder if a reference to each mesh needs to be on screen when the scene starts for Octane to render future copies?
If I put an instance of each game object into the scene Hierarchy that I want to spawn via code, the cloned / instantiated copies will appear in the Octane render. If not, the items appear in the Unity editor window but not the Octane render.
I wonder if a reference to each mesh needs to be on screen when the scene starts for Octane to render future copies?
- ChrisHekman
- Posts: 1062
- Joined: Wed Jan 18, 2017 3:09 pm
So apparently unity has a Read/Write flag for model assets. This is turned off for your model assets.
To fix the issue you need to turn it on. Otherwise unity will refuse OctaneUnity access to the mesh data.
Strangely, unity only gives this error when the mesh data is accessed from a monobehaviour script.
Since we use a unity component for the recording process to drive updates, this error only happens while recording.
I'll see if there is something I can do for the next build. But for now the fix should be to turn the read write to enabled in the import settings.
To fix the issue you need to turn it on. Otherwise unity will refuse OctaneUnity access to the mesh data.
Code: Select all
Not allowed to access triangles/indices on mesh 'Prop_Game_Console' (isReadable is false; Read/Write must be enabled in import settings)
Since we use a unity component for the recording process to drive updates, this error only happens while recording.
I'll see if there is something I can do for the next build. But for now the fix should be to turn the read write to enabled in the import settings.