# Multiple object properties bug.

**URL:** <https://forums.chaos.com/t/multiple-object-properties-bug/38446>\
**Category:** Issues\
**Created:** [August 25, 2011, 11:10am UTC](https://forums.chaos.com/t/multiple-object-properties-bug/38446 "2011-08-25T11:10:41Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigbossfr](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/bigbossfr/32/50480_2.png) [@bigbossfr](https://forums.chaos.com/u/bigbossfr)\
**Post date:** [August 25, 2011, 11:10am UTC](https://forums.chaos.com/t/multiple-object-properties-bug/38446/1 "2011-08-25T11:10:41Z")

</div>

Hi,  
I found a bug with the object properties.  
1) Create a sphere  
2) Put the sphere on a group (group1)  
3) Put the group1 to an another group (group2)

Create a Vray object properties for the group1, and an another for the group2.

Render.

Now, uncheck for example, the primary visibility of the object properties of the group2

Render.  
The sphere will be here. Bug ?

Same problem for other attribute (motion blur, id, etc etc..).

I can not for example, add an ID to the top group (to render a mask with the multi matte), and render a another mask of sub objects with another ID.

Thanks.

---

<div class="post-metadata">

**Author:** ![t.petrov](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@t.petrov](https://forums.chaos.com/u/t.petrov)\
**Post date:** [August 26, 2011, 8:08am UTC](https://forums.chaos.com/t/multiple-object-properties-bug/38446/2 "2011-08-26T08:08:39Z")

</div>

Hi,  
It is not a bug, but just how object properties nodes work.  
The thing is that the object properties nodes are not merged, only the node closest to the shape is used.

/Teodor

---

<div class="post-metadata">

**Author:** ![bigbossfr](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/bigbossfr/32/50480_2.png) [@bigbossfr](https://forums.chaos.com/u/bigbossfr)\
**Post date:** [August 26, 2011, 9:48am UTC](https://forums.chaos.com/t/multiple-object-properties-bug/38446/3 "2011-08-26T09:48:18Z")

</div>

Hi Teodor,  
Ok but it is the same problem with object ID attributes directly on the transform.  
For example :  
1) Create a sphere and a plane  
2) Put the sphere and plane on a group (group1)  
3) Add object id attribute on the sphere (id number 1) and on a plane (id number 2)  
4) Add object id attribute on the group1 (id number 3)  
5) Now create 2 multimatte :  
- multimatte1 : red = 1, green = 2  
- multimatte2 : red = 3

Render.  
The multimatte2 will be black.  
So, we can not render multimatte for a group because objects in the group always have object ID (!) ?

---

<div class="post-metadata">

**Author:** ![t.petrov](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@t.petrov](https://forums.chaos.com/u/t.petrov)\
**Post date:** [August 26, 2011, 10:00am UTC](https://forums.chaos.com/t/multiple-object-properties-bug/38446/4 "2011-08-26T10:00:29Z")

</div>

I see what is your point, but I don’t think this will be ever possible.  
The thing is that V-Ray doesn’t know about groups and hierarchies,  
the exporter exports only the geometry and a transform, there are no groups during rendering.

The feature you’re requesting is multiple ids per object…

---

<div class="post-metadata">

**Author:** ![bigbossfr](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/bigbossfr/32/50480_2.png) [@bigbossfr](https://forums.chaos.com/u/bigbossfr)\
**Post date:** [August 26, 2011, 10:53am UTC](https://forums.chaos.com/t/multiple-object-properties-bug/38446/5 "2011-08-26T10:53:09Z")

</div>

Yes, multiple ID.  
If i add an ID to a group, all child will have this “second” ID. With this, after, we will have a lot of possibility (like a say, render multiple multimatte for example).

---

<div class="post-metadata">

**Author:** ![vlado](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@vlado](https://forums.chaos.com/u/vlado)\
**Post date:** [August 26, 2011, 7:15pm UTC](https://forums.chaos.com/t/multiple-object-properties-bug/38446/6 "2011-08-26T19:15:46Z")

</div>

For the moment, we can’t do multiple IDs per object; however you might be able to do what you need using the VRayUserColor texture from the recent nightly builds connected to a VRayExtraTex render element. This texture allows you to pull out a color value from the V-Ray user attributes list attached to a shape. You can have as many user attributes as you want, and they can be attached anywhere in the node hierarchy (and will propagate down to the children).

Best regards,  
Vlado

---

<div class="post-metadata">

**Author:** ![bigbossfr](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/bigbossfr/32/50480_2.png) [@bigbossfr](https://forums.chaos.com/u/bigbossfr)\
**Post date:** [August 26, 2011, 8:58pm UTC](https://forums.chaos.com/t/multiple-object-properties-bug/38446/7 "2011-08-26T20:58:06Z")

</div>

> [@vlado](#):
>
> For the moment, we can’t do multiple IDs per object; however you might be able to do what you need using the VRayUserColor texture from the recent nightly builds connected to a VRayExtraTex render element. This texture allows you to pull out a color value from the V-Ray user attributes list attached to a shape. You can have as many user attributes as you want, and they can be attached anywhere in the node hierarchy (and will propagate down to the children).
> 
> Best regards,  
> Vlado

Wooo, nice tricks. I never had this idea. I will try this.  
Thank you Vlado.

---

<div class="post-metadata">

**Author:** ![djx](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/djx/32/62309_2.png) [@djx](https://forums.chaos.com/u/djx)\
**Post date:** [August 29, 2011, 5:58am UTC](https://forums.chaos.com/t/multiple-object-properties-bug/38446/8 "2011-08-29T05:58:38Z")

</div>

Nice indeed. I’m not sure if I’m doing it right but at least it works. Maybe you can tell me if there is a better way to do the following.

I have a texture that I want to apply to a single object as an VRayExtraTex element. I never knew how to do this before, but now I can create a vray user attribute with the following value _soloTex=1;_. Then I create a VRayUserColor and set the default color to black and the user attribute name as _soloTex_. Then I use the VRayUserColor to multiply the fileTexture node with a mutiplyDivide. And I connect the multiplyDivide to my VRayExtraTex. That way I get everything rendering black except the object(s) with the user attribute called _soloTex_.

Like I said, it works, but if there is a better way I would love to hear.

I guess the set up would be simpler for simulating a multi ID mutiMatte functionality.

David

---

<div class="post-metadata">

**Author:** ![bigbossfr](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/bigbossfr/32/50480_2.png) [@bigbossfr](https://forums.chaos.com/u/bigbossfr)\
**Post date:** [August 29, 2011, 9:14am UTC](https://forums.chaos.com/t/multiple-object-properties-bug/38446/9 "2011-08-29T09:14:07Z")

</div>

Yes, you can do this.  
Personally , i use condition node to switch between textures or shading network.  
I create a user attribute with the following value soloTex=1;.  
After, i create a VRayUserScalar, with default value to 0, and attribute name to soloTex. I connect the VRayUserScalar to the first term of the condition node.  
And i connect my texture to the “color if true”.  
I set the “color if false” to 0;0;0;.

With this, i can switch between a lot of textures just with an ID (because in the “color if false”, i can connect another condition, with value 2, etc etc…).

---

<div class="post-metadata">

**Author:** ![djx](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/djx/32/62309_2.png) [@djx](https://forums.chaos.com/u/djx)\
**Post date:** [August 29, 2011, 11:34am UTC](https://forums.chaos.com/t/multiple-object-properties-bug/38446/10 "2011-08-29T11:34:09Z")

</div>

Yes. That is a better way. I had a feeling there would be one. Thanks.

Is there any way to do something more complex with the user attribute? eg soloTex=fileTexture1.outAlpha; (which I does not seem to work).

---

<div class="post-metadata">

**Author:** ![bigbossfr](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/bigbossfr/32/50480_2.png) [@bigbossfr](https://forums.chaos.com/u/bigbossfr)\
**Post date:** [August 29, 2011, 11:53am UTC](https://forums.chaos.com/t/multiple-object-properties-bug/38446/11 "2011-08-29T11:53:54Z")

</div>

I did a request before to have a VRayUserString here : [http://www.chaosgroup.com/forums/vbulletin/showthread.php?54597-User-Data&highlight=VRayUserString](http://www.chaosgroup.com/forums/vbulletin/showthread.php?54597-User-Data&highlight=VRayUserString)
