Texture Instancing Compound

Plugins linking to this thread: (hide)

Texture instancing Shader V1.5Author: Reinhard Claus
Updated April 2013 with the ability to fetch the texture offset from an ICE attribute. Previous update added texturable scale X/Y.

The basic function of this shader is to stamp an instance of the selected texture at each particle location on the shaded object.

The shader requires an ICE particle cloud as a texture placing source which has to have its material shared with the object. It has features such as: Modify texture base scaling and rotation, various lookup options for fractal-like patterns, random position offset in texture, rotation by ICE particle vector attribute, random rotation, orient towards a vector or a tangent map. Mental ray only. See the si-community thread for some interesting looking renders created by Rob Chapman.

Mad props to Paul Smith aka pooby for inventing this wonderful method. If you haven't already, check his videos page for loads of ICE inspiration. Btw Paul's first video introducing the method is here. Btw #2: Since, he's created two videos demonstrating this shader: Texture Instancing Shader and Lizard texinstancing.

local backup: Texture Instancing.1.5.xsirtcompound

User avatar
rray
Moderator
Posts: 1774
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: Texture Instancing Compound

Post by rray » 06 Aug 2012, 23:47

There are some approaches that might do it like freezing the PC, then sticking the particles to the mesh, or maybe enveloping the point cloud so it deforms along with the body. You'd have to link the rotation lookup parameter to the particle rotation somehow in either case. TBH I think out of lazyness I would go with rendermapping for that one (Sound unadventurous I know x_x )
softimage resources section updated Jan 5th 2024

Pooby
Posts: 501
Joined: 27 Aug 2010, 22:25

Re: Texture Instancing Compound

Post by Pooby » 02 Jan 2013, 15:51

I had a proper go with this shader, and I have to say, its brilliant. Thanks for making it.
I've been fiddling around with it all morning doing trees and all sorts with ease. If I had one request it would be to be able to control the parameters of each sample with a weight map. so, say you were doing a tree, you could make the texture finer and less intense on small branches, but you can kind of do that now by mixing 2 shaders.
I did a video overview of the use of it.



Edited by gustavoeb: use vim tag :smile:

User avatar
rray
Moderator
Posts: 1774
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: Texture Instancing Compound

Post by rray » 03 Jan 2013, 00:37

Chuffed to see! Keep up your tutorials too they are great.
Pooby wrote:If I had one request it would be to be able to control the parameters of each sample with a weight map. so, say you were doing a tree, you could make the texture finer and less intense on small branches
The shader is completely build out of factory nodes, to use a weightmap to control some parts of it like the texture scale or offset, you can edit the compound and expose these parameters for texturing. But for blending two textures the only option is probably using 2 shaders like you did.

This scene shows how to use another ice parameter on the point cloud that is controling the scale: DemoProjectTextureInstancing3.zip.
softimage resources section updated Jan 5th 2024

User avatar
rray
Moderator
Posts: 1774
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: Texture Instancing Compound

Post by rray » 04 Jan 2013, 21:33

Updated ..... This new version can break up the cell borders.

Btw, for rendermapping is there an aliasing setting somewhere like in the render options ?
or is the supersampling the only option to increase quality?

Download is on first page

Image
softimage resources section updated Jan 5th 2024

Pooby
Posts: 501
Joined: 27 Aug 2010, 22:25

Re: Texture Instancing Compound

Post by Pooby » 04 Jan 2013, 23:01

Great thanks. I look forward to trying that out. I find it amazing how the borders don't notice much, as in this example showing the scaling by weightmap, that I didnt intially think was possible, but is...
https://vimeo.com/56762083
But having a way of blurring them borders will be even better.

User avatar
rray
Moderator
Posts: 1774
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: Texture Instancing Compound

Post by rray » 04 Jan 2013, 23:33

Oh that worked really well.
I didn't think it would because I was texturing the scale of the cell shader a while ago, and that produced weird smearing along the gradients. Never tried it with the texture instance shader for that reason.
softimage resources section updated Jan 5th 2024

User avatar
rray
Moderator
Posts: 1774
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: Texture Instancing Compound

Post by rray » 07 Jan 2013, 13:29

Updated .. V1.4 allows separate X and Y scaling, also added a few comments in the compound so it's easier to get into the inner workings


(an earlier 1.3 update had X & Y scaling too, but had some problems with shearing effects when rotating stretched textures)
softimage resources section updated Jan 5th 2024

kykeon
Posts: 4
Joined: 08 Oct 2012, 11:27

Re: Texture Instancing Compound

Post by kykeon » 22 Jan 2013, 19:00

Hi there,
first of all, what a nice tool we have there! Many thanks to Reinhard Claus.

My question is about using the texture's alpha to avoid "square" overlapping. I would like to make a snake skin, and the look has to be very regular obviously...

Does anyone achieve to use the alpha, or did I miss something somewhere?

Many thanks!

User avatar
rray
Moderator
Posts: 1774
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: Texture Instancing Compound

Post by rray » 22 Jan 2013, 19:32

Hi & you're welcome!
I realize this would be cool, am afraid though that's not possible because of limitations that the "point cloud lookup" node has which is used inside the compound. Problem with that is that it can only look up attributes like "position" from one particle at a time. Actually it does multiple but this results in a mash up of attributes which makes it impossible to extract the position of multiple particles.
Maybe there's some other way to do that which I've not discovered yet.
softimage resources section updated Jan 5th 2024

kykeon
Posts: 4
Joined: 08 Oct 2012, 11:27

Re: Texture Instancing Compound

Post by kykeon » 22 Jan 2013, 22:21

Thank you.
I realize it will not feet my needs for making a snake skin, even with the abilty of using the alpha. Too bad, because it was theoricaly a good way to avoid streching of the scales when part of the body inflate... As you said, I can't find a way to get the direction for overlapping properly one scale after another. As we can see here:
Image

Also I realize there is probably no way to get the color attribute to change colors of the scales to create this kind of pattern
Image
for example.

I will probably do it with a "feather" particle system or may be by textures dependings of the look the director is looking for.
Any ways, I will definitly use it in a way or another for another purpose, the bark Paul Smith did for exemple or may be his gravel simulation.

Many thanks! Cheers.

User avatar
rray
Moderator
Posts: 1774
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: Texture Instancing Compound

Post by rray » 30 Apr 2013, 02:20

kykeon I hope you'll find a good use. Cheers!

There's an update (first post of this thread/rray.de) . V1.5 adds Paul's idea, the ability to read the texture offset from an ICE attribute (similar to what is done with the rotation). Previous method didn't work well with animation. Be warned not tested much yet %-(
softimage resources section updated Jan 5th 2024

Pooby
Posts: 501
Joined: 27 Aug 2010, 22:25

Re: Texture Instancing Compound

Post by Pooby » 30 Apr 2013, 22:15

https://vimeo.com/65171697

thanks for the update

Pancho
Posts: 659
Joined: 19 Sep 2010, 11:28

Re: Texture Instancing Compound

Post by Pancho » 06 Jun 2013, 18:51

How do you create a "shared Material"?. I just assign the same texture once to the cloud and once to the mesh. On reload the information transfer seems to be broken and the preview doesn't look right. So, how do I do this correctly?

Cheers

P.S.: I use the instancer on a very large mesh. What is strange is that the bump map (also instanced) displaces the color texture. So you don't get only the bump illusion, but also a distoreted texture. Bump map value is about 100 in the bump map node. Is there a way to avoid this?

Pancho
Posts: 659
Joined: 19 Sep 2010, 11:28

Re: Texture Instancing Compound

Post by Pancho » 07 Jun 2013, 20:31

O.k., after some initial errors I get it to work. What still bothers me is that the bump map screws up the color map. Is there anything one can do about it?

The color map seems to be displaced so it ends up grainy, like sand. The inital map is not any more recognizable. The bump amount mini- or maximizes this effect. This should definitely not happen.

Any ideas?

Cheers!

User avatar
rray
Moderator
Posts: 1774
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: Texture Instancing Compound

Post by rray » 09 Jun 2013, 18:26

I'm lost. Are you using a bump map setup like Paul does in his tex instancer videos or a different one? Best would probably if I had the scene to look at.
softimage resources section updated Jan 5th 2024

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests