[Verse-dev] Representing objects with multiple materials

Eskil Steenberg eskil at obsession.se
Sat Sep 17 14:54:12 CEST 2005


Hi

As Samuel said we solved this and Emil was nice enough to write a little
tutorial. I still want to comment on one thing:

>  Then I have a layer called "material" attached to the geometry
> node. It has 32-bit unsigned integers representing the material numbers of
> each polygon.

This is a very inadvicable action. Not just that its the wrong way of
storing multiple materails, but for other reasons too. The reason is that
different connections may have diffent node ids. So node id 4 for you may
be node id 8 for some one else. For samuel an other problem got evident
when he tried to save his data and load it back up, then all nodes got
different node ids. So if you ever ned to store a node reference either do
it by the nodes name or do it where the server is aware that it is a node
id, like: a link tag, or a method call param. then the server can do the
translation for you.

Even though VN_TAG_UINT32 and VN_TAG_LINK both stores a 32-bit unsigned
integer, they dont store the sam thing. if you set a value of 14 to a
VN_TAG_UINT32 tag all users will read out the value as 14, but if you set
VN_TAG_LINK to 14 other users will get the node id that coresponds to the
same node to them, but to them that node may be have a different id.

This is alos te reason why there is a difference betwean
	VN_O_METHOD_PTYPE_UINT32 and VN_O_METHOD_PTYPE_NODE.

So if you for instance need to reference a node in a text buffer, use its
name or refference to the name of a VN_TAG_LINK tag.

Cheers

E





More information about the Verse-dev mailing list