Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: GT4505 on March 17, 2018, 03:42:17 PM

Title: clipping proxies
Post by: GT4505 on March 17, 2018, 03:42:17 PM
Hi there,

I'm working on a project where I've got some grass tiles over larger area's.
I've started from the tutorial and source files from itoo: https://www.itoosoft.com/tutorials/combining-concrete-paving-and-grass?back=page%3D1
Using this setup I'm experiencing some preformance issues, so I wanted to create a tile with grass combined in one object to distribute it with rc (to make use of the clipping).

I presume this isn't possible with forest (the clipping of the borders)
To keep my files smaller I'm used to convert hi poly objects to proxies.
When doing this the clipping doesn't work with RC, is this normal? Is there a way around this? even switching the diplay to mesh (from the proxy) doens't help.

Thanks
Title: Re: clipping proxies
Post by: Rokas on March 18, 2018, 08:37:46 PM
Hi,
great question,
I tried using tutorial workflow on 60m by 60m plane and I got performance issue too. Could not render.
You are right, clipping borders is not possible with ForestPack,.
Keep in mind that clipping borders with RailClone breaks segments instances- if You have only one object and create RailClone surface, clipped segments (RED) will need to allocate its own RAM portion.
Illustration:
(https://i.imgur.com/fNQ6g4a.png)
It`s no big deal if we have box geometry but if segment is 25MB peace of foliage clipping it adds up in RAM quickly and slows down rendering a lot.
I could not create scene with segments slicing option enabled- my PC could not handle this object.

There is alternative method to clip geometry- both ForestPack and RailClone. It is render-time booleans.
This method is memory efficient- segments are kept as instances.
Demo concept scene can be found here (https://forum.itoosoft.com/railclone-pro-(*)/how-to-check-if-segment-was-clipped/msg12599/#msg12599)


What I ended up doing is creating 5 same size segments with grass variation and concrete tile:
(https://i.imgur.com/sky26LX.gif)

For easy all segment equal padding values I added distanced grass blaces:
(https://i.imgur.com/v2R2A5z.png)

And used RailClone style from Your mentioned tutorial.
Result:
(https://i.imgur.com/oENqYFS.jpg)


P.S.
General tip:
Don`t convert geometry to proxy, but xref it.
Doing so You get benefits of exporting Megabytes of data out of Your scene, but retain ability to use features as ForestPack "Edge mode" boundary checking, "ForestPack Color" and "RailClone Color" maps for color variation.
Title: Re: clipping proxies
Post by: GT4505 on March 19, 2018, 09:52:17 AM
Hi Rokas,

Great, thank you for your reply.
Exactly what I was looking for.

I'll defenitely check out and try this rendertime boolean workflow, I feel that's the only way to keep everything light and low on ram.
Eventually each scene is getting larger and more detailed.
also a good tip to add some grass blaces to set the padding more easily.

Thanks for the tutorial/tips
Title: Re: clipping proxies
Post by: GT4505 on March 19, 2018, 02:04:33 PM
Hi Rokas,

Just a followup question: where do you add this distancetexture?
Do you merge the object to one poly/mesh with a multisub object?

And so do you have to add this distance texture to each multisub object texture?

Thanks!
Title: Re: clipping proxies
Post by: Rokas on March 19, 2018, 02:46:24 PM
Hi Rokas,

Just a followup question: where do you add this distancetexture?
Do you merge the object to one poly/mesh with a multisub object?

And so do you have to add this distance texture to each multisub object texture?

Thanks!

To opacity map slot.
Yes one, multi-material with lots of submaterials...
Yes, same opacity slot to all submaterials ;)
Title: Re: clipping proxies
Post by: GT4505 on March 20, 2018, 01:06:31 PM
Hi Rokas,

Great, will test that very soon.
I presume the inside/outside from the distance texture can determine wether it's an intersection/subtraction?

Thanks

Title: Re: clipping proxies
Post by: Rokas on March 20, 2018, 01:31:58 PM
Switching colors: far=white with inside=black inverts the result.
I attach a simplified scene so it fits to 5MB.
Title: Re: clipping proxies
Post by: GT4505 on March 21, 2018, 12:41:48 PM
Hi Rokas,

Working great.
I was just having a seperate issue where the preview (PC) doesn't correspond to the render.
Other that that would you perhaps know a good script to add a map to a bunch of submaterials? Would come in handy if the submat has quite a lot of materials.

Thanks
Title: Re: clipping proxies
Post by: Rokas on March 21, 2018, 03:03:44 PM
Prepare 1st Material [opacity map] of your Multi-Material. Select object in viewport and run the script. It will instance that first opacity map to all other opacity slots.
Some testing is needed before I can say it is bug free and works in all cases.
Title: Re: clipping proxies
Post by: GT4505 on March 26, 2018, 08:52:41 AM
Very nice, I'll add this to my to my script library!