[Bf-cycles] rendering instances in Cycles
sergey.vfx at gmail.com
Thu Jun 18 15:52:45 CEST 2015
In your example is rather correct, it'll create two objects which are
sharing the same mesh. ObjectManager and BVH builder detects if objects are
sharing the same mesh and does some special things for proper instancing
Not sure why do you ask about shaders, they are not object property,
they're mesh property. Synchronization code from blender/ is whet you want
to look into to understand it better.
On Thu, Jun 18, 2015 at 2:28 AM, Mohamed Sakr <3dsakr at gmail.com> wrote:
> I'm creating an exporter to Cycles Standalone, I wanna know how Cycles
> renders instances?
> so if I have a Mesh* which is shared across 2 Object* , is this all what I
> need to do? or am I missing something?
> Mesh* any_mesh;
> //fill mesh data
> Object* main_object;
> main_object->mesh = any_mesh;
> main_object->tfm = any_tfm;
> Object* instance_object;
> instance_object->mesh = any_mesh;
> instance_object->tfm = instance_tfm;
> //what about mesh->used_shaders??
> so in short, what I do to mark an object as an instance., which data to
> fill, how to determine its shader.
> Mohamed Sakr
> Bf-cycles mailing list
> Bf-cycles at blender.org
With best regards, Sergey Sharybin
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Bf-cycles