snow on trees?..

Started by ton, December 29, 2006, 02:16:29 PM

Previous topic - Next topic

monks

#15
Hmm, looks pretty convincing. Any chance of seeing at some point?:
a tree close up
a whole mass of forest in the distance with the snow on

  ;D I'm not asking much.

monks

Oshyan

I was a bit unclear actually. I connected the Compute Terrain to the input of the Default Shaders because that should carry down through the network to the Surface Layers (and indeed it does seem to). You're right of course that if you connected it directly to the Input of the Surface Layer you wouldn't be able to hook up the Default Shader with the textures.

Monks, the effect doesn't look all that great up close. :D You'd ideally want to use some subtle displacement to make it look like clumps of snow on the trees and whatnot, but that gets pretty fiddly. For my purposes this is fine as I'll be flying over the trees at reasonably high speed. ;)

- Oshyan

ton

#17
Quote from: JavaJones on December 31, 2006, 02:00:08 PM
I was a bit unclear actually. I connected the Compute Terrain to the input of the Default Shaders because that should carry down through the network to the Surface Layers (and indeed it does seem to). You're right of course that if you connected it directly to the Input of the Surface Layer you wouldn't be able to hook up the Default Shader with the textures.

Monks, the effect doesn't look all that great up close. :D You'd ideally want to use some subtle displacement to make it look like clumps of snow on the trees and whatnot, but that gets pretty fiddly. For my purposes this is fine as I'll be flying over the trees at reasonably high speed. ;)

- Oshyan

Hmmm. .. I've tried this, but it explodes my geometry...  weird..  I disabled all displacement ops.. 
slightly related to this (because I've got a feeling it can be usefull).. the merge shader, what does the mix controller do, and what does it need for food?

Thanks, Ton (oh, and on the exploding topic, happy 2k7 everybody  :) )

Oh, btw, which version/ build are you using? (just read something on the yahoo groups about a bug that causes geometry to explode?)




Oshyan

Make sure you're using extremely small values for the displacement - 10's of centimeters (100th's of a meter, which is TG2's default unit) most likely.

The Mix Controller in the Merge Shader controls which input will be placed where. If you fed it in an image map with one half black and the other white then the 1st input would be shown on one half and Input A on the other half. This is also affected by the "mix mode" as well as the "mix to A" slider, of course. But the mix controller itself is really just that, a controller for the mixing process that is specified in the other controls (add, multiply, etc.). This is similar to the Control input on the Chooser in World Machine, if you're familiar with that.

- Oshyan

monks

QuoteMonks, the effect doesn't look all that great up close. Cheesy You'd ideally want to use some subtle displacement to make it look like clumps of snow on the trees and whatnot, but that gets pretty fiddly.

Yeah- that's what I was thinking with maybe an icicle hanging of a branch- pff! I'd better try placing a fake stone in the right place first though.hehe. It's looking very cool anyway.

monks




ton

#20
Quote from: JavaJones on December 31, 2006, 05:56:19 PM
Make sure you're using extremely small values for the displacement - 10's of centimeters (100th's of a meter, which is TG2's default unit) most likely.

The Mix Controller in the Merge Shader controls which input will be placed where. If you fed it in an image map with one half black and the other white then the 1st input would be shown on one half and Input A on the other half. This is also affected by the "mix mode" as well as the "mix to A" slider, of course. But the mix controller itself is really just that, a controller for the mixing process that is specified in the other controls (add, multiply, etc.). This is similar to the Control input on the Chooser in World Machine, if you're familiar with that.

- Oshyan

No matter what I try, geom keeps flying around..  :-[ .. so the controller sort of behaves like an alpha?..
Just curious, when's altitude being read? When populating or when rendering?


buchvecny

Guyz i think you want too much... its still beta dont forget lol

Oshyan

Yes, the mix controller behaves like an alpha blend between the two inputs of the Merge shader.

As for the exploding geometry I'm not sure what to suggest without more info. Maybe you can post a screenshot of your network or a .tgd file? Matt seems to think what I've done is magic, so there may not be much hope of getting something even more outlandish to work. But that doesn't mean we shouldn't try. ;)

- Oshyan

ton

#23
Quote from: JavaJones on January 04, 2007, 02:03:25 AM
Yes, the mix controller behaves like an alpha blend between the two inputs of the Merge shader.

As for the exploding geometry I'm not sure what to suggest without more info. Maybe you can post a screenshot of your network or a .tgd file? Matt seems to think what I've done is magic, so there may not be much hope of getting something even more outlandish to work. But that doesn't mean we shouldn't try. ;)

- Oshyan

Check above, with the screenshot I posted, there's also a peek at the network..

There should be a way of doing this.. somehow..  I can't feed a 2nd camera into a projected texture that would act as a mix controller?
.. just trying to run into something ;-)
humm.. that won't work.. no way to tell the camera what should be rendered..

oh.. here's the setup, just in case..

JimB

Quote from: JavaJonesSo I just edited the .tgd file directly and put "/Compute terrain" into the "Input shader" part of the relevant nodes.
Oshyan, any chance of copying and pasting an example of this text, before and after, with the added line in bold? Some might find your explanation a little abstract (like me), but an example goes a long way  ;)
Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.

Matt

Quote from: JavaJones on January 04, 2007, 02:03:25 AM
Matt seems to think what I've done is magic

Haha, yes, it would be if you had connected the Compute Terrain to the same input as the Default Shader!
Just because milk is white doesn't mean that clouds are made of milk.

Matt

#26
Hi all,

Oshyan achieved this effect without needing to connect the Compute Terrain anywhere in the object's shader network. The secret is to activate "Use Y for altitude" in the Surface Layer. This causes the Surface Layer to bypass the usual method of computing altitude (where it looks at the distance of the shaded point from its original undisplaced "geometry" point) and simply use the Y coordinate in 3D space.

There are some limitations to this method. It only works as expected if your landscape is near enough to 0,0,0 that planet curvature will not affect the Y coordinate too much. And of course 0,0,0 needs to be at an altitude of 0, which it should be if you have not changed the planet position or radius.

(It should be theoretically possible to achieve this effect anywhere on the planet but you would need to do some extra maths in the object's shader network based on the centre and radius of the planet and might not be able to use the Surface Layer's built-in constraints.)

To round things up... you should put a Surface Layer below the Default Shader (or below the Multi Shader if you want it to cover all parts of the object), and make sure you set "Use Y for altitude" if you want to apply altitude constraints and set "Use Y for slope" if you want to apply slope constraints.

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

ton

#27
Quote from: Matt on January 04, 2007, 09:13:37 AM
Hi all,

Oshyan achieved this effect without needing to connect the Compute Terrain anywhere in the object's shader network. The secret is to activate "Use Y for altitude" in the Surface Layer. This causes the Surface Layer to bypass the usual method of computing altitude (where it looks at the distance of the shaded point from its original undisplaced "geometry" point) and simply use the Y coordinate in 3D space.

There are some limitations to this method. It only works as expected if your landscape is near enough to 0,0,0 that planet curvature will not affect the Y coordinate too much. And of course 0,0,0 needs to be at an altitude of 0, which it should be if you have not changed the planet position or radius.

(It should be theoretically possible to achieve this effect anywhere on the planet but you would need to do some extra maths in the object's shader network based on the centre and radius of the planet and might not be able to use the Surface Layer's built-in constraints.)

To round things up... you should put a Surface Layer below the Default Shader (or below the Multi Shader if you want it to cover all parts of the object), and make sure you set "Use Y for altitude" if you want to apply altitude constraints and set "Use Y for slope" if you want to apply slope constraints.

Matt


Hey, I think I've tried this some time ago.. maybe I missed something, I'll dive into that setup again.. !

edit: So I just gave that another try.. still my geomerty explodes (like the still some posts above)...  (the input from the default shader has Compute Terrain attached)


Thanks Matt!!

RedSquare

#28
I just can't resist this.... ;D

http://www.terranuts.com/photopost/showphoto.php?photo=24593

Makes your mouth water?

I know it's probably not what you're looking for, but it's not bad is it?

FrankThomas