FIXED: Instancing Bug?

I’m attempting to instance geometry and Touch is locking up (build 7940). I haven’t instanced anything before but I think I’m doing it right. I create a geometry, camera, and a light comp. Then I create a constant chop with 9 channels. I turn on instancing on the geometry comp, set the # of instances to manual, connect the constant to the Xform chop input and then select the channels for the 9 transform parameters. I then load a render TOP and Touch locks up. Also I don’t see any instance’s in the geometry viewer (should there be?). I’ve also tried hooking up the render TOP before instancing and it still hangs up when I set the number of instances to more than 1.

cheers
Keith

Hi Keith!

looking at your post i tried to do some research for you. If you want to learn how to use Instancing try to have a look to these 2 posts.

This post is a very nice multipass shader uploaded by jamesbass.
[url]multipass shaders - General TouchDesigner Discussion - TouchDesigner forum

You have also take a look to this second post, is about how to select instances inside a shader:
[url]instance id / glsl mat - #5 by greg - Beginners - TouchDesigner forum

As you can see in The Fur.instancing if you use Manually inside the Instance Count Set you have to insert in XformCHOP a CHOP with 1 Singlechannel that changes value during the Timeline.
You can also use a CHOP RenderPick to check from the render how many Instancing are created.
You will be able to get the InstanceID inside a GLSL Mat i[/i] and manage their position, color, alpha etc… i’m not so good to explain you how, but it’s everything inside those 2 posts i attached there.

I hope these few notes will help you to learn more about instancing.

Cheers,
Nima

thanks Nima great help, that fur patch is amazing. I could never get fur to look/move like that in Maya in realtime. I should of done a forum search myself but I just read the wiki and thought that it would work the way I connect it. It turns out that I was mostly correct in the way I did it except for the fact that I need to use a wave chop not a timesliced chop like a constant chop to control the translations. It makes sense because it needs a different value for each instance. I thought it would work like Maya where you duplicate an object and and tell translate and rotate a certain amount for each instance. It seems in Touch a non timesliced chop makes all the instances translate or rotate over the entire range of the value sent to it.

when I make some controls I’ll post a component display what I’m trying to achieve.

Thanks Nima

cheers
Keith

ps there doesn’t seem to be a problem now with Touch crashing. It only crash when I connected a constant chop to the instance parameter.

Can you post an example file that will crash if I connect the constant CHOP?

here are both the working and crashing files. It turns out TD won’t crash until the render TOP is loaded.

cheers
Keith
Instancing.toe (6.85 KB)
Instancing crash.toe (6.34 KB)

This is now fixed, thanks for the sample.

No prob, I gotta say that you guys are the best. I’ve never had even close to such good support form all the other software companies that I’ve purchased software from.

great work

thanks
Keith