Planetside Software Forums

General => Image Sharing => Topic started by: efflux on October 18, 2007, 03:06:18 PM

Title: Gradient Hacks
Post by: efflux on October 18, 2007, 03:06:18 PM
(http://img232.imageshack.us/img232/1152/painting10eg7.jpg)

I started work on some procedural textures with colour gradients. This is just a rough test render with a very basic gradient. Imagine multiple gradients! I've actually got a better hack than the one used here. All will be revealed after I play.  ;)

The hacks are good because they don't involve maths functions so easy to change the number of colours. A proper gradient would be cool but difficult, although we just need effects that work. I haven't worked out a true maths gradient yet.

This will be cool for realistic rock textures as well.
Title: Re: Gradient Hacks
Post by: dhavalmistry on October 18, 2007, 03:22:22 PM
talking of gradients...is it possible to apply a linear gradient that goes from left to right and covers everything on it way??.....

nice work here....
Title: Re: Gradient Hacks
Post by: rcallicotte on October 18, 2007, 03:48:24 PM
This is the 60s, no doubt.   :P

Let us see what happens and what you have time to tell us will be interesting.
Title: Re: Gradient Hacks
Post by: efflux on October 18, 2007, 03:58:23 PM
I'm tweaking around with what I think is the best idea.

dhavalmistry. If you mean do the colours gradually blend, then yes they do. That's the trouble with creating a gradient, getting a smooth change across the colours. Ideally it needs maths functions but I've hacked it somewhat.
Title: Re: Gradient Hacks
Post by: dhavalmistry on October 18, 2007, 04:01:21 PM
can it be masked???.....


good job!
Title: Re: Gradient Hacks
Post by: efflux on October 18, 2007, 04:09:13 PM
How do you mean by masked?
Title: Re: Gradient Hacks
Post by: efflux on October 18, 2007, 05:25:23 PM
Next hack tested:

(http://img20.imageshack.us/img20/9069/painting20zp6.jpg)
Title: Re: Gradient Hacks
Post by: dhavalmistry on October 18, 2007, 06:42:22 PM
Quote from: efflux on October 18, 2007, 04:09:13 PM
How do you mean by masked?

I mean apply the gradient to different regions of the scene and limiting it to surrounding areas.....
Title: Re: Gradient Hacks
Post by: efflux on October 18, 2007, 07:14:20 PM
You can use anything that outputs colour for masks so that's no problem. You can do anything in the node graph. Even split the colours up for different masks.

This is my next test. Blending two gradients:

(http://img206.imageshack.us/img206/174/painting30wi7.jpg)

Below is a simple gradient hack for colours in a tgd. I can't just show you a screenshot. You wont see how it's connected. Basically, I just mixed all the colours together with another colour. It's default set to black. This doesn't provide good control of saturation in the blending zones so I just stuck a colour saturation node after the graph and set it to 2. You can play around with that setting. What I like in this hack is that you can mess around with the blending colour between each colour. Adjust the colour offset of the fractal to change how the fractal controls the colour. Basically, it's a hack that gets you gradients beyond two colours but I like the creativity in being able to get strange gradient graphs. It has limitations but the cool thing is that it's easy to add more nodes of colours. The fractal is also controlling displacement in that surface layer.

There is no excuse now for not getting more interesting rock colours  8)

I want to add some functions now to for example, limit and repeat the gradient.
Title: Re: Gradient Hacks
Post by: dhavalmistry on October 18, 2007, 07:20:36 PM
thanx will check it out when I get home.....
Title: Re: Gradient Hacks
Post by: sjefen on October 18, 2007, 08:40:52 PM
This is very special alright. Lots of colours. Cool.
Title: Re: Gradient Hacks
Post by: efflux on October 18, 2007, 10:52:02 PM
There is no end to the beautiful colour patterns. You can't do this with two colour gradients:

(http://img148.imageshack.us/img148/7172/painting40hr5.jpg)
Title: Re: Gradient Hacks
Post by: old_blaggard on October 18, 2007, 11:12:23 PM
Wow, this is beautiful!  Thanks for sharing.
Title: Re: Gradient Hacks
Post by: dhavalmistry on October 18, 2007, 11:15:50 PM
DAMN!!.....its like a maze of functions in here......

can we get a simpler version please???.....gradient of 2 colors maybe
Title: Re: Gradient Hacks
Post by: efflux on October 18, 2007, 11:26:38 PM
A simpler version would be just using a power fractal's two colour gradient but that's limiting. You can't get all the striations along the fractal shapes and interesting blends. That's why I'm experimenting with this. If you tweak all the Constant colour nodes, the Constant scalar attached to the Adjust saturation colour and the Colour offset inside the fractal node then you will get some intersting results. We have no proper hard coded colour gradient so you have play with graphs. Also, these gradients could be used to drive displacements but I haven't tried that yet.
Title: Re: Gradient Hacks
Post by: efflux on October 18, 2007, 11:45:44 PM
You have to bear in mind that the graph in the file I supplied is a creative gradient. It does not simply blend all the colours like a standard gradient which is not so easy to create anyway and not easy to change. I'm trying to find interesting ways of blending colours. If you study the graph you will see what's going on. I could create a more standard gradient with these hacks but it would never be right anyway so I'm playing with odd things.
Title: Re: Gradient Hacks
Post by: mogn on October 19, 2007, 04:12:34 AM
In the Node Reference you find:

Mix colour mixes colours on a component-wise basis. The Mix controller can be either a colour or a scalar:

Output.red = Input.red and Input 2.red mixed by the Mix controller's red value
Output.green = Input.green and Input 2.green mixed by the Mix controller's green value
Output.blue = Input.blue and Input 2.blue mixed by the Mix controller's blue value
Title: Re: Gradient Hacks
Post by: Volker Harun on October 19, 2007, 04:20:56 AM
This Rocks!
Title: Re: Gradient Hacks
Post by: cyphyr on October 19, 2007, 06:52:41 AM
My brain hurts, I'm confused and I don't understand. The world has gone all psychedelic and I don't know why. Did someone spike my coffee?
Richard
Title: Re: Gradient Hacks
Post by: efflux on October 19, 2007, 10:29:54 AM
Awesome mogn  ;D.

I never thought of that one.

Using this fact (we can blend using a fractals two colour gradient), we can blend the area between each colour in the gradient with a fractal but the main fractal is still controlling the whole shape. Also, try sending fractals to the saturation control. Another test image coming next.

You're idea doesn't follow the shape of one fractal though mogn, for lots of colours but blended with other experiments it is cool.
Title: Re: Gradient Hacks
Post by: efflux on October 19, 2007, 05:21:10 PM
I messed with the idea of plugging fractals into the mixing of each colour in the gradient. Then got into some sine functions:

(http://img151.imageshack.us/img151/4234/paintings50rh6.jpg)
Title: Re: Gradient Hacks
Post by: Volker Harun on October 19, 2007, 06:44:15 PM
I am into it ... do not tell my wife, but! ,-)

Edit: Okay, using mogn's effective setup. Those Powerfractals are doing some displacements, too.
Nice effect is to plug a powerfractal into the saturation function for some differences in saturation.

I am going to love it!
Title: Re: Gradient Hacks
Post by: efflux on October 19, 2007, 07:04:31 PM
It's funny. You start doing one thing that leads to something completely different. I started this planet called Sines. Supposed to be further exploring the sine functions you see above. Now "Sines" doesn't have a single sine function in it but comprises geometric grids eveywhere.
Title: Re: Gradient Hacks
Post by: Volker Harun on October 20, 2007, 03:44:06 PM
I think the Merge shader is more versatile than the mix colour node.
Title: Re: Gradient Hacks
Post by: efflux on October 20, 2007, 06:36:05 PM
Yes, I've used the merge shader a few times. I used it to blend different gradients together since you have more blending modes (but even more would be nice). Wait until you see my next planet. The first one utilizing multiple colour gradients. You will see why this is at the top of my list for being properly hard coded in. Don't hold your breath though. This planet is a biggie. The biggest thing I've attempted so far. Hundreds of nodes. A lot to do. I need to distort the sines more. We have no sine basis in a fractal so limitations there. I started sines then went geometric cityscape shapes, now I have grids of sine towers covered in psychedelic gradients. It's crazy. No WIP shots. I want to shock you with this one.  :o
Title: Re: Gradient Hacks
Post by: Volker Harun on October 20, 2007, 07:03:19 PM
I am looking forward to it.

I swapped the Scale Vector on top of the sine-functions with a powerfractal which is very nice, to get some curves and different sizes. And finally managed to paint the patches between those sines differently - always wanted to do this ,-)
It will be a very simple and different looking render ...

After that I'll need a break, but'll watch eagerly.
Title: Re: Gradient Hacks
Post by: efflux on October 20, 2007, 07:47:34 PM
This is the kind of thing I'm thinking of. Mostly sine functions:

http://armands.pandromeda.com/MojoWorlds06/SineWarriors-ReadyForFight.jpg

We have a limitation in that we don't get sine as a basis in a fractal for all the octaves but we should be able to distort. Any time I post a link to an example of crazy functions or simply great creative use of functions, it will usually be Armands the master. It's an interesting experiment to see how far we can go it TG2 which is quite FAR.

I love sines. I think the flowing repetitious nature is beautiful.

I was trying to work out how to explain my city grid thing in simple terms. I don't want to give descriptions or screenshot of total complexity. I'll get back to that one soon though.
Title: Re: Gradient Hacks
Post by: efflux on October 20, 2007, 07:51:02 PM
I must admit I haven't actually tried distorting the sines much yet. My planet is very regulated. I'm hoping to pull distorting tricks out the hat later.
Title: Re: Gradient Hacks
Post by: efflux on October 20, 2007, 09:02:27 PM
Check this out:

http://www.renderosity.com/mod/gallery/media/folder_155/file_1543976.jpg

It's by Alex_NICO. A Mojo artist who is still doing interesting things. In fact in my opinion the only artist left who, when you see his posts, gives you something truly interesting and unique with Mojo. This is pure sine functions but volumetric. The volumetric bit is cool but not crucial but you see that Mojo has a lot of power despite very poor technical limits on actually using it (UI hell). Our main problem here is that we can not get all those octaves of sine from a fractal. However it has been said that more basis functions will be added for fractal control in TG2. Here's hoping.
Title: Re: Gradient Hacks
Post by: Cyber-Angel on October 21, 2007, 12:20:09 AM
Efflux,

You know the outstanding issues as far as needed features that TG2 needs as far as bias functions and so forth that are not in TG2 at this time better than most, have you considered posting formal feature requests for them to see weather or not they'd be possible to included at some point down the road?

Regards to you.

Cyber-Angel     
Title: Re: Gradient Hacks
Post by: Oshyan on October 21, 2007, 12:30:00 AM
There are plenty of feature requests for additional basis functions and we've been well aware of that lack since before the Technology Preview release. More have not been implemented yet for 2 reasons. First is simply a lack of time and the fact that other things take much greater precedence (e.g. making the renderer faster, multi-threaded, and more stable). Second is that TG2 is focused on realistic landscapes and the vast majority of other functions besides those currently available are simply not that useful for realistic terrain or texturing. They may be implemented at some point, but when considering the addition of new fractals and other generators we are generally looking at specific real-world uses for representing natural phenomena. It is intended that any such generator be fairly flexible to allow for things like the amazing "spires" work of Efflux and Volker, but still the implementation focus is on realistic, "real-world" results.

If nothing else the eventual availability of the SDK should allow others to add as many interesting basis function as they desire.

- Oshyan
Title: Re: Gradient Hacks
Post by: efflux on October 21, 2007, 12:50:08 AM
That's what I guessed. Matt will know what basis functions to give priority. Voronoi will probably be the first because it provides beautiful rock surfaces. I'm just hoping he considers sine at some point but real world type functions can have other uses. Sparse convolution was considered a real world realistic terrain function but gives you craters and spires as well which is pretty much all it ended up being used for. Sine is one basis function that gives pretty abstract results but it depends, you might want to create tiles or paving or something with it. It's pretty good for those things. The more real world basis functions you add the more fantastical results you can have as well. That's why Mojo can achieve such weirdness. The ones more suitable for real world results give the richest results no matter if used to create rocks or whatever else odd things.