ImageMaps Vs. Simple Shape Shaders for paths and roads.

Started by TheBadger, March 14, 2013, 07:58:06 PM

Previous topic - Next topic

TheBadger

Hello.

I would like to be made smart on something I feel pretty dumb about.  :P

For anything in TG2 I have done with a path or road so far, I have used an image map. I think I just found it easy to grasp as a concept and they are rather easy to make, so I just stayed with it up until now.

Some down sides of making an image map for a road:
It can be hard to pinpoint an exact spot on the map; for example, if the part of the road/path directly in front of the camera is un-attractive (shape/size), then going into photoshop to paint a change at that exact spot is difficult. I often spend a lot of time setting up "landmarks" so I can quickly identify a location I may want to jump to, or do work on for a different shot of the same scene.

Another issue with image maps that can come up has to do with size. So if you made a map and the roads width is in need of changing... well this creates a ton of issues; pixel size of paint marks, coordinates of map, and no mater how you do it any land marks you created and populated around are going to be seriously altered.

A good thing about using image maps is the ability to create and alter appearance in very specific ways. And assuming position and size are good, then its a simple mater to use the same map as a mask to control all populations along the path.

But what about SSS? I have never used one on my own. And if I have one in any of my work, it was provided by a community member as a TGC (clip) file. And in that case I would have just used it and not thought to much on it.

I am guessing that one big difference with Simple Shape Shaders and Image maps, is that the SSS will be a more general, less specific shape. Is that correct? But other than that what is a plus and minus of using thee SSS node over a Image map?

Assuming that I just want to have a road that is basic, no specific turns or edges relative to camera position, and just want it to head off in a general direction (say west?) and maybe just meander a bit on the way (some nice curves), well then what do I need to know?

I have looked at several TGDs provided by the community with Simple Shape Shaders used for paths and such. But the issue that I am having with that is the node networks are very complicated in the finished form, and its had to see how the SSS is affecting and not effecting everything else in the node tree.

So from the perspective of someone who wants to understand SSS for a path/road by building it from the ground up. What do I need to know?

If this is to much of a redundant post, please just link me to some place.

Thank you.
It has been eaten.

Dune

A simple shape is just what it says, a simple shape, line, or square or circle. But you can bend it, and soften it any way you like. Make it small or have it span across the globe (or universe). And it's procedural, so you don't have the issue of pixels in a Photoshop grey scale map. If you want specific road layouts (like I often need in birds eye views of ancient landscapes, little sandy paths and such), a painted mask is the only option, but if you're not restricted it's better to use a simple shape(s) for a (few) roads, and bend/soften them the way you like. Bending is dependent on fractals (although you can bend stuff using image maps), so more random. But if you want 'just a road' that's the way to go. The more you bend/change it's appearance though, the more complicated the node network becomes, but that's the same with coloring a terrain. The more subtle coloring, the longer your network.
A basic road + some bends is not that complicated, 4-5 nodes or so. If you want to derive masks from that road for verges, lines, 'off-road' terrain, and such (which should have the same bends), it's gets a little more complicated, but not overly, just take the masks through another warper with the same warping details. You'll get used to it after a while.

Is this the kind of answer that you need, Michael? 

FrankB

Hey Michael, have you seen the simple setup I posted as a tgd in my WIP thread? That's pretty much the basis, the starting point you need. From there, you can continue to modify/add/change more masks and use them to add more complex features to the road's appearance.
The actual technical setup of the primary road is already done for you. Just copy the technique so you can add additional SSS and run them through the same warping, to add paint lines, for example. And so on...

Frank

TheBadger

Hey Guys, got a little busy this weekend. Im back at this now. I will try a few more things out and then see if I need to ask anything else.


Ulco, I think what you said will make more sense to me as soon as I get the foundations of it down. About to find out anyway.


Frank,
I did look at your file. I am going to look at it again in the morn and then I should know whats what, or at least what to ask.
It has been eaten.

TheBadger

Hi frank, Ulco, everyone.

Looked at your files in the road section Frank. Im sad to say that I understood the nodes but not your intention with them. I see that you could draw a path, but the path did not appear to have any effect on the terrains displacement. Maybe I just need to set up the terrain to be displaced by the path, was that what you wanted me to figure out?

Perhaps I should be more specific with what I am trying to do so you can actually help me.

Using a flatten terrain TGC I found in the forum, and a simple shape shader I want to "CUT" a path into my terrain. I see that a lot of you have done this already. but Its not the easiest thing to get.

IS this how you did it? Used a file similar to the one frank provided, and then blended your terrain nodes with it?

In the image I am posting below, You can see what I want in the simplest possible terms. I feel like the answer is right in front of my face, and that I only need to do this right once to understand it completely.  ;D

It has been eaten.

FrankB

sorry Michael, I cannot follow you on what you write in the first paragraph. Is there a way you can send me what you've got so far and I can have a look why it's not working as you hope?

The trouble with the procedural roads is that you cannot determine exactly where they run. So either, they randomly cut through terrain, or they run along hillsides and keep being even (Dune's solution in his pack), but even in Dune's setup, the curvature is random and doesn't necessarily follow the valleys naturally, for example.

The solution I posted goes a different way: it creates a flat road, and allows terrain to "grow" alongside of it. The inverted road mask determines how close to the road the displacements will start.

Sorry I don't know how else to explain this any better.

Regards,
Frank

Dune

Quotebut even in Dune's setup, the curvature is random and doesn't necessarily follow the valleys naturally, for example.

Not necessarily. There is a way....  which is actually built in in my mountain road pack, if you look carefully.

TheBadger

#7
Ok, Im getting some basic results now. I guess I just had some nodes plugged into the wrong places, and so was not getting what I expected. I just started over and payed closer attention.

So, now last question. I want to play with this set up (franks free nodes 2nd post in contest thread). I just want to see how I can displace the road into the terrain.

My question: Should I only use the nodes in the set up provided. Or do I add an image map, or do I copy some of the nodes to place directly above the compute terrain node to get displacement. I want the road to be a little elevated or a little sunk in, into the terrain.

Previously when I used image maps to displace a terrain, I placed the image map shader above the compute terrain node. And copied the image map to below the compute terrain node to restrict populations to or from the image map shape. It was a lot less nodes than Im dealing with now soooooo.... Do I need to change my way of thinking completely, or is the idea basically the same?


So these images show Franks nodes added to mine. And they work like Franks post indicated. But I would like some direction in what to do next. Just in very simple terms, how can I affect the path Franks nodes create. Just tell me one node I can create and where to plug it in to get some desired result (with regards to creating a road) Once I see where and how something basic is done, I believe I will be able to finish this crazy thing... Maybe

Franks nodes are highlighted. And the render shows the road just dropped in in the area of the camera. I am not yet sure how I will place it for the final scene.

Thank you Guys.
It has been eaten.