Heightfield as Crater Shader

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

Previous topic - Next topic

WAS

Just a simple test using a heightfield for the craters rim shader for some simulation of ejection. It looks alright, but does need a lot more work. It'd probably be better mask out only the cracks to control the rim height a lot easier and use a image map shader.



The Node Network



Using a image map instead of a heightfield would probably allow you to pop it into Photoshop and duplicate the layer on Multiply and rotate it to add even more ejection lines. You can see I attempted to duplicate the displacement to use and rotate but the transform input was not working on the captured displacement.



Also, extracting the lines and getting rid of the sloping would allow  for larger ejection area as seen in the image below



Just some testing I've been doing.

Oshyan

It's actually a pretty nice effect, better for a weathered crater on Earth than e.g. the moon though. With some different erosion settings you might get finer lines that could be used better for the long radials of ejecta. I also suspect it's possible to create a radial line function that could then be warped to handle this without the dependence on erosion and limited resolution of heightfields...

- Oshyan

AP

That looks fairly nice. Now we need to duplicate it all over the surface. I think the rim needs a hard rim for the top mixed with a larger soft rim outward. Maybe the ejecta can be added to a Merge shader using Subtract connected to the soft rim. The blend should allow the impression of a longer ejecta i suspect. Using a Colour adjust shader might help.

Has anyone ever tried a radial line function? I would very much like to see that in action.

WAS

It'd be nice to get the erosion effect without the mound, but without a mound, it's hard to erode anything. Little annoying as I favor terragens crater height settings. And yes population is the trick, that's why I wish there was much simple position function (which would make animation that much easier and smoother as apposed to transforming the textures) to pipe in dynamic positions which can also be piped into your SSS masks, etc.

AP

What about something called a Shader populator? You define and build a shader in a square area then scatter it much like the current Populator now.

Dune

Now that would be a cool addition, a shader populator, even if you would use a simple image map to be spread (and warped/masked) for these ejecta. I believe mogn once made a starburst blue node setup a long time ago, but I can't recall whether that could be randomized.

AP

#6
Yes, you can type in the area size you want to capture and scatter it about. The capture area could behave like the Simple shape shader so there are at least simple options to soften the edges, alter the shape, change the capture area location.

In fact, imagine using the captured area being stored in memory and porting it's footprint over the the Painted shader then you can paint the captured Shader information all over your terrain or anything else.

billhd

I have yet to get a good way to have radial ejecta patterns procedurally, but can generate a variety of crater types using only the voronoi setting of the PF combined with other PFs.  More efficient than the solitary crater shader (though there are possibilities for multiples of the crater shader using masked arrays). There are many setting combos of voronoi PF that can yield good results.   A couple views attached in the screenshot.  WIPs - for instance I need better-distinguished representations of highland vs. mare.

I use lunar-like settings to expand my grasp of TG (really mostly PF-based), have dabbled with other appearances such as Mars. I had visited Arizona and started trying to reproduce the plants and rocks, decided technique development is easier if I concentrated on mostly b&w rocks and landforms for starters, move to Earth later.  I have a reasonable grasp of getting the surface up close and wound up incrementally working a multi scale model of a moonlike world from two different scales, close up and far away, so I'm converging on the middle now.  I suspect that for Tycho-type rays I will use the heightfield technique.

Looking through the solar system, the work is cut out as many craters are noncircular with rilles, terraces central peaks or craters, rim craters and all manner of blobby and swirly forms. The hard challenge is to reflect the variety of what we see.  Now somebody tell me how an impact makes polygons (take a look at Ceres -http://dawn.jpl.nasa.gov/multimedia/images/image-detail.html?id=PIA19908).

WAS

Quote from: billhd on November 05, 2015, 10:35:31 AM
I have yet to get a good way to have radial ejecta patterns procedurally, but can generate a variety of crater types using only the voronoi setting of the PF combined with other PFs.  More efficient than the solitary crater shader (though there are possibilities for multiples of the crater shader using masked arrays). There are many setting combos of voronoi PF that can yield good results.   A couple views attached in the screenshot.  WIPs - for instance I need better-distinguished representations of highland vs. mare.

I use lunar-like settings to expand my grasp of TG (really mostly PF-based), have dabbled with other appearances such as Mars. I had visited Arizona and started trying to reproduce the plants and rocks, decided technique development is easier if I concentrated on mostly b&w rocks and landforms for starters, move to Earth later.  I have a reasonable grasp of getting the surface up close and wound up incrementally working a multi scale model of a moonlike world from two different scales, close up and far away, so I'm converging on the middle now.  I suspect that for Tycho-type rays I will use the heightfield technique.

Looking through the solar system, the work is cut out as many craters are noncircular with rilles, terraces central peaks or craters, rim craters and all manner of blobby and swirly forms. The hard challenge is to reflect the variety of what we see.  Now somebody tell me how an impact makes polygons (take a look at Ceres -http://dawn.jpl.nasa.gov/multimedia/images/image-detail.html?id=PIA19908).

Those are really nice, especially like the second one. And yeah it really is hard to randomize the placement, and design of crator without not coming off unnatural.

Quote from: Oshyan on November 04, 2015, 02:59:41 PM
It's actually a pretty nice effect, better for a weathered crater on Earth than e.g. the moon though. With some different erosion settings you might get finer lines that could be used better for the long radials of ejecta. I also suspect it's possible to create a radial line function that could then be warped to handle this without the dependence on erosion and limited resolution of heightfields...

- Oshyan

It definitely looks better in a earth-type scene.


Matt

#9
There is a Shader Array but it doesn't have any randomisation options yet. Perhaps with enough Shader Arrays you could get the results to appear random enough.

http://planetside.co.uk/wiki/index.php?title=Shader_Array

Matt
Just because milk is white doesn't mean that clouds are made of milk.

AP

It looks very nice but yes, the missing ejecta and the largest dark patches could use a bit of warping to break up the smooth circular look.

AP

Quote from: Matt on November 05, 2015, 09:39:59 PM
There is a Shader Array but it doesn't have any randomisation options yet. Perhaps with enough Shader Arrays you could get the results to appear random enough.

http://planetside.co.uk/wiki/index.php?title=Shader_Array

Matt

Randomization would be a life saver. It would be too many Shader arrays in this case. It would have been a similar issue when i wanted to duplicate Simple shape shaders. For an older project, it would have taken dozens of them. A huge node mess and rather time consuming.

Dune

#12
Maybe if you stack the arrays, the count goes up exponentially. A little large scale warp over it.... but I don't think you can keep the nice round shapes then  :(

billhd

Too many shader arrays and masks, and we get slowdown, which is why procedural methods with PF are good.  WAS, that individual crater is looking real good, reminds me of Barringer Crater in AZ. To match your pic (which I think is a crater on Mercury) better, may I suggest increasing the rim setting quite a bit. Also you may consider two crater shaders in the same spot, one for the main crater, matching the main crater size, using its rim setting set just a bit bigger than the crater itself for the very tight local rim; and one shader for the radial ejecta features with a zero height for the crater and small height for the extended ejecta features.  The main crater is terraced, some masked strata PF (try two masked and merged with different settings for strata spacing and plateau buildup) will work for achieving that.   

A thought related to arrays - would it be possible, Planetside, to have arrays that can conform to spheres and cylinders - better yet, arbitrary object surface conformation?  For instance to locate vortex shaders on a squashed sphere to simulate a jovian planet.  And certainly a randomization capability, as Matt mentioned, would be nice.  Something similar to the way Wings3D allows vertex randomization on a mesh.

WAS

Yeah, I can't even use one large shader array on 4GB RAM.

I do find it very puzzeling that a shader array at 100x100 will kill TG for me making rocks, but yet a image map creating the same image from a PS image array will work just fine.

I think the Shader Array in general need a lot of work and optimization. For example, combining the whole shader at the end into a simple image map would apparently free up all that slowdown as the same count and size in a image map works fine.