Gentle curve on a road

Started by N-drju, April 01, 2020, 07:24:28 AM

Previous topic - Next topic

N-drju

Guys,

Is there any realistic way to:


Have a straight stretch of road, say 400m, and then, have part of that road curve gently by, say 20 degrees to the left? Can it be done by bending a part of SSS?

I've been trying to use functions, but can't find a way to translate a meth expression into the 3d space.

I tried to use vortex shader, but it badly distorts the road dimensions.

Any ideas?
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

Dune

You can place a soft circular simple shape about next to that area to bend and warp X or Z by that (through vector displacement shader of course). Takes some location, and softness adjustments to get it right, but 'white warps', so to speak.

N-drju

I might be doing it wrong, but it doesn't really work too well... :-[

banding road.png
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

N-drju

This might be, in a way, achieved simply by subtracting the colours. But is rather hard to control, if a set width is to be maintained.

examp.png
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

Dune

#4
It depends on what you really need, a bend and then bend back and continue straight, or bend and continue to go that direction, or bend around something and then continue on original line?

Try work with this, set blue node constant to either 1 or zero and see what each does. Can't be perfect though.

N-drju

What I'm after, is a road that, after about 500 m, bends by about 30 - 40 degrees to the left and then disappears out of the frame. The problem however (in both our solutions) lies in the fact that the more curvature is added, the more distorted the width dimension gets. And I'd like to keep the width of the road uniform thought the entire length. :(

This is why I considered adding an arctan or sine wave, but I just can't seem to get a graphical representation of it.
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

WAS

#6
0 roughness PF noise, zero noise variation, zero noise tweaks, and use that as displacement (not it's PF displacement, through a disp func or vector disp). Best way to keep things as uniform as *possible* without just plotting a line.

Note: hour base fractal sizes should be large enough to encompass what you are trying to maintain proportion of.

A distance shade could be used to mask it in at a distance (the displacement) and find a seed that gives you a nice bend off camera.

cyphyr

#7
Quote from: N-drju on April 01, 2020, 03:12:03 PMWhat I'm after, is a road that, after about 500 m, bends by about 30 - 40 degrees to the left and then disappears out of the frame. The problem however (in both our solutions) lies in the fact that the more curvature is added, the more distorted the width dimension gets. And I'd like to keep the width of the road uniform thought the entire length. :(

This is why I considered adding an arctan or sine wave, but I just can't seem to get a graphical representation of it.
I would just build this out of Simple Shape Sahders.
Maybe work it out on paper first ...
A shallow bend could be made from a black circle within (after) a white circle with two black squares masking out a "wedge" shape thus giving you a bend.

Road_Bend.JPG

Road_Bend.tgd
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

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

Dune

Nice solution. Another way would be to just draw it in PS.

WAS

Quote from: cyphyr on April 01, 2020, 04:39:58 PM
Quote from: N-drju on April 01, 2020, 03:12:03 PMWhat I'm after, is a road that, after about 500 m, bends by about 30 - 40 degrees to the left and then disappears out of the frame. The problem however (in both our solutions) lies in the fact that the more curvature is added, the more distorted the width dimension gets. And I'd like to keep the width of the road uniform thought the entire length. :(

This is why I considered adding an arctan or sine wave, but I just can't seem to get a graphical representation of it.
I would just build this out of Simple Shape Sahders.
Maybe work it out on paper first ...
A shallow bend could be made from a black circle within (after) a white circle with two black squares masking out a "wedge" shape thus giving you a bend.

Road_Bend.JPG

Road_Bend.tgd

Clever yet "simple".

N-drju

Ulco, Richard,

These were exactly the first two "least resistance" solutions that I had in my mind. SSS network or a PS drawing. I think I won't complicate it further then.


My only concern would be the resolution of the road mask image... The entire road with a curvy part would be about 1km long. In that case, I'll need to make a picture that is at least 2500px across... Or higher/lower? What do you guys think? That is, of course, if I decide to use Photoshop instead of an SSS network.
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

Dune

You could do that in 2 smaller masks too. Paint a vertical roadmap, repeat it in TG. Add another version, repeated, then rotated, and add a separate bend mask on top of those.
Takes some fiddling. But one complete mask can be done too, in greyscale (LZW tiff), when all is black and only road is white, even a big mask won't take up much MB's. I often make masks of 5000x5000px or so, even in RGB for three masks.
I am now working on a big piece of land with 2m wide ditches, kilometers long. My mask is 6000x6000px with white, slightly blurred (1,5) lines of 2px wide (line function in PS). In TG they are smoothly interpolated anyway, so with a color adjust or bias function you can adjust widths pretty good, and the ditches are straight, and neat as can be.
Or just make the corner, and add simple shapes to that. Lots of ways.

N-drju

I think I'll stick to Richard's advice. I am playing with it right now and it's really fun, even despite having to control six SSS. I always prefer to just use TG tools. ;)
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

Kadri

I used more then one 20 000x 20 000 image masks in some old projects if i remember right.
Depends on your project and RAM size but it is mostly not a problem as it looks.
Especially when you use greyscale-256 colour masks etc.

Dune

An admirable purist! ;D