Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: IT1371 on March 05, 2015, 08:15:20 AM

Title: Colored Kerb?
Post by: IT1371 on March 05, 2015, 08:15:20 AM
Hello!

I followed your "Create a drop kerb" tutorial and I was wandering if there is a way to apply a a multi-sub to it?
To achieve colorful kerbs like for parkings along roads etc.

Title: Re: Colored Kerb?
Post by: Paul Roberts on March 05, 2015, 10:36:14 AM
Hi Eli,

RailClone retains the material IDs applied to the original source geometry, so as long as your multi-sub object material works correctly on these, it will behave identically when you add the segments to RailClone. If however you would like to edit the material IDs inside of RailClone to change them parametrically, this can be done using the Material Operator. You can find more information about this in the documentation here (http://docs.itoosoft.com/display/RAILCLONE/Operators#Operators-Material).

I hope that helps, please let me know if you need further info.

Kind regards,

Paul
Title: Re: Colored Kerb?
Post by: IT1371 on March 05, 2015, 03:45:48 PM
Thanks for your help! I figured it out  ;D
Title: Re: Colored Kerb?
Post by: IT1371 on March 09, 2015, 04:41:01 PM
Update

Well I figured it out but now I "unfigured it out".

The only way of doing so is adding Linear 1S operators to railclone object in order to sort the materials.
The problem is the corners. Images attached.

(http://i59.tinypic.com/2aanjnn.jpg)
(http://i57.tinypic.com/4fkep.jpg)
(http://i58.tinypic.com/mafaz7.jpg)

I tried making it with only one Linear 1S operator but I'm not there yet..

P.S
Is there a tool in the forum to upload images directly to posts? not only as attachments?
Title: Re: Colored Kerb?
Post by: Paul Roberts on March 09, 2015, 07:35:21 PM
Hi Eli,

If you're using separate generators and limit to material ID, I'm afraid it will not bevel the corners that are between ID numbers. Instead you could use a single generator (+ 1 for the drop kerb) and switch the colours according to the Material ID of the base spline using Selector operators. To do this:

This graph give you this result (file attached)
(http://lonelymonk.com/forum_images/7f1d698983de43c5b8eae5ce02584fa7.jpg)

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

Kind regards,

Paul
Title: Re: Colored Kerb?
Post by: IT1371 on March 10, 2015, 04:41:58 PM
I ended up doing like that.
I didn't really liked the idea that the colors cycle (ID 1 color will be also ID 6 and ID 11 etc) and I wanted it to be more fixed.. but I guess its the best I could do.

I also tried to do it with condition operators, but for some reason it didn't work.
The main idea was all conditions are true to certain material id and always false to the grey kerb color.
(so if ID is not 3-6, it will be always grey except ID 2 which is drop kerb)
The problem was the Selector Operator that made a salad out of it. (even if set to Spline Mat.ID)
Title: Re: Colored Kerb?
Post by: Paul Roberts on March 10, 2015, 05:49:13 PM
Hi Eli,

Please take a look at the attached. It uses Conditional operators to return a colour for ID 3 - 6, a drop kerb (of sorts) for ID 2, and a grey kerb for any other ID.

Thanks,

Paul
Title: Re: Colored Kerb?
Post by: IT1371 on March 13, 2015, 07:17:07 AM
Thanks its great!
I will try to make it work with my kerb too  :)
Title: Re: Colored Kerb?
Post by: IT1371 on March 13, 2015, 12:19:17 PM
Unfortunately another problem appeared with the default mode setting.
I tried doing Evenly instead but it took both problems (explained next) and mixed them)
 -

When using Default mode set as Tile
(http://i58.tinypic.com/2jb3xbt.jpg)
The colored kerbs reset after every vertex. Which is bad.


When using Default mode set as Adaptive
(http://i58.tinypic.com/24q5utx.jpg)
(http://i59.tinypic.com/b5gsc0.jpg)
the colored kerb sequence works great, but it overlaps the segments at corners, and corners are broken and ugly.


Anyway to overcome this?
Title: Re: Colored Kerb?
Post by: Paul Roberts on March 13, 2015, 01:24:12 PM
Hi Eli,

Tile mode should work correctly, adaptive will disable corner slicing,  but it seems there's an issue if there is no angle change at the vertex:

(http://i.imgur.com/gE9LLoF.gif)

If there's no change in direction you could just remove the vertex to resolve the problem. I'll look into this anyway to see if it's a bug that can be resolved.

Many thanks,

Paul
Title: Re: Colored Kerb?
Post by: IT1371 on March 13, 2015, 02:26:29 PM
In my case it is a little elevation change.
Hi Eli,

Tile mode should work correctly, adaptive will disable corner slicing,  but it seems there's an issue if there is no angle change at the vertex:

(http://i.imgur.com/gE9LLoF.gif)

If there's no change in direction you could just remove the vertex to resolve the problem. I'll look into this anyway to see if it's a bug that can be resolved.

Many thanks,

Paul

Thanks for your help.
Title: Re: Colored Kerb?
Post by: Paul Roberts on March 13, 2015, 02:55:30 PM
Hi Eli,

You may find that changing the vertex type to a Bezier works for some situations. This would stop a corner being added.

Thanks,

Paul

Title: Re: Colored Kerb?
Post by: IT1371 on March 15, 2015, 08:06:02 AM
Thank you, I did work in some cases. (in other cases the geometry simply disappeared, so I had to keep it as corner)

So anyway, is it possible to make it work in future releases? Or change the behavior of the tile mode?
Title: Re: Colored Kerb?
Post by: Paul Roberts on March 17, 2015, 10:43:58 AM
Hi Eli,

We've looked into this issue and established that it's a small bug caused by the bevel angle in straight splines. We'll fix it in the future release.

Thanks,

Paul
Title: Re: Colored Kerb?
Post by: jshulters on April 09, 2015, 08:12:59 PM
Hi all.

I'm posting here on a related subject. We're trying to create a more sophisticated system for city curbs that include gutter, curb (painted & not, with small and large drops), adjacent area (grass or concrete), and sidewalk. I've created segments for each of these (which are about 12 feet from front of gutter to back of sidewalk), but on anything other than straight curbs the different elements do not slice/weld together. Based on your previous suggestion, I'm beginning to think the only way to control color/material changes on a non-straight spline is to use the Selector operator? And I'm not seeing a solution for a drop curb that happens on a non-straight spline (since they require different segments & generators). Any chance the just released update can weld different segments together properly based on Material ID Limits? We model based on LIDAR point clouds, so straight lines are hard to come by and all our curbs have gaps. I've attached rendered samples with notes as well as my testing max file. Thanks!

John
Title: Re: Colored Kerb?
Post by: Paul Roberts on April 10, 2015, 01:35:57 PM
Hi John,

Unfortunately the gaps are a limitation of using the generator's Limit by Material IDs option that is still present in RailClone 2.4. I've attached a file with a possible workaround.

(http://lonelymonk.com/forum_images/c54952e39e8443ac8d73caf249029c08.jpg)

In this example I've used the selector operator as you suggested. For the drop curbs I've combined the two ends and the lower curb using a Compose operator. The low curb is scaled using an expression to fill the distance of the the spline section minus the two end sections. 

It uses this expressions : XSectionLength-(Input1*2) where input 1 is the X length of the ramp segment.

Regarding the smoothing issue. This is caused by edges overlapping as they deform around the corner. In some cases this may be resolved by increasing the Curve Steps value from the Style roll-out, but if the depth of the pavement is larger than the radius of the curve then edge crossover is unavoidable as the little animation below illustrates:

(http://i.imgur.com/xDtILEj.gif)

Corners may suffer from a similar problem but you may find you can improve that by changing the vertex type to Bezier-Corner and tweaking the handles a little.

I hope that helps, please take a look at the attached file and please let me know if you have any further questions.

Thanks,

Paul