Creating "Spires" and Heavy Displacement (Mojo-esque)

Started by efflux, October 12, 2007, 05:53:21 AM

Previous topic - Next topic

efflux

[EDIT]

This thread has been split due to it having an inappropriate title for the change of direction in the discussion. The original section is here:

http://forums.planetside.co.uk/index.php?topic=2202.0

It was initially started by AndyWelder as a bug thread due to extreme displacement spikes being cut off at render time. Andy wanted to render extreme spikes to create grass like surfaces. Volker then posted about a problem he had with sharp spikes not rendering where he wanted to create Mojoesque type spires. He included this as an example and the discussion progressed from there:



We eventually recreated (or rather emulated because Mojoworld has sparse convolution function that can create spikes) the same technique as used in Mojoworld and a final tgd file was created. Some other ideas are in here as well and may be explored further. Thanks to Volker for solving one issue that enabled us to recreate this technique.

[/EDIT]

Off track a bit from Andy's post but it relates due to spike rendering problems.

That's great Volker. I know you have seen my render called Twisters that looks quite Mojo. All I had in that was a terrain from one fractal that had some spikes here and there and my displacements increased scale and amplitude with altitude. There is a thread somewhere on this forum about the scale increase with altitude, but I changed the graph a little - it had some nodes that were not crucial. It's not right yet though. Displacement amplitude works fine because you just manipulate the altitude output to get a suitable result back for the required amplitude but there are some problems with the scale driving by altitude in the way the different dimensions stretch that I have to solve yet.

This is kind of related to your results here but is still totally unrelated to my technique in Twisters. In this example below I used tall fake stones and sent the graph in the screenshot to the stones shader input. Ideally what we really want is a sparse convolution basis because that will get really smooth spikes, not so broken when displaced a lot but there are ways to smooth out the voronoi edges I think, at least I have definitely done that in the past (somehow) but now I can't remember exactly how I did it. Spikes are done with sparse convolution in Mojo. We need spikes that do not end it sharp points because that often ruins the displacement at the point - you can see this in my image and rendering problems occur. The compute normal is there because I displaced by lateral normalized in the displacement shader. Fake stones are convenient at this stage ot experiment being already set up to have a different shader. It's still X,Y,Z (X and Z are multiplied as you can see in the graph and thus stretched out) related though which is not entirely what I want but like I say there are some problems with using altitude to change the scale anyway - which is really what I wanted rather than just stretching in X,Y or Z. I will get my head around that one way or another. Once I get it to something better than has been previously discussed I will post about it.



This is slightly unrelated to Andy's initial post though because he was talking about actually rendering the spikes. I like that idea a lot but for our rock spires we want to actually avoid such sharp spikes so that it all renders and with less distorted displacements at the point.

efflux

Also, in Mojoworld the technique is often to have a fatter spike and displace inwards but when I've tried this in TG2 I ended up with a lot of artifacts.

efflux

Another point is that's it's almost certain Matt will implement something that will be perfect for these spires because I'm sure TG2 will eventually have a multiple crater shader. Inverted, this wold provide multiple spires but smooth.

efflux

CORRECTION.

In the graph above, although I multiplied the dimensions, I actually multiplied by 0.1. It is divided.

New idea for spikes coming in next post.

efflux

I don't know how you got your spikes Volker, but here is a way I just came up with:

I clamped the perlin function by 0.4 to 1.


efflux

I'm on a roll. With some variations on the first graph I posted above, plugged into a surface layer to displace rather than fake stones. For example the first picture uses a perlin instead of the voronoi. Some masking will be needed from the spikes now. Possibilities are wild. With some maths functions we could create forrests of spiraling towers or anything imaginable but I'm not the maths head. It will take me some time to achieve that. The power of TG2 rolls on.

Man, I should never have gone near TG2 again. I stopped because I have other work to finish first before delving into this app fully. Now I have plans for adding this into a planet and can't stop.


efflux

We should start a new thread for this. This one is wrong for the discussion.

Volker Harun

I am very short on time ... I really appreciate your I/O!

Attached is my scene - be sure to generate the heightfield ,-)

efflux

I should be short on time as well Volker but I need to discipline myself to not spend so much time with TG2 until I actually have the time. I will persevere on this angle a bit then give TG2 a rest for a while again.

efflux

By the way, Mojo cuts off extreme displacements as well but in slightly different ways. Fatter displacements do not actually get cut off in TG2 as they do in Mojo, only very spikey ones. We just need to find a technique similar to way things are done in Mojo to get these towers i.e. not so pointed forms.

Volker Harun

When using my scene file - take the spike-fractals and delete the displacement shader.
Those spike fractals could then be used as blending-shader for a terrain-fractal.

efflux

#11
OK. I'm looking into it. I have a blending problem with my technique - which is now spikes added in to a full planet previously created. I'm trying to see how your's works.

efflux

Volker. I looked at your file and I see the surfaces are distributed by slope constraints and you have terrain normal selected. With some of my terrain techniques this is going to be a problem with the way I want to include spire like structures.

Does anybody know what the difference is between the nodes get normal, get normal in geometry and get normal in texture? Same goes for get position. This may be of no relevance to the topic here but I need to know first.

Volker Harun

I wanted the spikes to be covered by the two shaders completely. Using 'terrain final' would shade after the spikes' lateral displacements.
I have a few hours now ... and start playing ,-) And in fact, your image made me very jealous and eager ;)

efflux

Hi Volker.

It's starting to drive me crazy that we don't have a full explanation of the nodes. It's actually quite hard for me to explain what it is I want to do here. I need to be able to mask the spires but the problem is getting the mask as a surface before a displacement. How in hell do we do this? If the mask is in the present world position or plain surface position then our later displaced surfaces will break through it if you can understand what I mean.