[Bf-cycles] rendering instances in Cycles

Sergey Sharybin 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
then.

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:

> Hi,
>
> 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.
>
> cheers,
> Mohamed Sakr
>
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> http://lists.blender.org/mailman/listinfo/bf-cycles
>
>


-- 
With best regards, Sergey Sharybin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-cycles/attachments/20150618/3303fe83/attachment.htm 


More information about the Bf-cycles mailing list