I have some questions

Started by green_meklar, September 16, 2007, 04:37:48 PM

Previous topic - Next topic

cyphyr

Admittedly some of Terragens workings do get a little getting used to but once you do understand them they're fairly predictable and simple to operate. Populations ssues do seem to occur after extreme displacements but in almost all cases problems come from bad wiring. The deliverance between the 'Sit on Terrain' and 'Use Density Shader' is as follows. The objects have to sit on something and the 'sit on terrain' chooses that  surface, generally the Compute Terrain node but you could use another node such as the last node in your shader tree. The 'Use Density Shader' defines the distribution across the terrain so if you plugged in a checkerboard image then you objects would be distributed in a checker board fashion. If your using a "Surface Layer" as your distribution be aware that if your pretty much anywhere other than the "top" of the planet make sure "Use y for altitude" is un-checked in your altitude settings.
Attached is a very simple set up showing a working population. You'll need to re-specify your own objects.
Hope this all helps
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Njen

Quote from: green_meklar on September 23, 2007, 04:44:07 PM
The population node has only one input port which I think is called 'terrain shader'. Yet the population node is actually USING two shaders, one for 'sit on terrain' and the other for 'use density shader'. It seems that sometimes if I save the file, exit the program and come back in, the population node will have magically spawned an extra input port.

This issue is something that I agree needs to be cleared up. When you create your initial population, there appears to be only one type of input connection. To make the other input connections (Like Density) appear you must do the following:

* Create a shader, any colour shader will do.
* Go to the population node attributes, next to the Density field path then click on the button that has the 3 "..." to the right of the path field.
* Manually assign the shader you created earlier.
* With the population node still selected, click on the button next to the edit field of the name of the node called "Edit the Internal network of this node"
* Go back the the main node level (Up one level)

Now you will see the second input.  I hope this is clear for you.

green_meklar

#17
QuoteWell, Mr. or Mrs. Green_Meklar.
Male, unmarried and, if you don't mind nitpicking, all lowercase. :P
QuoteWhen going for a population, do the following:

[stuff]
1. Yes, I'm aware that the terrain needs to be ready before a population can sit on it.
2 and 3. Actually, I managed to figure out this trick on my own. I usually just use rough values rather than your tab system, but I most certainly make use of the pointer coordinates displayed below the preview when positioning the population.
4 and 5. This is one of the sticky parts. Like I say, I got a case just before I posted replay 12 in which a maximum altitude set on the density shader resulted in the trees going above a certain altitude.
6. Hmm...this is something I should definitely keep in mind for the future. For the time being, though, my problems don't involve displacement after the compute terrain node.
Quote1. there is an option to go inside your nodes (if you already dint knew, right click --> Internal Network
Um...I'll take a look at that.

*goes and takes a look at it*

Interesting, but I'm not sure if it's a good way for me to understand the working of the shaders better. Most of the time when I do it, it doesn't show anything at all, although my population does show one...um...subnode?
Quote2. are you using a surface shader to limit the population or distribution shader....when you add distribution shader it doesnt turn on by itself even though you have specified what to use as blending shader (in this case distribution shader) you have to click on the checkbox that is beside the blending option...
How would I tell the difference? The population has a checkbox where it says 'use density shader', that's checked, beside it is a text input field which says 'tree layer' (the name of the shader with the maximum altitude set), and below the text input field is another checkbox that says 'invert density shader', which is not checked. The tree layer is connected with a white line to the compute terrain node at its input port, and the population itself is connected to the compute terrain node at its terrain shader port and to the tree layer at its density shader port. Is that the way it's supposed to be?

EDIT: Whoops, forgot about the second page for a moment.
QuotePopulations ssues do seem to occur after extreme displacements
'Extreme' meaning...?
QuoteThe objects have to sit on something and the 'sit on terrain' chooses that  surface, generally the Compute Terrain node but you could use another node such as the last node in your shader tree. The 'Use Density Shader' defines the distribution across the terrain so if you plugged in a checkerboard image then you objects would be distributed in a checker board fashion.
This is what I had assumed so far. However it doesn't always appear to work that way for me. For one thing, creating or deleting a connection between the compute terrain node and the density shader node changes the way the population works.
QuoteIf your using a "Surface Layer" as your distribution be aware that if your pretty much anywhere other than the "top" of the planet make sure "Use y for altitude" is un-checked in your altitude settings.
Okay, I'll have to go make sure of that.
QuoteThis issue is something that I agree needs to be cleared up.

[fix method follows]
Oh, so there is in fact a bug associated with it and not just me messing stuff up? That's reassuring, especially considering you said how to get around it. Still, does your fix method theoretically change the way the population works, or only the way the nodes are represented on the screen? Is it necessary to use the fix before doing certain things in order to make the population work correctly?
You know what's worse than not being able to do anything right or make anything good? Not being able to blame it on anyone but yourself.

Njen

Quote from: green_meklar on September 23, 2007, 10:19:57 PM
Oh, so there is in fact a bug associated with it and not just me messing stuff up? That's reassuring, especially considering you said how to get around it. Still, does your fix method theoretically change the way the population works, or only the way the nodes are represented on the screen? Is it necessary to use the fix before doing certain things in order to make the population work correctly?

This does not change the population in any way, just how it's displayed. It will still react normally to any node you have input into the population.

green_meklar

QuoteThis does not change the population in any way, just how it's displayed. It will still react normally to any node you have input into the population.
Okay then, thanks!

By the way, cyphyr, I'm wondering about what you said about sit on terrain and making sure it works properly. I noticed after my last post that I had some trees in one image floating just slightly off the surface of the ground. If I set the population center down a few meters, will the population take both 'sit on terrain' and that into account and move the trees downwards, or will it have no effect? If the latter, what should be done to make sure the trees sit either directly on or very slightly under the terrain and not slightly above it? Your post seemed to relate to this kind of thing.
You know what's worse than not being able to do anything right or make anything good? Not being able to blame it on anyone but yourself.

cyphyr

HI G_M
If you want to change the position of objects relative to your population then move the reference object a small amount, this movement will then be translated right across the entire population. By the way what I meant by extreme displacements applies to situations where you have overhangs and suchlike. Effectively the populations are distributed in the x and z axis and moved upwards in the y axis; therefore you cant have a population overlapping on itself.
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

green_meklar

QuoteIf you want to change the position of objects relative to your population then move the reference object a small amount, this movement will then be translated right across the entire population.
I'm not sure what you mean by 'the reference object'.

However, I did try two small test renders of my scene, one with the population coordinates at y=0 and the other with it at y=-5, and from what I could see in the relatively rough render I could get in a short amount of time, it appeared to work. I'll run a large, high-quality render tonight with y=-2 to see if I can get a proper final image with trees that don't appear to be hovering.
QuoteBy the way what I meant by extreme displacements applies to situations where you have overhangs and suchlike. Effectively the populations are distributed in the x and z axis and moved upwards in the y axis; therefore you cant have a population overlapping on itself.
I see. In such a case, would the objects be distributed on top of the overhang or on the terran underneath it? Would it be possible to make two populations which would get instances onto both areas by changing the population coordinates, or can it only be done, say, by telling them to sit on a terrain designed to match one level of the overhang but not the other? Not that I'm planning to do anything this complex anytime soon, but I just want to make sure I understand what you're saying.
You know what's worse than not being able to do anything right or make anything good? Not being able to blame it on anyone but yourself.

Oshyan

It seems like you're getting a lot of good input already so I'll let you guys hash through things unless more help is needed. But I did want to mention that if you're using a Surface Layer for your distribution, unless that layer's color is pure white it will not act as a pure distribution function for the population. A better approach usually is to use a Distribution Shader as this doesn't have the same color issue - it just puts out a basic grayscale mask based on the distribution settings in the node.

- Oshyan

green_meklar

btw, I did a final render of that world with the population at an altitude of -2 and the trees now look like they're standing on the ground properly. The scene still doesn't look entirely realistic, but it's one of my best yet (and also the biggest).

I still have an issue that I haven't been able to resolve, though: That of the scaling on object textures. I looked at the internal networks but I can't find any 'texture scale' or anything along those lines. Does anyone know how to do this properly?
You know what's worse than not being able to do anything right or make anything good? Not being able to blame it on anyone but yourself.

Oshyan

By default imported objects are setup to respect UV maps that are setup in other applications. These will define scale, placement, etc. The Default Shader that is used to load images in these setups does not have an explicit Scale setting. If you want to control scale manually within TG2 replace the Default Shader with an Image Map Shader, plug it into the same Multi-shader input, and load the same image, then use the Size controls there.

- Oshyan

green_meklar

You know what's worse than not being able to do anything right or make anything good? Not being able to blame it on anyone but yourself.

green_meklar

I tried that, and it didn't work out very well. First the mapping was set to 'through camera' which was highly unrealistic. When I set it to 'use object UV', the part of the object covered by the texture turned black. How does one go about making the texture mapping respect the alignment of the object faces while still allowing the texture to be scaled?
You know what's worse than not being able to do anything right or make anything good? Not being able to blame it on anyone but yourself.

Oshyan

This is not really something you can do within TG2. TG2 is not intended to be a modeling or model adjustment application. You should adjust the UVs (and thus the scale of the texture) in another application that is better suited to 3D modeling and texturing.

- Oshyan

green_meklar

#28
So do you think if I increased the texture scale in Art of Illusion and then reexported the file, I could make it work properly?

Also, some other things I've been wondering. First, it seems that when rotating the camera in the preview (alt+left mouse button), the camera rotates around a point external to itself. Is there a reason for this, and can it be turned off somehow? Also, if I zoom too far away from the default planet, everything starts disappearing into blackness, with the atmospheric halo usually being the last to go. Is there a way to fix this?
You know what's worse than not being able to do anything right or make anything good? Not being able to blame it on anyone but yourself.

sjefen

What about the UV's on the terrain made by Terragen?
ArtStation: https://www.artstation.com/royalt

AMD Ryzen Threadripper 1950X
128 GB RAM
GeForce RTX 3060 12GB