Geo instance2 (uv zooming in texture replace mode)

Hi to all

This is my 1st post so please bear with me :slight_smile:

Context setup: I am instancing a geo and want to have control on the uv zoom of a single instance.

As you’ll see in the .tox, I’ve managed to have control on the uv offset of a single instance,
this works because the texture mode is set to offset.

What I would like is to have it set to replace mode so I can stretch my texture.
-Which also means that I would also like to learn how to have a full image in each instance when in this replace mode

All further explanations are include in the .tox

p.s. as you’ll see, I have a execute that should be opening the geo’s viewer window
but doesn’t seem to work?

thanks a million in advance

phiol
uv-zooming a single instance2 (in replace mode).tox (4.62 KB)

Hi Phiol,

This is an interesting challenge. The way I tackled it is a little different than your original direction, mostly because it was faster to implement - thought not as efficient as it could be.

A quick break down of what you’ll find in this example:

Click on a banana and use the slider to change its scale.

Instancing set up the usual way with a source piece of geometry and converted to channel information. To do the texture instancing I’ve actually used the texture replace method that’s supported on newer graphics cards - this doesn’t work on all cards, so your mileage may vary in this regard. The real secret sauce here is the base_textures base which has a replicated version of all of our textures.

Next I’m doing some render picking, and using a slider to change the parameter of the transform TOP inside of the base_textures. This is done with some scripting, in the CHOP execute DAT.

Hopefully that makes sense, and can help you move forward.
container_instance_resize.tox (4.29 KB)

As a quick note - your on start script does work, but it only fires when you restart the whole touch file.

If you want to see some more examples of instancing there’s a bunch here:

[url]https://github.com/raganmd/TD-Examples/tree/master/ragan/instancingTechniques[/url]
Some of these have tutorials up on youtube already, and some are still in the making. I’ve gotta finish a series on using Python in TouchDesigner first.

Cheers,
M

Thanks so much Matthew. Was following your tutorial yesterday morning.
You are very kind and generous. Thanks for putting in the time.

I’m new to Touch. I have to learn it for work. It’s only be 1.5 month
I’m a very passionate and intense Jitter user (over 600 posts and replies in the c74 forum in the last year :wink: I also go by phiol there.


Comparison/observations , I find you can achieve much more in Jitter with regular objects.
plus Jitter has nodal glsl with gen’s gl.pix. ← you can even do a gen patch and export it as a glsl code.

I mention this because I find that to get real work done in Touch, one most know how to
script python and know glsl. ← I may be wrong , but as a noob this is what stands out.
Simply using standard operator combinations, one can’t seem cover as much.

I’m presently on my mac , but will test your patch tomorrow on a pc

endless thanks for this :slight_smile: !!!

cheers

ps. would there be a way to do it without python ??

Hi phiol.

A lot of the operator use in Touch depends on what you’re doing. I’ve been using touch long enough now that I don’t think about operators the same way anymore… which makes it difficult to be totally objective.

That said, there are lots of things you can do with the standard operators out the gate. If you haven’t had a chance I’d highly recommend looking through Markus’ generative design examples, [url]http://www.derivative.ca/wiki088/index.php?title=Generative_Design[/url], and also to make sure you look through op snippets from the TouchDesigner help menu.

Generally, all of the TOPs are really just GLSL with conveniently located parameters. There’s a huge number of processes that you can accomplish with TOP chains, and it’s all very fast. The Touch learning curve is pretty steep, but there are a much larger number of support docs out now than even just 4 years ago - about when I started learning. If you can, I’d give touch another 6-8 months of solid practice before you pass any judgement on it. I found it very challenging to get into, but am now very happy developing in it, and find that you just get faster with time.

In terms of python, the only real python in the example I’ve sent you is used to set scaling. There are a number of ways that you might do this, I just happen to think this is a straightforward solution for this particular approach. I’m sure you can do this without using python, it just happens to be an easier method that prevents unnecessary cooking and extra operators in the network. When I first looked at this, I started by thinking about a 2D image array to store the variations of images, but the scripting there is much more complicated because of the nature of the desired result.

Cheers,
M

thanks a lot for the reply Matthew,

I’ll keep on diggin’ :slight_smile:


A small question , about your python videos.
Yesterday, I started with your 1st part one video and it was about making python strings.


now I go back today and the 1st part 1 video is about Data Structures – Dictionaries

I 'm a little confused and was wondering if there’s a part 2 to the string making video

thanks a lot

Nevermind I found it ,
I had bookmarked the wrong page.

this is it
matthewragan.com/teaching-resour … hdesigner/

You can see the whole list of teaching resources here:

[url]http://matthewragan.com/teaching-resources/touchdesigner/[/url]

It’s also worth looking at elburz book, it’s really wonderful:
[url]http://book.nvoid.com/[/url]

Thanks for the reference :slight_smile:

I am fortunate have Daburz as a personal friend :slight_smile:
I got the book. thanks for reminding me :slight_smile:

thanks