Planetside Software Forums

General => Terragen Discussion => Topic started by: oggyb on December 22, 2006, 12:02:32 PM

Title: Twist and Shear
Post by: oggyb on December 22, 2006, 12:02:32 PM
When I've used this shader so far I've only been able to get it to bend in one direction.  What should I do to make it wobble all over the place?

I've tried layering them with different directionality but this doesn't seem to work.

Thanks.
Matt.
Title: Re: Twist and Shear
Post by: oggyb on December 22, 2006, 06:25:20 PM
nobody?
Title: Re: Twist and Shear
Post by: efflux on December 22, 2006, 06:41:14 PM
I don't think you can do this because it will simply pull one way. It's one of the reasons I want to get deeper into TG with function nodes but I'm having problems with that. The TG2 UI is excellent. Very simple and I think it wont be long before people start to want to go further which your query is an example of. At the moment I'm after more info about why I can't see internal networks.
Title: Re: Twist and Shear
Post by: Tangled-Universe on December 22, 2006, 06:55:22 PM
I'm also not able to see internal networks  ???
I'm wondering what I'm doing wrong, no matter which node I try (I know some don't have internal networks, like fake stone shader), it never shows shows up...
Anybody a guess?

TIA

Martin
Title: Re: Twist and Shear
Post by: Oshyan on December 22, 2006, 06:58:56 PM
Twist and Shear is a particular displacement shader designed to displace the terrain in one direction. To get more control over lateral displacement use a Redirect Shader and plug your displacement shader (a Power Fractal for example) into the input of the axis which you want displacement to be on. Plugging it into X and Z only will cause lateral but not vertical displacement. You control the strength and other aspects of the displacement in your displacement source shader, e.g. Power Fractal.

- Oshyan
Title: Re: Twist and Shear
Post by: oggyb on December 22, 2006, 07:02:18 PM
Thanks a lot Oshyan, I'll try that now.
Title: Re: Twist and Shear
Post by: efflux on December 22, 2006, 07:40:22 PM
Thanks JavaJones (or Oshyan as I now see your name is). Thats a cool technique but what if we want the displacement to be relevant to planet surface (altitude) rather than X,Y,Z?

Also, what about this internal networks thing? There is mention on another thread of seeing the internal network of a fake stones shader but I can't see any internal networks of any shaders. I'm still using the free version. I was kind of holding off a bit from moving to the Deep version because of crashes but I'm learning to just keep saving.  It seems to be UI related. I just lose UI control and TG2 freezes up or suddenly closes. I have to keep booting my PC. The Mac version doesn't seem so bad. I want to experiment a bit to see how function nodes can work. We have a tremendous amount of control in Mojo with nodes so this is what interests me about TG because the rest of TG is better than Mojo except that we could do with a few more fractals and a curve graph node. I'm guessing those features will come in time.
Title: Re: Twist and Shear
Post by: MeltingIce on December 22, 2006, 08:00:12 PM
You could always try using a bunch of heightfields if you are close enough to the terrain and apply different shear shaders to each of them.  Just an easier way to go about doing it, you might not get as good results though as Oshyan's method.
Title: Re: Twist and Shear
Post by: Oshyan on December 22, 2006, 08:10:07 PM
Efflux there are no internal nodes in the Fake Stones. I think someone got confused. ;)

There are no limitations in the free version as far as the node network is concerned, so you should have access to the internal networks just fine. Relatively speaking there are actually quite few nodes with internal networks. To test if it's working for you try adding an Object or Population. Both have internal networks. Right-click the node in the network view and go to Internal Network or press the internal network button next to the name of the node when you are viewing its settings panel.

If you want to just restrict displacement to certain slopes or altitudes you can use a Distribution Shader as a Blend Shader for the displacement node.

- Oshyan
Title: Re: Twist and Shear
Post by: efflux on December 22, 2006, 08:30:43 PM
OK Oshyan. That confused me on the other thread. It seems to work as you say.

Thanks a lot! I've got that now with the distribution shader. That has to be the only shader I never tested. There is another way in Mojo which is maybe going too far here but in this image:

(http://img144.imageshack.us/img144/6541/mat4ct5.jpg)

I got values of displacement and largest feature size in one material to increase (or decrease displacement in Mojo's case ::) - just one of the many problems) in value with height by adding output from an altitude node. Mojo has the curve graph so I was able to have the values modulate about as well. We don't have the curve graph in TG2 but we have enough to play with anyway. It's things like this that makes me wonder how much under the hood of TG2 I can get.
Title: Re: Twist and Shear
Post by: efflux on December 22, 2006, 08:53:57 PM
Just to explain further my comment about Mojo. The land materials displace on an inverse orientation from water and objects. You have to displace by negative values to displace outwards. So your land displacements are screwed up for use on objects and water without reversing the displacement orientation. Nobody seems to think it's a problem ???
Title: Re: Twist and Shear
Post by: efflux on December 22, 2006, 11:29:04 PM
oggyb.

I'm experimenting with the distribution shader to get overhangs all around. It's tricky to build a planet this way and it's the same in Mojoworld because if the underlying terrain has a lot of roughness or small feature size then when displaced a lot in all directions, the mesh gets in a mess. In that extreme Mojoworld example, the underlying terrain is very smooth so it pulls out more smoothly but it's still a bit messy because it's so extreme and best avoided to that extreme. However if you can displace the whole terrain out without using a fractal you can get smoother results (haven't tried this in TG2 yet). The simple twisting or shearing of the terrain in one direction stops the mesh all clashing. It creates nicer looking results.

By the way I wish we could get spiky terrain like that Mojoworld example but with full planet fractals. It's sparse convolution fractal with a curve applied. Sparse convolution would not be totally necessary but a curve graph node would definitely be the best addition to TG2 possible in my opinion.

My PC has seized up again. I know TG2 is not finished yet but unfortunately it's the most unstable app I have ever used.
Title: Re: Twist and Shear
Post by: Oshyan on December 23, 2006, 02:21:18 AM
Yeah, I understand your frustration. It's doubly so for us because none of this showed up in alpha testing, and we do have a fairly good-sized test group. But all this extreme and random instability was not seen before release. It seems like there may have been some recent changes that are at the root of some of these issues, so perhaps it was just a case of lack of time to test everything fully. But it will get sorted out, of that you can be sure.

As far as the trickiness of displacements as regards roughness and "out of control geometry", I think this is just one of the issues that has to be wrestled with. But we definitely want to make it easier to create these interesting, other-worldly terrains and shapes and development time will go into this in the future. In the meantime play around with the Compute Terrain/Compute Normal settings - Patch Size, Smoothing, etc. and you may get some interesting results. There is a good amount of power in there already and the end product will have even more.

I think Mojo now in 3rd edition has had some time to mature and really focus on exposing the engine's power. Over time I think we'll largely eclipse Mojo's capability, but I imagine there are things Mojo can do that TG2 might not be able to for a while.

- Oshyan
Title: Re: Twist and Shear
Post by: efflux on December 23, 2006, 02:41:57 AM
OK.

I took things to extreme using the distribution shader and displacing the higher area which actually has no fractal just a displacement shader set to lateral only with a constant attached and I messed with the displacement shaders multiplier. The terrain was smooth so as to avoid problem areas but you can still see some. I'm just testing to extreme and I know oggyb probably wants realistic stuff but you could just tame it down and add more roughness etc.

(http://img80.imageshack.us/img80/4154/terrain90je7.jpg)
Title: Re: Twist and Shear
Post by: Oshyan on December 23, 2006, 03:39:58 AM
Wow, that's really cool looking. Unlike anything I've seen from TG2 so far. Maybe not realistic, but unique, and that's good! :)

- Oshyan
Title: Re: Twist and Shear
Post by: oggyb on December 23, 2006, 07:01:05 AM
Quote from: efflux on December 23, 2006, 02:41:57 AM
OK.

I took things to extreme using the distribution shader and displacing the higher area which actually has no fractal just a displacement shader set to lateral only with a constant attached and I messed with the displacement shaders multiplier. The terrain was smooth so as to avoid problem areas but you can still see some. I'm just testing to extreme and I know oggyb probably wants realistic stuff but you could just tame it down and add more roughness etc.

(http://img80.imageshack.us/img80/4154/terrain90je7.jpg)

That's really beautiful efflux.  Nice work!  Thanks for taking the time to update this thread with stuff :)
Title: Re: Twist and Shear
Post by: efflux on December 24, 2006, 12:53:19 AM
I'm glad you like it and I hope my brief explanation can lead to some others trying a few things here. I know for example with heightfields it is possible to get more spiky terrain using curve vertical so there are some interesting possibilities for creating totem like structures but a curve graph node would be a brilliant addition for all sorts of possibilities. Coming from Mojoworld, which can create all sorts of weirdness, I am interested in how far TG2 can be stretched. There are some things missing in TG which limits things but I prefer the state TG2 is in compared to Mojoworld. TG2 has no faults in the way things have been designed. It's easy to understand. Pandromeda have a real challenge on their hands now to make Mojoworld easier. Who knows, Mojoworld 4 may be better than TG2 but the competition will be very healthy for both parties. I will be using both programs.

I wish I had more time to experiment further but I'm sure other users will start to push what can be done in very quick time. Next year I aim to put a whole lot more time into computer graphics and TG2 completely changes what I can do so keep up the good work. It is way beyond what I expected.
Title: Re: Twist and Shear
Post by: efflux on December 24, 2006, 01:01:00 AM
Just another point to add here. You can create spikes with the crater shader by inverting the depth. You could of course bring in simple meshes and displace to get mushroom effects.
Title: Re: Twist and Shear
Post by: Oshyan on December 24, 2006, 01:02:04 AM
Sounds good! I am very glad to hear this kind of feedback from Mojo users. There's no doubt that Mojo forged some ground in some of the areas we're moving into here with planetary scale and massive displacement and whatnot so it's good to see Mojo users enjoying TG2 as well. The otherworldly columns and the like are still a bit difficult in TG2 but I am confident that future development will improve control and ability to do things like that.

- Oshyan
Title: Re: Twist and Shear
Post by: efflux on December 24, 2006, 09:37:05 AM
Next phase in these tests. Displacements in this one have an entire displacement with no fractal and one with a fractal to bulge it further with some shaping. There are some problem areas in the shadows but I'm tweaking further. I have entire forests now and I'm adding in 3D skies, better ground etc for a bigger render.

(http://img405.imageshack.us/img405/6339/terrain100cu9.jpg)

I really want to start rendering at higher resolution now but I notice when buying TG2 you have to specify Mac or Windows. I'm running TG2 on Windows at the moment due to my Mac being dual core. My PC is actually faster with it's one core. However ultimately I want to buy the Mac version. What I'd really love would be Linux but I'm guessing my only solution is to buy the Mac version and run two instances of TG2 to render. That way I can still use the free TG2 on the Windows machine to work on scenes before rendering. I'd rather avoid Windows.
Title: Re: Twist and Shear
Post by: Oshyan on December 24, 2006, 03:51:45 PM
You continue to get ever more interesting results. Great stuff! I hope you'll put together a little tutorial or share some scene files at some point. I know your Mojo compatriots would love that. :D

We ask for the platform only for our own information. You can use your purchase on either Mac or Windows, as long as you're not using it on 2 machines simultaneously (the bundled render nodes are something an exception to this of course, but they are for rendering only).

We are not likely to provide a full GUI version for Linux any time soon but we do hope to provide a Linux CLI render client.

- Oshyan
Title: Re: Twist and Shear
Post by: efflux on December 26, 2006, 03:17:22 AM
OK. Thanks Oshyan.

I now realize that I can run the full TG on my Mac or PC because I went ahead and got the upgrade from v0.9. I don't use it on two machines simultaneously. I just like to work with the Windows version for now until multi core support is implemented. My XP machine's single core is faster than one core on my Mac.

As for my experiments here, I kind of went too far with it. Long render times when I need to look at simpler things in TG2 and then come back to this to improve it but I just wanted to know how far I could go with a style that Mojoworld can achieve. This is just a small rough test render. The detail is bad on the displacements but I have test rendered sections at high detail and they turn out OK. Very interesting in fact, because I think TG2 might actually have less bad artifacts than Mojo when pushing displacements. These rocks have more roughness than my previous posted render. In that one, where you see the blend at the bottom of the spike (an inverted crater by the way) the textures look really nice. I expected more dodgy artifacts but it seems with rough textures on big displacements that they turn out pretty good. I notice for example in a perlin ridge terrain, overlying smaller displacements don't mess up noticeably where they cross a ridge. They do in Mojo. However to give Mojo credit here, it does have a lot of power to change the effect of the fractal. There are lots of ways to control where the displacement is orientating from e.g. world position, surface position, undisplaced surface position and more.

(http://img204.imageshack.us/img204/3530/terrain135zg8.jpg)
Title: Re: Twist and Shear
Post by: MeltingIce on December 26, 2006, 04:54:11 AM
Those are some pretty cool effects you are getting.  If you want to write up a tutorial on how to get those effects, I can host it on my tutorial site for you if you like.
Title: Re: Twist and Shear
Post by: king_tiger_666 on December 27, 2006, 02:21:16 AM
has anyone has success in putting a population of objects ontop of a shear terrain?... it doesn't seem to want to populate on terrain if there is a overhang..

Title: Re: Twist and Shear
Post by: Tangled-Universe on December 27, 2006, 03:35:42 PM
Well, those formations look pretty cool, but honestly I'm much more curious how to create sheared/displaced terrains like these ones:

(http://lucbianco.free.fr/wordpress/wp-content/canyon16.jpg)

and

(http://lucbianco.free.fr/2bgal/img/terragen2/TGD506.jpg)

There's got to be a way to at least mimic this effect. I've been fiddling with almost everything since the TP release, still with no results :(
So maybe you displacement guru's know a way to do it  ;)
You would make me REALLY happy, and I'm probably not the only one ghehe  ;D

Martin
Title: Re: Twist and Shear
Post by: Oshyan on December 29, 2006, 09:31:55 PM
Those are fairly easy actually. In both cases I believe Luc started with a heightfield of an existing canyon from a DEM. The fact that you already have the canyon shape really helps a lot. Then you just apply lateral displacement at an appropriate scale and you get those kinds of shapes. Add a Strata and Outcrops shader if you want the stratification effect.

- Oshyan
Title: Re: Twist and Shear
Post by: JemDaddyO on January 05, 2007, 01:25:56 PM
Can you say Roger Dean?  I knew you could.  Efflux those images are awesome and totally remind me of Roger Dean's artistry on a couple of Yes albums.
Title: Re: Twist and Shear
Post by: VermilionMartyr on January 05, 2007, 02:45:50 PM
Hey Efflux, that's some pretty neat stuff you've got there... can you upload your .tgd files?  I'd really appreciate it.  ^_^
Title: Re: Twist and Shear
Post by: oggyb on January 05, 2007, 03:30:06 PM
Fabulous stuff Efflux, you're making real progress!

M.