Itoo Software Forum

Author Topic: Scales along path distribution  (Read 2029 times)

ralphr

  • Newbie
  • *
  • Posts: 29
Scales along path distribution
« on: September 17, 2014, 10:47:11 AM »
To get a better understanding of RailClone I thought I'd try something simple to get used to working with the tool  but I'm running into some issues I don't seem to grasp just yet. So I hope someone can help me :)

I have two rail clone objects. The first distributes some objects along a circle path. The second distributes said circle along another path while rotating/scaling each copy a few degrees.
The problem I run into is that I get an currently unwanted side effect that the object appears stretch the smaller I scale which makes sense because I'm not scaling the X-Axis in this case.
*pic rc_1.png*

So wenn I scale each clone in the X axis I remove the distortion but sadly end ob with empty room between my clones. Which makes sense since I use the evenly distribution. Now my question is can I get reduce the distance between each close the further the spline goes to close the gaps?
*pic rc_2.png*

The style window currently looks like this:
*pic style.png*

I think I have to use the default input instead of the evenly one but when I use it the whole system falls apart and I get no clones on my spline until I remove the "X-Scale" expression.

*side note*
For some odd reasons sometimes my rc objects leave points-cloud mode and switch to adaptive on their own. And when I tick "points-cloud" again they jump back to adaptive immediately.


Cheers,
Oliver

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1593
Re: Scales along path distribution
« Reply #1 on: September 17, 2014, 11:12:23 AM »
Hi Oliver,

It seem like default is the way to go with this style. That way the segments will automatically close up the gaps. They may be disappearing when you try this because you're hitting a maximum segments or faces limit, this can be adjusted from the Display rollout and clicking on Stats in the General rollout might give you more info about why RailClone isn't displaying correctly.

The points cloud display mode is often disabled when nesting RailClone objects with Nested Segments switched on, this is because the nested object needs to be rebuilt for each iteration. 

If you're able to upload the max file I'd be happy to take a more detailed look at it.

Cheers,

Paul.
Paul Roberts
iToo Software

Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 843
    • iToo
Re: Scales along path distribution
« Reply #2 on: September 17, 2014, 11:30:26 AM »
Hard to understand style without max file, but my question why do you use "X Fixed Scale" expression with "xsplineposition",- it seems for me that this scales your segments...
Rokas
iToo Software

ralphr

  • Newbie
  • *
  • Posts: 29
Re: Scales along path distribution
« Reply #3 on: September 17, 2014, 11:33:35 AM »
Thanks for the quick reply Paul.

Indeed it was the nested option that was keeping me from using Points Cloud.
I uploaded a max 2015 file. I hope you can open it, if it not let me know I'll save it as something else. (Or would that screw with railclone?)

Cheers,
Oliver

*edit*

Rokas I want to scale my segments in order to get a tapering effects at the end of the spline. Which is why I need to Scale X to keep my GEO from stretching along the path.
« Last Edit: September 17, 2014, 11:39:03 AM by ralphr »

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1593
Re: Scales along path distribution
« Reply #4 on: September 17, 2014, 02:19:03 PM »
Hi Oliver,

Please find attached a possible solution. I can see a couple of issues here. Firstly the padding values were fixed, so when the X Scale value was very small the padding value was much larger that the size of the segment. Secondly the equation XSplinePosition*70, will return a scale value of 0 for the first segment (0.0*70), because of this no other segments get created. I've changed this to max(0.02,XSplinePosition)*100 so that there is a minimum starting value.

I hope that helps,

Many thanks,

Paul
Paul Roberts
iToo Software

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1593
Re: Scales along path distribution
« Reply #5 on: September 17, 2014, 02:26:12 PM »
Just to add that if you turn off bend  you will also render each ring segment as an instance.  This will drastically improve performance.



Cheers,

Paul
Paul Roberts
iToo Software

ralphr

  • Newbie
  • *
  • Posts: 29
Re: Scales along path distribution
« Reply #6 on: September 17, 2014, 05:41:21 PM »
Thanks alot Paul!
Its good to see that my math skills are as sharp as ever. :P Completely ignored the possibility of recieving 0 as a value.

I hope you don't mind me asking a follow up question.

This time its about material variation. I'm trying to generate a pattern on the scales created but with some random elements. I apologize up front because I think what I'm going to write will be confusing.

I have two main categories as materials go: No Symbol and With Symbol Each of those categories has 3 veriation in terms of dirt blend masks.

No Symbol Material ID group = 1-3
With Symbol Material ID group = 7-9
*pic groups.png*

Inside the RC Object which places my scales on the ring I used 2 material operators and a conditional node using "when X segment multiple of 2 = true"
When true the material operator with the sequence 1-3 gets used. When false 7-9. So I get a symbol on every second copy with different masks.
So far this works :)

*pic scalres_variation.png*

Now I use the same approach in the RailClone object which places the rings along my splin. Again the 2 material nodes with the same settings and a conditional this time using "when X segment multiple of 3 = true"
Which almost gives me what I want (marked in red) but the effect I anticipated is only 2displayed on 2 rows and ignored on the others(marked in blue).

*pic material_id.png*

What I'd like to have is basically seeing a symbol every third ring and than 2 scales apart.

I hope this is at least somewhat clear of what I want to achive, if not I can upload the scene file tomorrow. :)


Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1593
Re: Scales along path distribution
« Reply #7 on: September 17, 2014, 08:43:16 PM »
Hi Oliver no problem at all.

It look like the problem here is that the single ring RailClone object has only one material ID that needs to randomised. ID 1 can become either 1-3 or 7-9. By the time this is nested inside the second RailClone object there are now 6 potential material IDs to randomise. So to get this to work, each ID will need its own Material operator plus more operators to convert some of the scales with symbols to scales without symbols! Here's how it looks with red and blue materials in place of your textures:



To achieve this the style would like like this:



The first two groups of 3 materials operators are re-randomising the existing material IDs. This is necessary because we turned off "Nest" so the ring RailClone object is not being randomised every time it is used. If you turn on nest the style is much simpler (though as mentioned instancing and Point cloud mode are disabled). Only the material operators that convert red scales to blue are still required:




I've attached the file for you to take a look at.

Cheers,

Paul

 
« Last Edit: September 17, 2014, 08:52:14 PM by Paul Roberts »
Paul Roberts
iToo Software

ralphr

  • Newbie
  • *
  • Posts: 29
Re: Scales along path distribution
« Reply #8 on: September 18, 2014, 10:11:28 AM »
Thank you so much Paul for showing both approaches. This works perfectly! You have no idea how much I appreciate the effort.

Now I only have 1 more question (I think) in Forest Pack you allow scale and density to be controlled with curves. Is there anything like that to control parameters in Railclone with curves? For example in terms of this scene: The scaling of the ring radius is at 50% of its original size at the start of the spline 100% in the middle and 10% at the end.

Cheers,
Oliver

*Edit* I'm aware the effect wouldn't really work with this scene because the rotation of every single scale would have to be adjusted in order to preserve the look of each scale sitting ontop of the next. But since they are in a different RC object they shouldn't be aware of their X position on the spline in the second RC object.

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1593
Re: Scales along path distribution
« Reply #9 on: September 18, 2014, 07:57:27 PM »
Hi Oliver,

I'm afraid there are currently no curve controllers in RailClone, however I can see that they would be useful. I'll talk to the development team and see about the feasibility or a graph node.

Many thanks,

Paul
Paul Roberts
iToo Software

ralphr

  • Newbie
  • *
  • Posts: 29
Re: Scales along path distribution
« Reply #10 on: September 20, 2014, 12:50:08 AM »
Oh well. :) Appreciate you passing it on as a request though!

Cheers,
Oliver