Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: GT4505 on August 12, 2016, 01:07:57 AM

Title: Some parametric window questions
Post by: GT4505 on August 12, 2016, 01:07:57 AM
Hi there,

I've decided to call this thread as such because I'm working on some parametric window sets.
As for now I'm working on something quite specific which I can't seem to get right, but I guess other questions regarding windows will follow :p

As you can see, I've started from the itoo window tutorial, because that seemed to be the easiest way.
However the window I'd like to generate is different, with a vertical element reaching from top to bottom, and a second element split in 2.
Please have a look at my max file, you'll find a "basic"model of the window in the jpg, sliced up in the needed parts.

One other question, not direcly related to this specific window shape is if there is a possibility to generate windows based on a clipping area, and add some variation by opening some of the windows (both axes mixed togather: opened over z-axis, or x-axis).
I used to do this with the linear spline generator, but as I'm trying to generate my windows with the A2S generator, this seems to be much more difficult.

Thanks for the advice.
Pieter
Title: Re: Some parametric window questions
Post by: GT4505 on August 12, 2016, 11:30:20 AM
Great, after quite some testing and another approach it seems to work right now...
Title: Re: Some parametric window questions
Post by: Paul Roberts on August 12, 2016, 12:18:43 PM
You beat me to it :)

I've attached my version anyway. Basically it uses a lot of sequence operators, a few arithmetic operators to calculate the sizes of the segments and a love of jigsaws :)

You might also be interested in this thread if you're doing a lot of windows, there are a number of questions answered here including sample files. http://forum.itoosoft.com/index.php?topic=3320.msg13403#msg13403

I hope that helps.

Many thanks!

Paul
Title: Re: Some parametric window questions
Post by: GT4505 on August 12, 2016, 01:08:17 PM
Hi, thank you for your fixed version, always good to learn!
I first started with your tutorial in mind, using all the segments as corners top and bottom... But this seemed to make it more complicated for me.
I'll have a look at your solution in a moment to see how you solved it.
The main solution I'm using now, are just vertical strips one left, one right, and a composition of three parts for the middel, all in vertical sequences...
Also thanks for the link to the thread.

However I've still one bigger question that I'd like to use for all my other window generators:
Is there a possibility to generate the window, with one part that can open (slightly), to add some variation if you've got a lot of windows.
In these A2S generators this seems especially hard.

An other problem I've still got with a sliding door window generator is that I'd like to open some of the panels randomly.
Therefore I'd need a random number, that should change per segment (let's say 4 squares in the total clipping area). So that would mean I'd need a generated number for each square (window). But changing the generate from start (where they all have the same opening distance) seems to mess with the window model.

Thank you,
Pieter
Title: Re: Some parametric window questions
Post by: Paul Roberts on August 15, 2016, 06:14:43 PM
Hi Pieter,

Would you mind sending me your model for the sliding door to take a look at? It's be easier for me to come up with a solution that works for your set-up that way.

Many thanks!

Paul
Title: Re: Some parametric window questions
Post by: GT4505 on August 16, 2016, 02:32:15 AM
Thank you for your reply, I'll send that to you soon.
In the meantime I'm working on an other window I'd like to use in a current project.

I'm encountering some problems here:
- Getting the uv's mapped correctly which are running across different elements.
- Getting the info from the XSectionLength which is returning 0,000
   I was trying to use this to line the sun shade beams in front of one window segment (maybe there is just an easier way to do that?)

I've attached the model I'm working with, and also some screenshots to illustrate.
All the files can be downloaded here: http://gofile.me/6lvtX/9aZkTbI7o (http://gofile.me/6lvtX/9aZkTbI7o)

Thanks in advance,
Pieter van Stee
claar.be
Title: Re: Some parametric window questions
Post by: Paul Roberts on August 16, 2016, 02:15:41 PM
Hi Pieter,

Thanks for the files, that style is looking good! There are some issues it would seem with UVW lining up correctly on the Y axis, especially when segments are scaled. I'll talk to our development team about this to see if it can be improved. In the meantime how about using V-Ray's new Triplanar texture map? It works well in my tests and prevents you from having to fiddle around in RailClone with UVW mapping.

(http://i.imgur.com/1EeQw6t.png)

I've used this in the attached file.

To add the Sun Shade beams I've created a condition using an expression that tests a segments current position on the spline against the length of an XSectionLength. This seems to work well and allows you to choose how many windows you'd like to cover with sun shades. You also notice that I've connected the padding values to the height of the Sun Shades so that their height can be calculated automatically.

I hope that helps, please let me know if you have any further questions.

Many Thanks,

Paul
Title: Re: Some parametric window questions
Post by: GT4505 on August 16, 2016, 11:58:24 PM
Hi Paul,

That's a great fix for my uv problem, that fixes it all!
Also the shading is working very nice now.

I've created a new folder in the shared link from my previous post.
If you'd like to have a look at my RCstyle, because I'm trying to generate windows on a single spline (rather than rectangles).
It has the advantage that you can use your single spline style around the building, and not just in one direction with the clipping principle.
So I've started with this style that has a middle (default, scaleable part), just as the last style.
Only with this one, and all my future window styles I'd like to place dummy planes in my openings to get the heights from the windows into the RCstyle.
You'll see that I've placed 8 placeholders or so in RC...

With a selector I'd like to use them to generate the different heights for the different types of openings.
Hope that seems logic to you.
In the folder are some screenshots from the frame buffer so you can see how it's coming along.

Thanks for the support.
Pieter
Title: Re: Some parametric window questions
Post by: GT4505 on September 19, 2016, 05:33:16 PM
Hi, I'd like to come back on my last question as it isn't answered yet, and now I would need that workflow again.

So I have a basic script for my windows...
But I'd like to use this basic script for different heights. These heights should be generated by simple planes I can set up in the scene and modify when needed, so it's easy, quick and always accurate.

I'd like to assign some id's to different splines, let's say 1,2,3
And create 3 surfaces that are brought into the script with a segment.
These segments should be plugged into a selector...

All this works fine it seems, the only thing I still can't get to work is the total height which is plugged into the y-size of the A2S generator.
But the overall height of the windows isn't changing.
Is there any way to get this working?

Thanks
Title: Re: Some parametric window questions
Post by: Paul Roberts on September 19, 2016, 07:00:06 PM
Hi Pieter,

Would you mind uploading the version you have so far so I can take a look? Unfortunately only one Y Size can be used  per RC object, it can't be adjusted for each spline, but maybe I can find another way.

Many thanks,

Paul
Title: Re: Some parametric window questions
Post by: GT4505 on September 19, 2016, 09:14:58 PM
Hi, Paul

If that would be possible that would be great!
I've attached the max model.

Title: Re: Some parametric window questions
Post by: Paul Roberts on September 20, 2016, 11:23:33 AM
Hi!

Thanks for the file. I've attached a possible solution. There are a couple of limitation when using the A2S array for this purpose. Firstly as mentioned, the Y Size parameter affects all parts of the array, even if they're on different spline sections so it can't be used to dynamically adjust the height. Secondly, row heights will always align, even if they too are on different splines, so it isn't possible to scale the segments to change the window height because the row above will always move to contain the tallest segment.

To get around this I've created the whole thing with 3 L1S generators: One for the bottom, one for the mid section, and one for the top. This is replicating an A2S array, but without any of those limitations. Using this style you should be able to control the height of windows using material IDs.

I hope that helps, please let me know if you have any further questions.

Many Thanks,

Paul
Title: Re: Some parametric window questions
Post by: GT4505 on September 20, 2016, 08:06:59 PM
No problem about the A2S because I didn't liked it anyway for these kind of objects.

At first I started following the window tutorial on the itoo website.
It's a good method, but lacking some functionality especially because it can only be used in one direction at once.
Is there a possibility to use that more in the way I'm using it on a spline so it can be used in all directions with a more complex window composition?
Also a good addition to rc would be to link different rc obj's? If you had to split up some objects (like these windows) so that if you make changes on one, they reflect to other rc objs...

But for now, my problem seems to be fixed.
Thank you for the solution!
Title: Re: Some parametric window questions
Post by: GT4505 on September 20, 2016, 08:14:26 PM
By the way,

Is it possible you've attached an old max file? from one of your earlier posts?
Title: Re: Some parametric window questions
Post by: Paul Roberts on September 21, 2016, 10:13:51 AM
Hi, Thanks for spotting that, you're right I uploaded an old file. I've fixed it in the original post.

You might be interested to know that we're working on the Clipping>Extend X/Y Size to area functionality at the moment and it should be possible to use it with multiple directions in RailClone 3.

Thanks!

Paul
Title: Re: Some parametric window questions
Post by: GT4505 on September 21, 2016, 10:56:31 AM
Hi Paul,

Great, thank you for the file.
Looking forward to v3 then, cause I love working with rc and forest they're huge timesavers, and add a lot of detail to the scene!
Title: Re: Some parametric window questions
Post by: GT4505 on September 24, 2016, 06:41:55 PM
Well this worked perfectly for me :)
Thanks again, here is one of the images I rendered from this scene...

Title: Re: Some parametric window questions
Post by: GT4505 on September 25, 2016, 09:32:48 PM
Hi, there,

Here another question about windows.
In the mean time my window scripts are working out quite as I want them to.
I have just a question about optimization, and a slight discoloration on some segments.

Please have a look at the attached files:
- Can the script be constructed easier?
- how to get rid of the discoloration on the middle segment.

Thanks!

edit: just one more question, something I've encountered earlier in other rc builds: as you can see on the last screenshot there is a repetition of the left (default) segment again. might be due to a slight in accuracy? would just like to be sure to get rid of this ;)


Title: Re: Some parametric window questions
Post by: Paul Roberts on September 26, 2016, 12:22:05 PM
Hi!

Thanks for uploading a picture, it's always really nice to see the work you are doing with the styles you're creating.


- how to get rid of the discolouration on the middle segment.

It seems you have some overlapping geometry. This is caused by the lower glazing segments and the transom interpenetrating. To fix this you need to deduct the height of the transom segments from the lower glazing.

- As you can see on the last screenshot there is a repetition of the left (default) segment again. Might be due to a slight in accuracy? would just like to be sure to get rid of this

This is due to the the rounding operations of the expressions. Sometime it won't divide perfectly and you'll get slight inaccuracies like this. One solution is to prevent the segments from repeating. You can do this by using a sequence operator with the compose node in input one and an empty "null" segment in input two. When RC encounters a segment with now dimensions it stops adding any more geometry to that part of the array, so it will prevent repetition and remove the problematic geometry.

Though this style seems complicated, to me it seems logical split into segment's like this. With the changes in RC3 you might be able to restore this to an A2S generator which would speed things up. If not we have plans to make sub-graphs so you could make this much more user-friendly.

I've attached a file with these changes. I hope that helps, please let me know if you have any further questions.

Many Thanks,

Paul
Title: Re: Some parametric window questions
Post by: GT4505 on September 26, 2016, 10:48:24 PM
Hi Paul,

Thank you for your reply.
Indeed the first one was a mistake I made, thanks for pointing out where to look.
The second one I'll remember in my next projects, a little bit of a workaround but it does the trick.

Also looking forward to that rc3! :D
However until that arrives, here is another... just feels like windows are quite some work in each scene that can be automatized with rc, so I'd like to be able to generate as much as possible common types.
The next one is something I like to do in most of my projects to generate some variation. Opening some windows randomly.
Therefore I'd like to open them in 2 directions /angles.
The easiest one around the x rotation axis works very nice.
However I'd like to add some variation with a random value, is that possible that for each section a rnd nr is generated and used in the different L1S generators to have a correct result?
Now each L1S generator is getting a different value it seems.

The other thing - I don't know how to start - is opening the windows around the other axis...
Hope you can help me here, thank you!

Title: Re: Some parametric window questions
Post by: Michal Karmazín on September 27, 2016, 04:58:33 PM
Hi,

I can confirm, the the Generate on: X Spline Section doesn't behave as supposed when linked to Generator's X Rotation parameter. We'll check what can be done to fix it.

Anyway, to archive those rotations, it would be necessary to rotate all these used Segments using a specific "Pivot Point" for all involved Segments, which is not currently supported.  A possible option how to access rotation of the whole window might be to use part of this style (one window without frame) and nest it (import as a Segment) inside of new RC object, but unfortunately this way individual parts will be scaled too (which would be inconvenient).

Let me add, that the implementation of "groups of objects manipulated as a single Segment" feature is already in our wish-list.

Best regards,
Title: Re: Some parametric window questions
Post by: Lars Egerrup / LKE Design on October 25, 2016, 02:35:18 PM
On that note, - as you are already considering. it would be cool if you could make hinged windows and doors.
Its of course possible, at this time, to make a stationary windows / doors  that are closed - but if you want to add the variance of using the hinges - open the window / door - then the problem arises, right?

I have been experimenting a little with it without the biggest luck though.

My theory was to have the outer frame as one Array 2s holding a number of subpanels (nestet) - each panel being an array 2S, so that you can have flexibility in number of mulions. The dimension of the various panels should be extracted and calculated based on data from the outer frame.
The door version should have more or less the same setup.

Of course it should be possible to add handles, hooks, hinges and so to the panels and frames, - so you could make a M1:1 door detail wise. Do you follow me?


I think all above should be possible in theory - but I just haven't had success doing it - maybe because it simply isn't possible, - yet?
Title: Re: Some parametric window questions
Post by: GT4505 on November 06, 2016, 12:49:38 AM
Hi there,

Here I'm again with a question about one of the windows I've generated with RC.
I've been working with this script for quite some time now, however since a few alterations I'm getting this strange difference in reflection in the glazing.
I've extracted a part out of my model so you can have a look at it.
I'm sure it'll probably be something I've overlooked, but can't seem to find it.
Thanks in advance.

In regard to the question from CT6253, that should definetly be possible... with quite some work and a large script.
But I'm sure it can be much simpler, so I'm waiting for some new features in the next RC which I'm sure won't disappoint :p

Cheers
Title: Re: Some parametric window questions
Post by: GT4505 on November 06, 2016, 12:19:43 PM
Hi there,

Ok looks like I found a way to resolve this issue.
However I still can't get it why RC is converting this geom the way it does.
It seems that one of the two geometry segments groups is being flipped in RC.
Have a look at the screenshots please.
By inverting the geom beforehand the result comes out fine.

This fixes my issue, but I'd like to know why this is and if I can fix this for future projects.
Thanks
Title: Re: Some parametric window questions
Post by: Michal Karmazín on November 08, 2016, 05:43:07 PM
Hi,

As we can see, some of your "source Segments" have flipped faces (thought in the view-port it doesn't seem so - please feel free to do some additional testing with the xView - Face Orientation tool or a 2Sided material). From the scene itself it's not clear how that issue arose, but in similar cases Flip normals > Reset XForm - Reset Selected > Convert to Editable Poly should fix it.

Best regadrs,
Title: Re: Some parametric window questions
Post by: GT4505 on November 16, 2016, 07:45:08 AM
Hi,

Thank you for this method to fix the problem, I'll use that in the future.
In this project I just flipped the faces from one set of objects.