challenge

Started by Dune, March 18, 2014, 12:47:04 PM

Previous topic - Next topic

Dune

If anyone can get this to work..... warp the stripes so they angle with the bend, like railway sleepers........

choronr

I think they need to adhere to the degrees of arc of a radius - inside and outside???

Dune

Yes, the rotation of each individual stripe needs to have a relation with the angle the total line makes with the main axis, so some combination of blue nodes (degrees?) could work. It can be done, no doubt, but I haven't figured it out (yet).

j meyer

Played with your file,tried some other horizontal procedural stripes to no avail.
After some more thinking I could at least come up with this
[attachimg=1]
Still far from being perfect or even usable,but it illustrates some points I consider
as pretty crucial for this task.
1.It's better to warp a ladder like (rails+sleepers) structure than only horizontal
   stripes.
2.It will be most likely very hard to get rid of the stretching that occurs when
   warping.Seems to happen with anything you warp.

Best would be some spline like feature in TG to slide/pull such a sructure onto,
just like you can pull a snake model onto/along a spline in some modeling/
animation apps.


j meyer

Forgot to mention that,if one would succeed with what bob suggested,you
would of course loose the rectangular shape of the sleepers.Instead you'd
have wedges/trapezes rather.

And something else in regard to my file,there is a discrepancy between the
shader preview and the rendered image/main preview.In the shader preview
the structure is displayed much more distorted than in the actual render.
Don't know why,though.

Dune

The stretching is indeed the problem, but you got quite far. Actually I was testing this with an image map of some horizontal stripes (repeated in Z), and thought each 'instance' of the map should be rotated by some computation, derived from the angle the warped line makes. Hence my thoughts about blue nodes...
Ideally, a 'rotation by function shader' would be useful (for a lot of stuff), and I've mentioned that before, long time ago.

Thanks for having a go!

inkydigit

...if we could get objects (in a population) to all face (or face away from)a specific point would be bonus too, like radial vectors?

Dune

Yeah, that would be handy in some circumstances. I mentioned some 'rotate by function' functionality as well, so you can even rotate by fractal noise (gray), but that could be hard. Don't know. Mogn had some setup, but I failed to get that to work  :(

inkydigit

some sort of conditional 'if' -'then' function nodes... if 'a' is 'xx' from 'b' then rotate by etc etc...?

mogn

Quote from: Dune on April 29, 2014, 08:13:56 AM
Yeah, that would be handy in some circumstances. I mentioned some 'rotate by function' functionality as well, so you can even rotate by fractal noise (gray), but that could be hard. Don't know. Mogn had some setup, but I failed to get that to work  :(

My rotate Works. The following example rotates a voroni noise 90 degrees pr 1000 m from origin.

Dune

#10
Good of you to chime in, Mogn. I should try it again.... thanks.

EDIT: I just tried to rotate an image map by your 'vortex' but couldn't get it to work. How would you go about warping/rotating this? The idea would be to make some irregular sweeps, but where the stripes rotate along with the sweeps, so do not stay 'left to right'....

mogn

#11
Image map is not good for changes, since the you cant change  the input variables.
I have create a scaled functional map with scale 100m meter in each direction. The z direction is modulated
by a noise function.
Ofcause the scales in both direction and the noise amplitude can be changed.


Dune

#12
Thanks Mogn, I'll have a go at getting this to work.

EDIT: still don't understand how I can get this (attached) to work. I need the lines to be like the black ones. Is that possible at all?

mogn

#13
Y
This is a real challenge.
To use real measures:
The distance between the sticks (I dont know the English Word) 625 mm.
The Width of the tracks 1435 mm.
The masked width must be larger (to include the end of the sticks)
The radius of the curve must be less than 600 m.
Both the the mask and the tracks must be included in the rotational transform.
I am working on it but it might take some time.


Dune

Yes, I thought so. I use this for railways, and real measures would be: 'sticks' (sleepers): 255cm long, 22.5 cm wide, space between them: 30cm.
If you can figure this out, you're my hero!