Itoo Software Forum

Author Topic: Need help with complex setup  (Read 1220 times)

RobH2

  • Newbie
  • *
  • Posts: 28
  • Who is staring at the sea is already sailing.
    • NVision4D
Need help with complex setup
« on: April 25, 2015, 05:38:50 AM »
I'm new to RailClone and I think I'm being a bit too ambitious as a beginner but what I'm trying to do is not that hard I don't think. There aren't just enough tutorials and the documentation is very thin for this program. I don't know how you learn the tiny specifics of it.

At any rate, I did the Parquet floor tutorial and it led me to a potential solution for a project I'm doing.

I'm covering a fuzzy GoogleEarth map with patches of crops and farmland. I've been doing it by hand but thought that an array would be perfect. Using the Parquet floor tutorial I've tried to set it up but am stuck and looking or help.

My segments are a bit more complex than the parquet piece and the 1/2 parquet piece. I have 5 pieces that represent parcels of land. I have 36 maps to randomly put on them, just like the floor tutorial.

The largest rectangular piece I call a '4X' because it's 4 times larger than my smallest piece. My second piece I call '2X'. It's just 1/2 of the larger '4x' piece. At this point, it's very similar to the floor tutorial but I have yet another piece that I call a '1X.' It's 1/2 the size of the '2X' piece. Beyond that I have a '4X' that is vertical and a '1X' that is horizontal. I know this is confusing but my attached photo should help. I needed this many pieces so that the land will look realistic. If you look at Google Earth at farmland out west, it's both vertical and horizontally oriented and the plots of land seem to be sized like my 4x, 2x and 1x pieces. That's how I came up with them, I just studied the real thing.

The problem is, I can't figure out how to fill in gaps. I can get a border spline to fill, but I have a lot of gaps. I thought there might be an expression or some trick that could tell the graph to fill in the gaps with either 1x vertical or 1x horizontal pieces.

Have a look at the attached and let me know if any of you gurus can help me solve this. It's for a real job so I'd like to figure it out in the next few days.
3ds Max Design (3D Studio thru Max 2018), ForestPack Pro 5.4.0, RailClone 3.0.7, ASUS P9X79 Motherboard, Intel i7-3960x, Hydro H80 CPU Chiller, 64GB DDR3 Ram, Quadro K5200 Display Adapter

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1551
Re: Need help with complex setup
« Reply #1 on: April 25, 2015, 03:28:29 PM »
Hi Rob,

Unfortunately this is a trickier style to pull off than it seems. One of the key aspects of RailClone is how the A2S generator builds it's array. The best way to think of an A2S array is a stack of L1S arrays, each of which is calculated independently, unaware of those above and below. Also each row is always as high as it's largest segment, which is why the gaps appear. You can find more information about this in the A2S chapter of the getting started guide which you may find helpful if you're new to RailClone.

With this is mind I think the easiest way to create this style is to combine a number of segments before adding them to RailClone. These are the permutations I came up with:


Within each segment I've added one of up to 4 Material ids so that each field can take a separate randomised material.

These are then added to a RailClone object with a style that is essentially the same as the herringbone Parquet floor tutorial. The main differences being that I've added a randomise node to select from the segments shown above and I'm using an expression to automatically calculate the padding and transform values needed to create the pattern. This has the advantage of allowing you to change the geometry and the style should still work correctly (provided the same 1:2 ratio between sides is maintained).

The node graph looks like this. Each section is labelled but you'll find more info in the attached file.



This graph give you this final layout. The herringbone pattern was chosen to try to reduce the visibility of obvious rows and columns.



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

Many thanks,

Paul
Paul Roberts
iToo Software

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1551
Re: Need help with complex setup
« Reply #2 on: April 25, 2015, 03:33:40 PM »
I meant to add, you can also get different effects by adjusting the presence value for a segment in the Randomise operator's properties.



For example you could have less large fields by reducing the value for that segment (It helps if you've given the geometry sensible names, as I should have done in this example!)

Many thanks,

Paul
Paul Roberts
iToo Software

RobH2

  • Newbie
  • *
  • Posts: 28
  • Who is staring at the sea is already sailing.
    • NVision4D
Re: Need help with complex setup
« Reply #3 on: April 25, 2015, 04:10:52 PM »
Hi Paul,

I'm so glad you were able to see what I was trying to describe and you nailed it. Problems like this are hard to describe and I envision most readers eyes glazing over after the second sentence...lol...

This is exactly the kind of thinking I need and is brilliant. As I learn RC more and how it thinks I'll get better at it but your logic makes perfect sense now that I see it. After spending literally all day yesterday on this, it's interesting that as I went to bed last night I was thinking that there has to be some way to do this. I approached it as a logic problem instead of an RC problem and I was thinking that if I had several groups of objects that each formed a 4x4 master pod, that within that 4x4 pod I could have a bunch of various arrangements. Then, I just spread those 4x4 pods around. It appears I was on the right track.

I haven't dived into this yet but will today but I have one question. You mention that the segments were assigned 1 of 4 material id's that could be randomized. Will that allow me to use any number of textures? What I mean is, I have already created 46 different textures for the 4x segments, 20 for the 2x segments and 20 for the 1x segments. Will all of those still be spread around randomly using the 4 material id's?

You obviously spent a lot of time responding to me. I can't tell you how much I appreciate it. It's going to blow my clients socks off when I draw an irregular shaped spline over the map and we watches it fill in with farmland that wraps around mountains and honors roads and river boundaries. It's a perfect use for the new clipping spline function. I've been doing it manually and it takes hours. This will take seconds. I'm really excited about it. My wife laughs at me when she sees what gets a 3d guy excited...

Paul, you are the man. Thanks. I can't wait to build this and I'll be reporting back. I'm sure this will help other users. In fact, I've been wanting to do a tutorial for awhile. I've been doing 3D for over 20-years and I've always wanted to give back to the community. This would be a perfect one to do a tutorial on.

I'll report back soon.

Best regards,

Rob

3ds Max Design (3D Studio thru Max 2018), ForestPack Pro 5.4.0, RailClone 3.0.7, ASUS P9X79 Motherboard, Intel i7-3960x, Hydro H80 CPU Chiller, 64GB DDR3 Ram, Quadro K5200 Display Adapter

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1551
Re: Need help with complex setup
« Reply #4 on: April 25, 2015, 04:48:38 PM »
Hi Rob,

No problem at all, I'm glad I could help out. Regarding the IDs, if each size is taking different textures then you may indeed need a few more. According to my calculations you'd need 7, this is based on the maximum number of the same type of section that you might get in a single group, as follows:

4 x  sections, only one per group with 46 textures = Randomise ID 1 between 1 and 46
2 x sections, maximum 2 per group with 20 textures = Randomise IDs 2 & 3 between 47 and 67
1 x sections, maximum 4 per group with 20 textures = Randomise IDs 4,5,6 & 7 between 68 and 88

In my example to get this to work you'd just need to adjust and add a few more material operators, and change the Material ID assignments to match on the source geometry.

I hope that helps, I look forward to seeing what you come up with. I think it could make a very interesting tutorial.

Many thanks,

Paul
Paul Roberts
iToo Software

RobH2

  • Newbie
  • *
  • Posts: 28
  • Who is staring at the sea is already sailing.
    • NVision4D
Re: Need help with complex setup
« Reply #5 on: April 25, 2015, 05:15:10 PM »
Right on Paul. I'm working on it now and realized that I needed to add a few IDs. I'm wiring it up as we speak. I'll report back later today.

It's working nicely, just working out a few bugs in my graph as I change your base graph. But, this is how you learn to drive new things and is the fun part. Yours worked perfectly and I'm modifying it to get it exactly like I need it. Without your base graph and insight I'd have been lost.
3ds Max Design (3D Studio thru Max 2018), ForestPack Pro 5.4.0, RailClone 3.0.7, ASUS P9X79 Motherboard, Intel i7-3960x, Hydro H80 CPU Chiller, 64GB DDR3 Ram, Quadro K5200 Display Adapter

RobH2

  • Newbie
  • *
  • Posts: 28
  • Who is staring at the sea is already sailing.
    • NVision4D
Re: Need help with complex setup
« Reply #6 on: April 25, 2015, 08:34:31 PM »
Paul. It's working perfectly. I had to make a few minor tweaks. I've done a screen capture of me using it. I'll PM you a link.

I have one last question. What's the theory behind the script you used? Instead of taking it at face value, I'd like to understand it to further my knowledge.

Thanks again for your help. My client is going to wet his pants on Monday when I show it. You went WAY and above the call of duty to help me out on this. My wife said, "well, that's what you would have done too," as she's seen me spend 3 or 4 hours answering someone on a 3D Printing forum where I am a moderator. Again, thanks...

« Last Edit: April 25, 2015, 08:47:49 PM by RobH2 »
3ds Max Design (3D Studio thru Max 2018), ForestPack Pro 5.4.0, RailClone 3.0.7, ASUS P9X79 Motherboard, Intel i7-3960x, Hydro H80 CPU Chiller, 64GB DDR3 Ram, Quadro K5200 Display Adapter