AoN_XSI Beta

Plugins linking to this thread: (hide)

AoN:XSI BetaAuthor: Thomas Helzle
A work-in-progress (currently on hold but with very interesting results already) on converting Thomas' well-known Project Messiah shaders to XSI. Includes:

AoN_Grid , AoN_Mixer, AoN_Distance, AoN_ReplaceAlpha. See the si-community discussion for a very detailed and illustrated introduction.

local backup: AoN_XSI.zip

Discussions concerning plugins for SOFTIMAGE©
User avatar
Mootzoid
Administrator
Posts: 243
Joined: 03 Jun 2009, 18:48
Location: Germany/France
Contact:

Re: AoN_XSI Beta

Post by Mootzoid » 06 Dec 2009, 22:10

Holy Shader :-o
Incredible work, Thomas, thanks for sharing!

User avatar
ThomasHelzle
Posts: 64
Joined: 09 Jun 2009, 15:02
Location: Berlin, Germany
Contact:

Re: AoN_XSI Beta

Post by ThomasHelzle » 07 Dec 2009, 14:10

Hi Eric :-)
Thanks a lot for your support - and for the TopRow ^:)^ :ymparty:

Some more pictures of AoN_Grid in action:
AoN_Grid_7.jpg
AoN_Grid_7.jpg (129.62 KiB) Viewed 1965 times
The above shows pretty well, that a Bricks 3D structure works much better on a cube than on a torus... Not too exciting though... :-)
You can also see, that it may be hard to get the corners look right...
AoN_Grid_6.jpg
AoN_Grid_6.jpg (214.18 KiB) Viewed 1965 times
The above is a Checkerboard 3D with Smear and Mirror in all 3 axes on. Since this is a 3D texture, the structure "fills space" and so corners look natural, like if you cut something out of a very structured stone - you can always follow certain folds and threads around corners etc. This is good for Noises and deformed Grids, not so much for straight grids.
AoN_Grid_5.jpg
AoN_Grid_5.jpg (110.26 KiB) Viewed 1965 times
And this is a Weave 2D with pretty extreme Bias and Gain settings and Bump mapping active, also the Mirroring is on to get this symetrical design. In my opinion, Bias and Gain are the two most powerful settings in my shaders. Especially with the later to come noises, you can create massively different impressions with just changing those two...

TBC...

User avatar
Hirazi Blue
Administrator
Posts: 5107
Joined: 04 Jun 2009, 12:15

Re: AoN_XSI Beta

Post by Hirazi Blue » 07 Dec 2009, 17:12

Brilliant work of almost biblical proportions... :D
Stay safe, sane & healthy!

User avatar
ThomasHelzle
Posts: 64
Joined: 09 Jun 2009, 15:02
Location: Berlin, Germany
Contact:

Re: AoN_XSI Beta

Post by ThomasHelzle » 07 Dec 2009, 17:15

AoN_Grid_4.jpg
AoN_Grid_4.jpg (173.61 KiB) Viewed 1956 times
One last example for now.
This is a Ramdom Checks 3D structure, where the Rotation on the Transform tab is driven by an external texture (a pretty weird AoN_Cell using heavy Bias and Gain settings that is't available yet in the package). This usage can be interesting, since in the center of rotation you get little distortion, but the further away you get from the center the more distortion becomes visible...

But now on with Bias and Gain:

Bias is originally the mathematical function: pow(x, log(b)/log(0.5)) (Perlin and Hoffert 1989) which is similar to a Gamma correction curve ( pow(x, 1/gamma) ) but works between Bias (b) settings of almost 0.0 to almost 1.0 with 0.5 being the neutral value.
Now those power and log functions are pretty slow to compute and so there is an alternative implementation that is faster:

#define Fast_Bias(t, a) (t)/((1.0/(a) - 2.0) * (1.0 - (t)) + 1.0)

That's the macro I use for all my Bias needs, since it is my impression that this is not only faster but gives an even more smooth and beautiful result as the original - you can go extremely close to zero, like 0.0001 and you still get some slight gradient.
IMO this is a function of beauty :)

And as much as I try, I can't remember where I originally found it, ages ago...

For the less math-addict, here is what Bias actually does:
Bias.gif
Bias.gif (27.54 KiB) Viewed 1956 times
While this is not a perfect representation of the resulting curve of Bias, it is close enough to see how it works.
Like the Photoshop Curves filter you may be familiar with, it is pushing the middle tones of the texture up or down, making it brighter or darker while always keeping white as white and black as black.
Since I do all internal computation as double precision floats, you shouldn't ever be able to see any banding, no matter how extreme you go.
As you can see, an input value of 0.5 (medium grey if you want) is translated to an output of ~0.15 when Bias is set to 0.25 and to something like ~0.85 when the Bias is 0.75. So your rule of thumb is:
Bias values below 0.5 make your result darker, above 0.5 make it brighter.
It is also worth remembering that Bias and Gain should never be set to 0.0 or lower and never to 1.0 or higher, otherwise you will get bad results. But you can get as close as you want... ;)

Gain is basically two Bias curves mirrored around 0.5:
Gain.gif
Gain.gif (27.5 KiB) Viewed 1956 times
The macro I use for it is:

#define Fast_Gain(t, a) ((t) < 0.5) ?\
(t)/((1.0/(a) - 2.0) * (1.0 - 2.0*(t)) + 1.0) :\
((1.0/(a) - 2.0) * (1.0 - 2.0*(t)) - (t))/((1.0/(a) - 2.0) * (1.0 - 2.0*(t)) - 1.0)

In the above graphic you can see, that a value of 0.5 stays always the same, as does 0.0 and 1.0.
Input values below 0.5 are darkened by Gain values below 0.5 and brightened for values above 0.5. And the opposite happens for input values above 0.5. As a result, this function creates a "contrast" effect, like creating a S-curve in the Photoshop curves dialog.
Especially Gain values below 0.5 are very useful to make textures harder, more contrasted or even looking as if there is almost no smoothing at all.

TBC ... ^:)^

User avatar
ThomasHelzle
Posts: 64
Joined: 09 Jun 2009, 15:02
Location: Berlin, Germany
Contact:

Re: AoN_XSI Beta

Post by ThomasHelzle » 07 Dec 2009, 17:33

Hirazi Blue: Biblical is alright with me ;-)
But there is much more to come! :ymparty:

Ok, to fully explain the significance of Bias and Gain, let's look at an example:
The reason why there is first Bias and then Gain comes from long testing and experimenting and this combination proved to be the most useful.
Take AoN_Grid Smoothgrid for instance:
AoN_Grid_Softgrid_A.jpg
AoN_Grid_Softgrid_A.jpg (74.84 KiB) Viewed 1718 times
If you down Gain to a very low value like 0.01, you get (almost) hard dots:
AoN_Grid_Softgrid_B.jpg
AoN_Grid_Softgrid_B.jpg (85.69 KiB) Viewed 1718 times
And if you up Bias to 0.675, you get much smaller black dots, because the 0.5 center of the gradient is moved up towards brighter spaces, resulting in Gains contrast enhancement having less dark material, therefore the dark dots getting smaller...
AoN_Grid_Softgrid_C.jpg
AoN_Grid_Softgrid_C.jpg (68.28 KiB) Viewed 1718 times
Ok, I hope all this is understandable - if not, please let me know!

TBC... ^:)^

User avatar
ThomasHelzle
Posts: 64
Joined: 09 Jun 2009, 15:02
Location: Berlin, Germany
Contact:

Re: AoN_XSI Beta

Post by ThomasHelzle » 07 Dec 2009, 17:50

Continuing from the previous example, if you lower the Bias to 0.325 which darkens the texture, the black dots grow much bigger, so much in fact that they "overpower" the bright areas and now suddenly you get bright dots on black:
AoN_Grid_Softgrid_D.jpg
AoN_Grid_Softgrid_D.jpg (94.44 KiB) Viewed 1717 times
OK, on to the next Parameter: Absolut This is also one of the more significant look-changers, this is the formula in C:

x = fabs(x - 0.5)* 2.0;

Very simple: 0.5 is subtracted from the original value of x (because it was a value between 0.0 and 1.0 before, you now have a value between -0.5 and 0.5) then the absolute value of this is taken (this simply removes the "-" in front of the value) so everything is now positive values between 0.0 and 0.5. The result is then multiplied with 2.0 to get the range back to 0.0 to 1.0.
In a way, this procedure "folds" the values around their middle, creating sharp creases on former 0.5 values where before there was a smooth gradient. To continue our example above, with all settings the same, but Absolut on, you get this:
AoN_Grid_Softgrid_E.jpg
AoN_Grid_Softgrid_E.jpg (87.87 KiB) Viewed 1717 times
Now that is pretty far from the original, isn't it? :)

This is one of my favorite combinations, since it often creates very interesting variations from an original texture.

The next available Parameter is much simpler: "Invert Texture" speaks hopefully for itself. Adding it to the above sample it gives us this:
AoN_Grid_Softgrid_F.jpg
AoN_Grid_Softgrid_F.jpg (87.94 KiB) Viewed 1717 times
Okay, ran out of pictures again, so on with the next posting... ^:)^

User avatar
ThomasHelzle
Posts: 64
Joined: 09 Jun 2009, 15:02
Location: Berlin, Germany
Contact:

Re: AoN_XSI Beta

Post by ThomasHelzle » 07 Dec 2009, 18:32

While the next parameters would be "Mirror_X", "Mirror_Y" and "Mirror_Z", I will hold those back for a bit longer, since they are easier to explain when there is more irregular stuff going on.

And this leads us to "Smear".
This wasn't available in my original shaders for messiah:studio. Basically it does something that you normally do by plugging in an external additional procedural into the "Offset" input. But somehow I very often want to give textures a slight or not so slight push away from perfection and so I built it into all of the shaders as a simple means of distortion. For everything more involved, I would still recommend plugging in additional shaders since that gives you much more control.
This is what you get if you activate Smear on our previous example (I turned only Invert Texture back off so it looks more friendly :) ):
AoN_Grid_Softgrid_G.jpg
AoN_Grid_Softgrid_G.jpg (88.04 KiB) Viewed 1715 times
This is using the default settings for "Smear Amount" = 0.5 and "Smear Smoothing" set to "Smooth" which are the defaults.
Now suddenly it looks no longer like a regular grid, but much more organic.
Raising "Smear Amount" to 4 creates something that is pretty far away from the original:
AoN_Grid_Softgrid_H.jpg
AoN_Grid_Softgrid_H.jpg (90.1 KiB) Viewed 1715 times
Basically you can go as high as you want with the Smear Amount, but at one point (depending on the basic structures you use) it's internal simplicity will become obvious, so I recommend using values between 0.0 and 2 normally, but up to 8.0 you may find interesting stuff - above that, I had little luck so far ;)

And NOW we are getting back to "Mirror_X", "Mirror_Y" and "Mirror_Z" - Check this out:
AoN_Grid_Softgrid_I.jpg
AoN_Grid_Softgrid_I.jpg (93.77 KiB) Viewed 1715 times
Can you see how the patterns are mirrored from the center of the cube up and down, left and right, front and back? Here all three mirror options are active and they "fold" or "mirror" the texture around the center of the chosen coordinate system (most often the center of your object). This is not one of the major features IMO, but sometimes it creates stunning patterns that look very designish ;)

TBC... ^:)^

User avatar
ThomasHelzle
Posts: 64
Joined: 09 Jun 2009, 15:02
Location: Berlin, Germany
Contact:

Re: AoN_XSI Beta

Post by ThomasHelzle » 07 Dec 2009, 18:43

Okay, final post for today ;))

What I left out before was the setting for Smear where you can select between Linear and Smooth. This difference didn't work so well on the above example, so I took the "Streets and Rivers" preset from the presets tab.
Normally it looks like this on my 4 unit cube:
AoN_Grid_Grid_A.jpg
AoN_Grid_Grid_A.jpg (94.76 KiB) Viewed 1714 times
Maybe you can see how there are hard corners in the deformation from it using the "Linear" Smear Smoothing - compare it to this image which is using the "Smooth" setting:
AoN_Grid_Grid_B.jpg
AoN_Grid_Grid_B.jpg (95.26 KiB) Viewed 1714 times
In this latter example EVERYTHING is roundishly deformed, giving it less of a map-character.

Believe it or not, we are through :)

At least with AoN_Grid :D :)) ;)

I hope you have fun playing with this until I find the time to continue with the other shaders!

Cheers, ^:)^

Thomas Helzle

User avatar
Hirazi Blue
Administrator
Posts: 5107
Joined: 04 Jun 2009, 12:15

Re: AoN_XSI Beta

Post by Hirazi Blue » 07 Dec 2009, 21:27

Any chance of a dedicated AON_Toon shader in the near future? :ympray: =p~ ;)
Stay safe, sane & healthy!

User avatar
ThomasHelzle
Posts: 64
Joined: 09 Jun 2009, 15:02
Location: Berlin, Germany
Contact:

Re: AoN_XSI Beta

Post by ThomasHelzle » 07 Dec 2009, 21:46

Just out of interest: Do you mean the cell shading part or the ink part?

I personally never found cellshading worthwhile, since it can be done with a gradient nowadays.

Ink is another matter since this is pretty slow and annoying in XSI/MR. I normally use Lightwave for Edge rendering or if I need wireframes that show the actual mesh including ngons, not just triangles.

Some time/years ago I tried to create a contour shader for XSI, since this is a system basically already present in MR that can even output eps. But after lengthy trial and error, I finally learned that there are certain things missing in XSI to get them to work. There was a rumor that it is possible with some weird hacking, but nobody wanted to tell me how this would work.
I also got a lot of people telling me just how bad contour shaders are... :-?

So I basically gave up. Lightwave does what I need personally and Blender 2.5 with Freestyle integration looks even better :)

Ok, The short answer would have been: "no" ;)

What exactly do you have in mind? Examples?

Cheers,

Thomas

User avatar
Hirazi Blue
Administrator
Posts: 5107
Joined: 04 Jun 2009, 12:15

Re: AoN_XSI Beta

Post by Hirazi Blue » 07 Dec 2009, 22:12

Too bad... :((
I was thinking "along the lines" of an alternative to the ink shader, not the cell shading bits, as I find the current lens shader options (toon ink & cartoon) somewhat lacking... :ymsick:
Stay safe, sane & healthy!

User avatar
Rork
Posts: 1359
Joined: 09 Jul 2009, 08:59
Location: Close to The Hague, Netherlands
Contact:

Re: AoN_XSI Beta

Post by Rork » 08 Dec 2009, 10:48

Hi Thomas,

Awesome work :-bd

I'm pretty sure these shaders will end up in production on a lot of Softimage workstations :ymparty:

cheers and don't stop :)

rob
SI UI tutorials: Toolbar http://goo.gl/iYOL0l | Custom Layout http://goo.gl/6iP5xQ | RenderManager View http://goo.gl/b4ZkjQ
So long, and thanks for all the Fish!!

User avatar
eternal art
Posts: 93
Joined: 08 Jun 2009, 22:48
Location: UAE - Abu Dhabi

Re: AoN_XSI Beta

Post by eternal art » 08 Dec 2009, 23:52

thanks you very much for your effort .
3D Supervisor - Production House .

User avatar
eternal art
Posts: 93
Joined: 08 Jun 2009, 22:48
Location: UAE - Abu Dhabi

Re: AoN_XSI Beta

Post by eternal art » 08 Dec 2009, 23:58

ThomasHelzle wrote:Hi,
Installation:
Copy the folder included in this Zip to your C:\Users\Yourname\Autodesk\Softimage_2010_SP1\Addons folder or to your workgroup addons folder.
Thomas Helzle
just a note :
it doesn't work with just a copy ... (Soft 2010 x64) ? until i installed the spdls from the plugin manger .
3D Supervisor - Production House .

User avatar
ThomasHelzle
Posts: 64
Joined: 09 Jun 2009, 15:02
Location: Berlin, Germany
Contact:

Re: AoN_XSI Beta

Post by ThomasHelzle » 09 Dec 2009, 13:53

Thanks guys! ^:)^

eternal: You no longer have to explicitly install SPDLs/shaders anymore (I think since XSI 6/6.5?). I haven't done that for years ;)

I just gave it another try and first removed all the shaders by removing the AoN_XSI folder from the Addons directory.
Started XSI and they were gone from the node menu and the node tree.
Then I closed XSI, did put the folder back, started XSI and they were all there...

The only time when you have to do something more is, if you have XSI running and want to install the shaders without closing it, but in that case, you can also just copy the provided directory to your Addons folder, open your plugin manager and hit the "Update All" button on top of the PM.
Plugin_Manager.jpg
Plugin_Manager.jpg (73.74 KiB) Viewed 2055 times
Sometimes you also have to refresh your node tree in the shader tree (F7) to see the shaders in the list when somehow XSI has't updated the internal list (especially workgroups are sometimes not correctly scanned, even if XSI is freshly started).
RenderTree_NodesRefresh.jpg
RenderTree_NodesRefresh.jpg (110.27 KiB) Viewed 2055 times
In very rare cases when a shader doesn't show up, a preset file may be corrupted or missing, in that case you can right click in the plugin manager on the offending shader that doesn't show up in the node-menu and -tree and select: "Regenerate Preset". But this is not something you normally have to do, since I try to deliver the presets with the shaders.
Plugin_Manager_RegeneratePresets.jpg
Plugin_Manager_RegeneratePresets.jpg (89.81 KiB) Viewed 2055 times
As you can see on those screenshots, there are a lot more shaders to come :ymparty: (although not all of them will be available to the public, simply because they are too weird or only work in special conditions or for specific tasks).

Right now I have to concentrate on some other things for a bit, but as soon as possible I will continue with the development and releases.

Cheers, ^:)^

Thomas Helzle

User avatar
shushens
Posts: 192
Joined: 13 Jun 2009, 07:34
Skype: shushens
Location: Paderborn, Germany
Contact:

Re: AoN_XSI Beta

Post by shushens » 20 Dec 2009, 14:56

Hello Thomas. Incredible work! I have something a bit dumb to ask you. Since you have achieved such excellence with procedurals, maybe you can shed some light on the much sought after corner edge highlighting, or even better, distorted corner edge highlighting? For texturing old objects that are weathering or losing paint from the edges, such a shader would play a pivotal role.

I am not sure if that is a part of the agenda, but I thought I would bring it to your attention.

Pardon me if it is out of context.
My ill-maintained blog: http://visualdeceptions.info/blogger

Post Reply

Who is online

Users browsing this forum: No registered users and 31 guests