Spawned prefabs not rendering in Octane

Forums: Spawned prefabs not rendering in Octane
A public forum for discussing and asking questions about the Octane for Unity Alpha

Moderator: ChrisHekman

Spawned prefabs not rendering in Octane

Postby bwatanabe » Mon Mar 25, 2019 6:14 pm

bwatanabe Mon Mar 25, 2019 6:14 pm
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?
bwatanabe
 
Posts: 10
Joined: Sun Mar 03, 2019 5:18 am

Re: Spawned prefabs not rendering in Octane

Postby ChrisHekman » Tue Mar 26, 2019 10:30 am

ChrisHekman Tue Mar 26, 2019 10:30 am
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?
ChrisHekman
OctaneRender Team
OctaneRender Team
 
Posts: 250
Joined: Wed Jan 18, 2017 3:09 pm

Re: Spawned prefabs not rendering in Octane

Postby bwatanabe » Tue Mar 26, 2019 5:12 pm

bwatanabe Tue Mar 26, 2019 5:12 pm
Thanks Chris. I'll send a project when I get home, as well as the version of Unity and Octane that I'm using. Good to know it should work, though!
bwatanabe
 
Posts: 10
Joined: Sun Mar 03, 2019 5:18 am

Re: Spawned prefabs not rendering in Octane

Postby bwatanabe » Wed Mar 27, 2019 1:36 am

bwatanabe Wed Mar 27, 2019 1:36 am
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?
bwatanabe
 
Posts: 10
Joined: Sun Mar 03, 2019 5:18 am

Re: Spawned prefabs not rendering in Octane

Postby ChrisHekman » Wed Mar 27, 2019 3:14 pm

ChrisHekman Wed Mar 27, 2019 3:14 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.
MeshReadWrite.png


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)


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.
ChrisHekman
OctaneRender Team
OctaneRender Team
 
Posts: 250
Joined: Wed Jan 18, 2017 3:09 pm

Re: Spawned prefabs not rendering in Octane

Postby bwatanabe » Thu Mar 28, 2019 6:29 pm

bwatanabe Thu Mar 28, 2019 6:29 pm
Great, thanks for this information, Chris.
bwatanabe
 
Posts: 10
Joined: Sun Mar 03, 2019 5:18 am

Return to Octane for Unity


Who is online

Users browsing this forum: No registered users and 2 guests

Wed May 22, 2019 6:38 pm [ UTC ]