Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: suppenhuhn on March 21, 2020, 02:17:08 PM

Title: Calculate UVW Coordinates - get X Mapping Size from Spline length
Post by: suppenhuhn on March 21, 2020, 02:17:08 PM
Hi!

I'm using one railclone object using two Array2S Generators to create two window variations ( high and small ). The heights are parametric inputs and are assigned via Spline Mat-IDs ( 1=high, 2 =small ). So far so good.

Now i'm trying to create a third object -> a simple Array2S Generator with only a default plane, which should work as a "backgroundplate" for each window. And each plate should have a UVW Mapping Size matching to it's width and height:


Is there a way to get the length of each spline used in the base object path ? Guess that expressions could solve it - found X Spline Length, X SplineSection Length, X Spline MatID etc. but no glue how to use em

Hope you'll understand what i'm trying to say  8)
Title: Re: Calculate UVW Coordinates - get X Mapping Size from Spline length
Post by: suppenhuhn on March 22, 2020, 04:32:46 PM
I've tried with expressions but i can't get running  :-\

When plug this arithmetic expression into the X Mapping Size then the UVW Mapping isn't correct...hmmm


P.S. Is there a way to check what value a expression is returning - just like  log, echo or print commands in other programming languages?
Title: Re: Calculate UVW Coordinates - get X Mapping Size from Spline length
Post by: Rokas on March 23, 2020, 10:05:46 AM
Hi,

I am attaching my solution to the described issue.
(https://i.imgur.com/JZEWGP7.png)

To understand what expressions are returning, sometimes helps to create new helper generator with segments variable Z size for example. There are no text output evaluation.

Hope this helps.
Title: Re: Calculate UVW Coordinates - get X Mapping Size from Spline length
Post by: suppenhuhn on March 23, 2020, 11:34:11 AM
Awesome - works perfect. Thank you! A real "pro-approach" with no need to mess with UVs !! :-)
But one question: I'm using spline vertecies to create X Evenly window-elements. When adding a vertex into spline ID 2 - railclone will create 2 "background segments".
Is there a way to check if a spline has more segments and ignore them ? My segments always have the same ID, i don't mix IDs within the spline.
Title: Re: Calculate UVW Coordinates - get X Mapping Size from Spline length
Post by: Rokas on March 23, 2020, 12:12:51 PM
Then set Background generator Bevel Mode to None:

(https://i.imgur.com/r4Ton2P.png)
Title: Re: Calculate UVW Coordinates - get X Mapping Size from Spline length
Post by: suppenhuhn on March 23, 2020, 12:54:44 PM
Thank you so much !  8)