Wrong material render when requesting materials from scripts

Forums: Wrong material render when requesting materials from scripts
A public forum for discussing and asking questions about the Octane for Unity Alpha

Moderator: ChrisHekman

Wrong material render when requesting materials from scripts

Postby jalley » Tue Sep 26, 2017 7:31 pm

jalley Tue Sep 26, 2017 7:31 pm
Dear all,

This is a very unexpected behavior we have found while trying to use a script on a second camera on a Unity+Octane setup:

1.) Setup a scene with considerable geometry overhead (e.g. a plane and 1000 spheres should suffice).

2.) Create and attach a script to, for instance, a second camera that traverses your scene and request material information for the objects on your scene.
Doing something like : "foreach (Material m in objRenderer.materials)" (just this line makes our renders to crash and we need to access material info!)
Ideally we would like to use that information with a replacement shader in this second camera, but we found this problem before arriving to that. We need the rendering to be synchronized between Octane and our custom Unity shader pass.

3.) Load octane (v 1.0.0.963) and click render ... the scene renders incorrect materials (as shown in the pics below where texture is missing and material becomes reflective while the original was a simple texture in the plane and default white coloured shader for spheres).

We have tried/tested this with different scenarios (different geometry, using only standard materials, etc.)

We have reduced our script to the minimal expresion, and detected this point of break. We would need to fabricate some workaround meanwhile,
¿any suggestion for that? We need this second camera to use material information for a simplistic but very relevant custom shader effect ...

We appreciate any help or suggestions. Thanks,
j4lley
Attachments
working_render.png
Rendering when script does not request material info explicetly
notworking_render.png
Materials dissapeared, broken rendering
jalley
Licensed Customer
Licensed Customer
 
Posts: 27
Joined: Thu Aug 31, 2017 6:00 pm

Re: Wrong material render when requesting materials from scripts

Postby Xhed » Mon Oct 02, 2017 10:38 am

Xhed Mon Oct 02, 2017 10:38 am
The scripting API available right now is very temporary, and is not actively supported. Custom shaders are also not yet supported. There are plans to add support, but not before we have a product which is stable and more complete.
- Rick
User avatar
Xhed
OctaneRender Team
OctaneRender Team
 
Posts: 239
Joined: Wed Jul 10, 2013 10:27 pm
Location: Breda, The Netherlands

Return to Octane for Unity


Who is online

Users browsing this forum: No registered users and 11 guests

Fri Apr 19, 2024 11:22 am [ UTC ]