Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: DT on July 27, 2014, 04:54:01 PM

Title: Railclone slow? Vray 3
Post by: DT on July 27, 2014, 04:54:01 PM
Hi,

I'm trying to create a slate roof using railclone. I modelled 4 cupa slate tiles in 3DSmax and mudbox. They were 800K polygons imported, which probably was too heavy so I reduced them to 7000 polygons each. But when I try to render the scene (the roof of the smallest building, my lightcache takes FOREVER. Have I made an error in my style maybe? I've attached a few screenshots. As you can see I have 4 segments which I mirror each around a different axis I then put them in a randomizer. I also have the same segments but scaled 50% every other row, so I can get a stretcher bond, also mirrored, in 3 ways and randomized. Those 2 randomizers are in a Sequence that is connected together with the first randomizer in a conditional with an X counter equal to 1. I would have sent the file but for some obscure reason it's 2,2 GB big. Is that normal for a few splines, 4 slates of 28000 polygons in total and 30 railclone objects. I don't really have a way of calculating but I'm estimating the total shouldn't be more than 70 000 000 polygons. My test wasn't even more than 20 000 000.

Also the scene consists of 30 something RAILCLONE objects, for each roofsegment I have created a new style. Maybe this is what causes it? I have a dual XEON e5 2695v2, 64 GB ram, Nvdia quadro K4000. I don't think it's hardware related.


Title: Re: Railclone slow? Vray 3
Post by: DT on July 27, 2014, 04:57:32 PM
This was a test with a piece of smaller roof also with railclone. This was with 400K polygons for each slate though, so I'm afraid I won't have that much detail anymore even if it's from far away. I'd rather render with the 400 K polygons than with the low poly ones, So I'm hoping I forgot something :)
Title: Re: Railclone slow? Vray 3
Post by: Rokas on July 27, 2014, 05:41:42 PM
how many MB are only those 4 slates?
how many MB are your 4 slates + RC roof?

edit, I see lots of splines- probbly you have multiple RCs with the same style for one roof ?

Make sure they are using the same geometry by copying style to multiple:
(http://i.imgur.com/I5pu7oq.png)

This solved my issues I had. (http://forum.itoosoft.com/index.php?topic=2240.0)
Title: Re: Railclone slow? Vray 3
Post by: DT on July 27, 2014, 07:32:58 PM
Well the problem is while they are more or less the same Railclone style, they have different parameters due to the angles and orientation differences. Or am I missing something?
Title: Re: Railclone slow? Vray 3
Post by: Rokas on July 27, 2014, 07:56:44 PM
I wonder if copying style would help in the first place.
If it would- then you will have to adjust your parameters.

If you would compress the scene with 7zip, I would love to look at it.
Title: Re: Railclone slow? Vray 3
Post by: iToo on July 28, 2014, 08:50:06 AM
It would be very helpful if you can save the RC objects in a separate scene, so we can test it.

Regarding the scene's size, which takes more space in a RC object are the segments, because the rest of geometry is built on the fly. RailClone uses two modes to store the segments:

a) Using a scene's object. In this case, the plugin only holds a reference so it doesn't take space.
b) Keeping the segment embedded within the RC object (segment's name is shown as --embedded--). In this mode, you can use the procedure suggested by Rokas, to be sure all styles share internally the same object.

About rendering speed, there are two ways to estimate the number total of polygons (and therefore, the instancing efficiency):

a) Using Display->Debug Mode (http://docs.itoosoft.com/display/RAILCLONE/Display+Settings#DisplaySettings-TodebugaRailCloneobjectwhenusingV-Ray), to render instances in a different color (VRay only).
b) Using RailClone Tools (http://docs.itoosoft.com/display/RAILCLONE/RailClone+Tools). This utility generates two groups of items : one object for each segment which can be instanced, and other big mesh with the rest of the geometry.

You can find these and other tips in the  Rendering Best Practices (http://docs.itoosoft.com/display/RAILCLONE/Rendering+Best+Practices) guide.
Title: Re: Railclone slow? Vray 3
Post by: DT on July 28, 2014, 01:40:18 PM
I have checked all this and as far as I know, they all use the same instance, and they are not embedded as I was checking and none were set  as embedded but If I use the copy style to multiple all my orientations change again (as expected). But when I save the file was 20 times smaller. I'll try to copy style to multiple and change my orientation and see what I can find. If it stays this small but still renders slow I'll send the file over.
Title: Re: Railclone slow? Vray 3
Post by: DT on July 28, 2014, 03:31:58 PM
So the file with copied styles and then edited to correct orientations is now around 8 times smaller but still renders the same (mind you it's not my render settings or material because i test render with a default white material). You can find the max file on this URL:  http://vizioen.be/temp/BF_Roof_V3.7z (http://vizioen.be/temp/BF_Roof_V3.7z) max 2015 Vray 3.00.07, latest railclone. It's actually used as an xref scene so render settings and all are not the ones I use.
Title: Re: Railclone slow? Vray 3
Post by: iToo on July 28, 2014, 07:46:51 PM
Thanks for the scene. At quick glance, RC objects are taking much more memory than expected. We are investigating what is the cause.
Title: Re: Railclone slow? Vray 3
Post by: DT on July 28, 2014, 09:36:51 PM
Thanks for the scene. At quick glance, RC objects are taking much more memory than expected. We are investigating what is the cause.

Thank you!
Title: Re: Railclone slow? Vray 3
Post by: Rokas on July 29, 2014, 07:03:03 AM
first of all, not all styles use the same segments- after RailClone26- they are not instances.


using maxscript
$RailClone001.sobjref[1] == $RailClone002.sobjref[1]
Quote
"RailClone003"
"RailClone003 true"
"RailClone004 true"
"RailClone005 true"
"RailClone006 true"
"RailClone007 true"
"RailClone008 true"
"RailClone009 true"
"RailClone010 true"
"RailClone011 true"
"RailClone012 true"
"RailClone013 true"
"RailClone014 true"
"RailClone015 true"
"RailClone016 true"
"RailClone017 true"
"RailClone018 true"
"RailClone019 true"
"RailClone020 true"
"RailClone021 true"
"RailClone022 true"
"RailClone023 true"
"RailClone024 true"
"RailClone025 true"
"RailClone026 false"
"RailClone027 false"
"RailClone028 false"
"RailClone029 false"
"RailClone030 false"
"RailClone031 false"
"RailClone033 false"
"RailClone034 false"

That aside, even those which are instances between themselves, are not instances in top part and bottom part, of your style:
(http://i.imgur.com/FnvbmVi.png)

Problem is, that bottom part uses your not optimized plates- but ones with 800000 faces.

The question is, why railclone displays like they are instances from the scene,- why it doesn`t say "embedded", which they are.
After extraction:
(http://i.imgur.com/03wkKnm.png)
Title: Re: Railclone slow? Vray 3
Post by: iToo on July 29, 2014, 11:20:01 AM
Thanks for your help, Rokas.

As you pointed, RailClone026-034 are using yet the high-poly geometry. Although Segment's name is correct in the Style Editor, the reference to geometry is not updated, probably because a previous collapse mesh operation. This issue is described here (http://docs.itoosoft.com/display/RAILCLONE/Segments#Segments-Toupdategeometry). In this case the problem is solved clicking the "Reload Segments" button in the Style Editor.

Ideally the reload process should be done automatically by RailClone, to avoid similar problems. We'll work on that.

Regarding the duplicated segments in the sytle (Top/Bottom in the image), there are not problems if both points to the same object. Anyway, when possible is preferable to use unique segments.

By the way, if only there are minor differences between those RC styles (as the Clipping Area orientation in your case), you can export that parameter and copy the style safely. The values in the "Parameters" rollout are not copied with the "Copy Style" operations.
Title: Re: Railclone slow? Vray 3
Post by: DT on July 29, 2014, 06:18:49 PM
Thank you all for the reply. Much appreciated. I have succesfully reduced the scene to 30 MB and it now renders MUCH faster. Unfortunately I still have 1 problem to solve.

As you can see in the attached screenshot. The vertical siding slates are missing a few slates. but I've managed to fix that. The other problem is that that of the cut. I don't know if there's a way that the bottom doesn't get cut but instead a full tile at the edge of the clipping area begins (this is only necessary for the smaller house and the small roofs that are on 'eye level' you don't see it anywhere else i think. Also the overhanging smaller roofs shouldn't be cut on the sides either as they are rectangular in shape. Any ideas?

I've uploaded the fixed max file too. You can find it at: http://vizioen.be/temp/BF_Roof_V4.7z
Title: Re: Railclone slow? Vray 3
Post by: Paul Roberts on July 29, 2014, 08:02:50 PM
Hi,

To get rid of the clipping at the bottom of the slope you may have to make a few small changes to your style. When using Clipping Paths RailClone uses its local coordinate system to start building the Array. This means that in order to get this to work,  you will have to set your exported Z Rotation parameter to 0, and instead rotate the RailClone object itself so that the Y Axis points up the roof slope. That way you will ensure a full tile at the bottom of the roof.

(http://lonelymonk.com/forum_images/6e471b0a3f9849f89cc7f9f4f36945ee.jpg)

As the array now starts from the bottom of the roof, it will be necessary to move all the clipping splines down to compensate, you may also need to rotate the tiles in the other direction for the overlap.

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

Nearly there, but you will still see some clipping. So to remove this we need to shift the bottom row of tiles up a little, away from the clipping path. To do this I've added a conditional operator to detect the first row (Y Count = 1) and used a transform operator to add some bottom padding to move the tiles up a little.

(http://lonelymonk.com/forum_images/5f11d692eff04c309eedc49c9955f8fa.jpg)

To prevent the clipping on the ends of the rectangular roofs I've removed the conditional operator that was being used to detect the fist segment on the X axis and instead I've wired the sequence operator that is used for the first segment directly into the left and right input slots of the generator. This will provide a clear start and finish to the style and should prevent clipping from occurring on the sides.

You can download a file here  (https://dl.dropboxusercontent.com/u/218877678/iToo/BF_Roof_V3_2014.rar)with some of these changes made. I hope that helps, please let me know if you have further questions.

Cheers,

Paul
Title: Re: Railclone slow? Vray 3
Post by: Rokas on July 29, 2014, 09:50:46 PM
How do You rotate Pivot, I have problems rotating it and forcing RC to behave as wanted:
(http://i.imgur.com/CfDA9Nd.png)
Title: Re: Railclone slow? Vray 3
Post by: Paul Roberts on July 30, 2014, 12:00:26 AM
Hi Rokas,

You should be able to just rotate the whole object so that the y axis point toward the slope and then reselect the spline,  but that looks correct to me.  Because the array now starts from the bottom not the top you will need to change the angle of the tile segments so that they overlap correctly. 

Thanks,

Paul.
Title: Re: Railclone slow? Vray 3
Post by: Rokas on July 30, 2014, 07:13:30 AM
I believe roofing deserves separate tutorial, and some styles, please ;)
Title: Re: Railclone slow? Vray 3
Post by: DT on July 30, 2014, 11:46:49 AM
Thank you very much for the explanation. I have succesfully edited the roof. It looks exactly like I want now.

(you don't need to rotate the pivot but you need to rotate your RC object with the local axis to see where the Y axis are)