Itoo Software Forum

Author Topic: it's the curtains again  (Read 1671 times)

JTP Vis

  • Full Member
  • ***
  • Posts: 122
it's the curtains again
« on: September 15, 2016, 12:16:07 PM »
I'm trying to do curtains, but as far as I can tell, i'm trying a different way to the other solutions on the forum.

What I want to do is draw a spline around the edge of a building, from corner to corner. I want to put a vertex on either side of a window opening, and on each vertex I want a curtain model to appear, but not on the corners of the building. That much I can do, but here is the part I'm finding tricky: I have left and right curtain models, so I need to get them in sequence, left, then right; which I can do if I only use one type of curtain. I want to use many different curtain models and randomise them... but obviously keeping them in pairs of the same curtain type... this bit I can't do.

I also have a couple of blind models which I'd like to be able to add in there too, but they are not in pairs! I wonder if that could be done a bit manually by changing the id of the spline segment, which would mean that a blind was inserted instead of a pair of curtains? And then to cap it all, I'd like to miss one or two segments out so that they have neither blinds nor curtains.

Any help would be appreciated.

Cheers,

Bill

JTP Vis

  • Full Member
  • ***
  • Posts: 122
Re: it's the curtains again
« Reply #1 on: September 15, 2016, 01:12:12 PM »
Here's an update with a file attached.

I've managed to get the blinds working on the ID 2 segments, and I've added a randomiser, but I need to keep the same random selection of model on each segment, so it's only a random selection per segment. I've also made the "curtains" work in sequence, but they then only work in sequence of pairs, not randomly in pairs.

I'm looking forward to seeing if this can be solved.

Cheers,

Bill

JTP Vis

  • Full Member
  • ***
  • Posts: 122
Re: it's the curtains again
« Reply #2 on: September 16, 2016, 12:41:22 PM »
As there have been no responses yet it's either:
a - too complicated and might not be possible
b - so complicated that it's taking a while to work out
c - just not a good way to doing it and therefore everyone is ignoring me (this is a perfectly valid option so don't worry if this is your choice)

I've been looking at this again this morning and pondering how it might be done. My logic is something like the following, but I don't know how to do it in railclone:

1: I first need a random selection of a left curtain (assuming the spline is created in the anticlockwise direction), so I wire all the left curtains into a randomiser.
2: this random selection of curtain should apply to the first vertex that it comes to on a spline that is a specific type (I've used bezier corners).
3: the second vertex should then look for the equivalent right curtain, so it needs some soft of "if" command in there somewhere: if the first random curtain comes from slot 2 in the randomiser, then select slot 2 from the "right curtains" selection and apply.
3: After applying the second curtain to the second vertex, you need to start the process over again with the randomiser.

What I can't seem to find, is a way of reading the output of the previous vertex, once a random curtain has been applied.

It might be worth noting that the reason for trying to do this using vertices, is so that I can select a vertex and open or close the curtain for a bit of variation later. It would give me the random variation in the curtain selection with the ability to control the positions.

Does this help anyone with a direction to a solution?

Cheers,

Bill

p.s. it might be worth letting me know if this is just not possible!
« Last Edit: September 16, 2016, 12:43:42 PM by JTP Vis »

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2447
Re: it's the curtains again
« Reply #3 on: September 16, 2016, 04:48:33 PM »
Hi Bill,

What about a slightly different approach - instead of using the Corner slot, Break all vertices (to create separated spline segments) and use Start & End slots. This way two Selector Operators sharing a Random Parameter (in the X Spline Section mode) driving the Index value will pick the correct combination for each spline segment.

Let me add, that we always try to help as soon as possible, but because of the amount of queries we receive (which in several cases need complex solutions), we have to prioritize some demands over others. Thanks for your comprehension.

Attaching modified scene. Hope you'll find it useful.

Best regards,
« Last Edit: September 16, 2016, 04:52:20 PM by Michal Karmazín »

JTP Vis

  • Full Member
  • ***
  • Posts: 122
Re: it's the curtains again
« Reply #4 on: September 16, 2016, 05:49:34 PM »
Hi Michal,

Apologies if I sounded impatient, but iToo provide such impressive support so quickly on these forums it seems strange when there is a slower response time.

I've been doing some more experimentation and I've made it WAY more complicated, but it now works without breaking the spline into separated segments!

I'm going to make it work properly with my curtains, with all the adjustments that I want, and then post a generic solution on this thread!

Thanks for your help, it provided the solution.

Bill

JTP Vis

  • Full Member
  • ***
  • Posts: 122
Re: it's the curtains again
« Reply #5 on: September 19, 2016, 04:17:41 PM »
So as mentioned in my last post, I've managed to make it work how I wanted it to! Check this out:



It's rather complicated, but here is a summery of what it does:

On spline segment id 1, there is nothing at all. That basically allows for wall segments.

On spline segment id 2, you get curtains, one each side of the window, a left and a right. They are randomised so that you get 1 of 7 types, and the left and right curtain is synchronised by the randomisation of the selector being set to X spline section. This seems to work, even though the spline is not separated at all the vertices; perhaps because of the "by id" specification of the generator? The curtains also have a random translation to allow them to be opened different amounts in every circumstance.

On spline segment id 3, you get 1 of two blinds that randomise. These use the adaptive setting to allow them to tile along the segment so that they don't become a really wide blinds on a really wide window. As the blinds are fixed models, there is a variation of height by moving the geometry in the z direction, to a maximum of the height of the blind height.

finally on spline segment id 4, you get a single curtain, on either the left or the right of the window (randomly), randomly selected from the 7 curtain types.

There is also a variable that allows adjustment of the blinds z offset, so that they don't become visible through a opening above, or through the ceiling/floor. This is independent for each blind type as they differ in height.

Finally there is an adjustment variable that allows the offset of the curtains on the inside of the spline so that they sit in the building correctly.

Basically, you draw around your building on the outside of the walls, making sure there are vertices at both sides of each window. Set all the IDs to 1. Then choose the window segments and change them to either 2,3 or 4 to set them as the above id descriptions. If you don't want a window to have a curtain, just set the id to 1.

Took a day or two to make work, and I don't think I could have done so without the critical piece of the jigsaw from itoo, but it now works.


Cheers,

Bill.