Heightfield as Crater Shader

Started by WAS, November 04, 2015, 02:44:42 PM

Previous topic - Next topic

fleetwood

Regarding ejection material, this radial pattern by DandelO can be a start.

http://www.planetside.co.uk/forums/index.php/topic,15364.0.html

WAS

Quote from: fleetwood on November 06, 2015, 01:49:39 PM
Regarding ejection material, this radial pattern by DandelO can be a start.

http://www.planetside.co.uk/forums/index.php/topic,15364.0.html

This guy just crawls out of the rocks somewhere in the forums and just likes points me to the solution to a problem I have had for like 5 years... You sir, are my new hero. I think this may work here as well. Screen grab soon.

AP

I'm keeping an eye closely here on this thread.

WAS

#18
We definitely seem to be on to something here people. :) The only thing missing is stratification of the mound which I haven't figured out how to do.




Dune

I remember vaguely this setup works on just one location, but I might be wrong.

WAS

#20
Quote from: Dune on November 07, 2015, 02:47:26 AM
I remember vaguely this setup works on just one location, but I might be wrong.

As with the current limitations of TG with no position inputs on shaders. As mentioned before you could use the Transform Input Shader but the results may not be desired. I have yet to try it on this. *Edit* I tried below the crater shader and to no avail that I could tell through the preview (it may not work on the SSS which may need my new coordinates.) Seems everything is position-able but the radial lines.

AP

Stratification of the mound can be solved using a Strata and outcrops shader.

mogn

#22
You can construct a radial shader in the following way:

measure the angle to the current point: v = Atan2(z, x)
q = PI/18 (10 degrees)
s = modulus(v, q)             create 18 slices of 10 degrees
p = v-s                            the low angle of each slice (N*q)
in this tgc p is used as hue input of a build hsv, and the x and z is prenoised:
X = x + noise(z)
Z = z + noise(x)

If you rotate the xz coordinate system p radians an select one of the slices e.g p = 0
and make a procedural construct contained in that slice, the construct is mirrored
in all the slices.


Dune

I was hoping you would chime in, mogn  ;) Is this applicable at different locations, say random, or bound to procedural dots?

AP

I'm still investigating function nodes but that one went over my head.

mogn

Quote from: Dune on November 07, 2015, 08:04:13 AM
I was hoping you would chime in, mogn  ;) Is this applicable at different locations, say random, or bound to procedural dots?

Just subtract a position vector E.g. [300, 0, 200] from the get vector. This vector can be random.

Dune

I understand, but I actually meant if it could be reproduced to more than one location, like a crater field. I guess not. Basically what is needed is random 'dots' to begin with and radiation from those dots.

fleetwood

#27
 
With ejection of material it makes more sense to me that the radial pattern used be in the form of a radiating multi pointed star rather than like a slice of  pie , so that you get a ray structure which mimics the amount of material ejected which would tend to be less and as you move away from the impact.

   

WAS

#28
Quote from: fleetwood on November 07, 2015, 11:44:36 AM

With ejection of material it makes more sense to me that the radial pattern used be in the form of a radiating multi pointed star rather than like a slice of  pie , so that you get a ray structure which mimics the amount of material ejected which would tend to be less and as you move away from the impact.


Yeah it's definitely in a more ray burst structure. Strata and Outcrops will not work as desired on the mound as it does not create true stratified rock. In fact all it really is is actually a "Layer and Outcrops" or "Sediment and Outcrops" function. Stratification is characterized by jetting out from the outcrops. This can be achieved by using functions like a diff scallar noise stretched to create the layers, and displace lateral for stratification. For example, canyons are mainly sedimentary rock and outcrops, not usually stratified rock which is seen more on ocean shores or wind-stricken slopes.



Changing source seems easy enough to subtract from get position (vectors). This is again a PRIME example of where Position Functions would be prime. My main XYZ node could filter in to all the SSS shaders and be able to move the whole crater through one node.



Full position Change


j meyer

Quote from: Dune on November 07, 2015, 10:44:00 AM
I understand, but I actually meant if it could be reproduced to more than one location, like a crater field. I guess not. Basically what is needed is random 'dots' to begin with and radiation from those dots.

It's possible Ulco,you just have to replace the "get postion..." by a "Get pos in tex" as usual
in the innards of mogn's setup.And instead of using the input of the "transform merge sh"
you have to combine both iterations otherwise,for instance with a "mix colour" as shown.

[attach=1]

For some reason piping it through the "Transform merge" doesn't work occasionally,that got
me to use other combining methods earlier on btw.
No idea why,though.