I've been trying a thing or 2.. but to little succes.. Using the xfrog models, I tried add snow to the trees.. hoping the slope constraint (using object/ y normals) would do the trick..
So did anyone find a way to do this?
thanks, Ton
I think you need a treemodel which has snow already on it. AFAIK the terrainshaders don't work on objects.
Quote from: 3DGuy on December 29, 2006, 02:53:57 PM
I think you need a treemodel which has snow already on it. AFAIK the terrainshaders don't work on objects.
That is what I was thinking....
Yea you cannot add snow to the trees using Terragen 2 shaders, you would have to make a model with snow already on it.
Heres a stab at some snowy trees....18 min render...just a test.
*
Editing the actual texture files would be easiest, but *is* possible to adjust and add to textures on objects from within TG2. I'm actually doing this procedurally and adjusting it by height in a scene I'm working on right now. The higher up on the terrain the trees are the more snow they have. I did this by going into the texture network for the object, putting a Surface Layer *beneath* the Default Shader that normally loads the texture, and then connected the Default Shader through that to the Multi-shader. I set the color in the Surface Layer and adjusted coverage to taste. This gives you the ability to adjust color and coverage on the textures for your object. You'll need a separate Surface Layer for each texture that you want to adjust. To get the additional control over height I had to connect the Compute Terrain shader to the Input port of the Surface Layers (so that it would key off the terrain), then I was able to adjust height constraints appropriately and it worked on the whole population, across instances.
- Oshyan
Quote from: JavaJones on December 30, 2006, 04:13:03 AM
Editing the actual texture files would be easiest, but *is* possible to adjust and add to textures on objects from within TG2. I'm actually doing this procedurally and adjusting it by height in a scene I'm working on right now. The higher up on the terrain the trees are the more snow they have. I did this by going into the texture network for the object, putting a Surface Layer *beneath* the Default Shader that normally loads the texture, and then connected the Default Shader through that to the Multi-shader. I set the color in the Surface Layer and adjusted coverage to taste. This gives you the ability to adjust color and coverage on the textures for your object. You'll need a separate Surface Layer for each texture that you want to adjust. To get the additional control over height I had to connect the Compute Terrain shader to the Input port of the Surface Layers (so that it would key off the terrain), then I was able to adjust height constraints appropriately and it worked on the whole population, across instances.
- Oshyan
That's -exactly- the effect I was after!! Cool.. I'll give it a try... very curious to see your final result, by the way!
edit: just tried it.. getting the texture coloured is easy.. but.. getting height control still puzzles me.. I've piped the default into the input of the surface which is piped in the multi. But 'compute terrain', where does is go into? (child??) and how did you pipe that?
Thanks, Ton.
-that sounds awesome Oshyan. That's one feature that I really missed in WCS. I'm looking forward to seeing the results. :)
monks
Now i am aroused!!! ;D ;D ;D
keeping eye on this, post more guyz =)
Yeah. Awesome. More, more...oh, maybe I should add some.
;D sounds awesome...
Unfortunately there's no way to directly add a specific shader to a generic Input from within TG2 (as far as I'm aware). So I just edited the .tgd file directly and put "/Compute terrain" into the "Input shader" part of the relevant nodes.
Here's an example of the results I'm getting:
[attachimg=1]
The shadows are super dark because GI is off to save render time as I'm just testing the texturing stuff. :D Notice how the whiteish bits on the foreground trees fade out into the distance. This is the result of controlling texture blending over a population by altitude.
- Oshyan
Cool, looks good.. I've been experimenting using the redirect shader, putting compute terrain into Y and feeding that in the input of the default shaders, then in the surface use Y for alt. sort of works but also distorts the geometry... which we don't want..
Another solution, less elegant though, is using 2 populations but that wouldn't look very real.. ..
So, if you pipe compute terrain into the input of the surface shader, where does the default shader connect to the surface shader?
Thanks, Ton.
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
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
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?)
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
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
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?
Guyz i think you want too much... its still beta dont forget lol
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
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..
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 ;)
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!
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
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!!
I just can't resist this.... ;D
http://www.terranuts.com/photopost/showphoto.php?photo=24593 (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?
I think I hate him :)
Quote from: RedSquare on January 04, 2007, 08:07:27 PM
I just can't resist this.... ;D
http://www.terranuts.com/photopost/showphoto.php?photo=24593 (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?
Ha, that's EASY! ;)
Nice work!! ;D
Quote from: ton on January 04, 2007, 12:08:50 PM
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)
You should not connect the Compute Terrain to any of the shaders on your tree object.
Matt
As Matt said I was somewhat misled as to the source of what made my setup work. Connecting Compute Terrain anywhere isn't necessary. It's the "Use Y for Slope" setting that did the trick in my case. So disconnect the Compute Terrain and see if you have more luck. It may not be hurting, but it seems it can't be helping. :D
- Oshyan
Quote from: JavaJones on January 05, 2007, 08:40:55 PM
As Matt said I was somewhat misled as to the source of what made my setup work. Connecting Compute Terrain anywhere isn't necessary. It's the "Use Y for Slope" setting that did the trick in my case. So disconnect the Compute Terrain and see if you have more luck. It may not be hurting, but it seems it can't be helping. :D
- Oshyan
Aight, looks like it has to do something with scale... I need to set very, very small scales on alt. limits... to get a result, and even then it's very hard to make a nice transition..
just curious Oshyan, in your setup, are you able to create a 'hard' line between solid white trees and green trees?
Thanks, Ton.
I didn't try to create a hard line, but I imagine it could be done by reducing the Fuzzy zone for your altitude constraint and/or reducing Fuzzy Zone Softness in the Tweaks tab.
- Oshyan
Will there be tools for making deep snow hanging on the trees in the final version? It would be nice since we often use snow in our scenes.
http://www.ilankelman.org/weather/trees2.jpg (http://www.ilankelman.org/weather/trees2.jpg)
That's something that should really be handled in your modeling and texturing program for objects. Applying procedural displacement to objects in a smooth, realistic way is rather difficult.
- Oshyan
Thank you Oshyan.
I understand. I was just hoping for something that will allow us to add a surface layer on top of for example the leaf shader :)
You can already add a Surface Layer on top of a leaf texture (Default Shader or Image Map Shader) that feeds into a multi-shader for object texturing. With appropriate settings you could get decent results, but the displacement necessary to achieve a real look of "piled-up" snow would be difficult if not impossible. So the texturing (color) could be done in TG2, but the modeling of actual snow build-up should be done in your modeling program.
- Oshyan
Sorry to bump such a old thread, but I am curious how to get this to work. I was able to add a nice snow shader to a single object, which looks rather nice, and had a nice smooth pileup. However, when I move the same method over to a population, it does not appear to work. Do I have to go in 'further' and apply to my needle shader rather then the outer shader like I did with the single object as apposed to this population?
Also, I am a bit confused on how the direction for height control were setup. For me, on a single object you can apply a limit height of '20' with a fade of 10, for a nice look, however on the population, the 'error' persists over the whole population as if there is no height control. (or I just broke the shader)
I am running the demo, could that be a issue? :-X
Running the free version won't cause any problems. You should setup things inside the Populator exactly the same as you would for a single object, i.e. go into the Needle shader *of the object inside the populator*, if that's where you want the snow to appear.
I'm not sure but the issues you're encountering may end up being Object Space vs. World Space coordinate differences. In which case feed your snow shader(s) through a Transform Input Shader with the "Use World Space" checkbox enabled.
- Oshyan
I've been playing with snowy trees for a bit. in the attached snippet, I've managed to achieve (what I think is) an acceptable representation of accumulated snow on bare tree limbs (the single tree at right foreground) that can stand up to moderately close scrutiny. But getting to this point meant figuring out a process in Blender then importing the results into Terragen. Problem is that this process works best on deciduous trees but not very well on evergreen models. I'm working on a separate snow process for evergreens but the results leave something to be desired (as you can also see in the picture). I've about decided that the only way I'll ever get realistic snow on Evergreens is to rebuild the xFrog models, or make my own models from scratch using xFrog or Blender. Only reason I keep pursuing it because there might be some $$$ involved if I can get it right.
These look very promising to me. I've been working on some snow laden trees as well, and I like your snow on the bare trees very much!
It looks very good at this resolution, but you'd have to prepare every tree and import the meshes in TG. I tried to make some blobs of snow (meshes) on trees, but it's a lot of work. I was just thinking if a clever use of the mesh displacer would be useful here, just displacing (and coloring) the lesser slopes up. That way every tree could be snow-covered within TG.
Quote from: masonspappy on December 01, 2014, 09:08:54 PM
I've been playing with snowy trees for a bit. in the attached snippet, I've managed to achieve (what I think is) an acceptable representation of accumulated snow on bare tree limbs (the single tree at right foreground) that can stand up to moderately close scrutiny. But getting to this point meant figuring out a process in Blender then importing the results into Terragen. Problem is that this process works best on deciduous trees but not very well on evergreen models. I'm working on a separate snow process for evergreens but the results leave something to be desired (as you can also see in the picture). I've about decided that the only way I'll ever get realistic snow on Evergreens is to rebuild the xFrog models, or make my own models from scratch using xFrog or Blender. Only reason I keep pursuing it because there might be some $$$ involved if I can get it right.
Amazing look though all and all. The snow looks like a couple days of melt when it starts bundling up on certain spots. Also, nice Jethro Tull avatar. :)
This is about the quality I can achieve on a single tree, when I do the same method on a population. It gets a bit blotchy and dusty.
(http://s12.postimg.org/5tbwud4f1/Snow_on_Trees.png)
Above without slope constraints... oops
(http://s12.postimg.org/ghfnt7ee5/Snow_on_Trees_Closeup.png)
Above with slope constraints at 45 degrees max.
Not exactly like I'd want it to turn out.
see : http://www.planetside.co.uk/forums/index.php/topic,17125.msg166257.html#msg166257 (http://www.planetside.co.uk/forums/index.php/topic,17125.msg166257.html#msg166257)
for one method.
I'm surprised I did not think of that when I was working with the solid white trees. And I've done similar with foliage color tinting to give the forest a not so solid look. Ugh. Thanks so much for showing me this, I'd probably never realized.
Though why can't we just put shaders on top of objects nicely? Is it Terragen perceiving the terrain of the object in a obscure manner?