Itoo Software Forum

Forest Pack => Forest Pro (*) => Topic started by: thefox on December 05, 2014, 02:57:53 PM

Title: Maintaining scale on variing heights - hanging lamps
Post by: thefox on December 05, 2014, 02:57:53 PM
Hi,

how would it be achieved to have a forest object for a bunch of hanging lamps which vary in height without being streched?
The cable may be streched but the lamp shade may not.. Maybe having a top cover of the cable to the wall not being streched to..
I have railclone too, maybe in combination or railclone only?

In particular for this situation, see sketch.

For achieving the variing endpoint (edit: variing storey height, i mean) i might create different forest objects with copied values, except the lenght value.



Title: Re: Maintaining scale on variing heights - hanging lamps
Post by: Michal KarmazĂ­n on December 05, 2014, 05:41:27 PM
Hi,

In my eyes, the RailClone (http://www.itoosoft.com/railclone.php) plug-in suits better for tasks like that. It's possible to make style, which will allow you to modify the size just where needed (cables) and leave the lamp geometry intact. Also there is a lot of possibilities how to control the final effect by using expressions and adding some randomness. Attaching some screenshots of possible style (for simplicity using just one "1D Array" Linear1S (http://docs.itoosoft.com/display/RAILCLONE/1D+arrays+-+Generator+L1S)). Feel free to check the style in attached file with simplified geometry. Hope you'll find it useful.

Kind regards,
Title: Re: Maintaining scale on variing heights - hanging lamps
Post by: thefox on December 08, 2014, 09:42:14 AM
Great! Thank you very much!

I'll have a in-depth look shortly.

It was not clear that the lamps will be in an area, not on a line only (sorry :) ), so using the 2 splines array will work the same but on an area?

PS: Please upload the scene in Max Ver. 2013..

Title: Re: Maintaining scale on variing heights - hanging lamps
Post by: iToo on December 08, 2014, 10:15:59 AM
Hi, here is the scene for Max 2011 and above.
Title: Re: Maintaining scale on variing heights - hanging lamps
Post by: thefox on December 08, 2014, 10:57:23 AM
Thank you.

I'll definitely keep this as a preset when I got it to work properly.

I have two main problems left:

- randomizing presence is hard to control and places objects in clusters..
- transforming (translate) the output of the latest compose node shifts the lamps parts seperately..

Probably some basic misunderstanding of mine, hope you can help me out ;)
Title: Re: Maintaining scale on variing heights - hanging lamps
Post by: Rokas on December 08, 2014, 11:50:17 AM
I would suggest using nested items:
(http://i.imgur.com/am5aqTc.png)

Title: Re: Maintaining scale on variing heights - hanging lamps
Post by: Paul Roberts on December 08, 2014, 01:11:20 PM
Hi,

I agree with Rokas, nesting the lamps makes this style much easier. For the individual light style I've simplified it slightly to use a Random node in the X Size input. I've also added the Shade to the End input and the Cable in the default. The generator's mode has been set to Scale:

(http://lonelymonk.com/forum_images/3bab7dbefc7f46eab45a1d6af27c4f44.jpg)

The issue you are seeing with Presence is caused by using a null segment with a size on the X axis of zero. When it encounters one of these, no more segments will be added in that row. This is what is causing the clustering to one end of the array seen in your original file. The solution is to add a Fixed Size value to the null segment, in this case I used the width of the lamp head. I've also added the Padding values from Rokas's style to maintain the grid layout:

(http://lonelymonk.com/forum_images/8530c9d7631d4996803648e6dde8b1b1.jpg)

I hope that helps clarify things, please let me know if you further questions.

Many Thanks,

Paul
Title: Re: Maintaining scale on variing heights - hanging lamps
Post by: thefox on December 08, 2014, 03:46:13 PM
Yeah, great.

Thanks to both of you, Rokas and Paul!

I'm not deep enough into railclone but could manage to understand most of the values.

Is there a way to avoid the slicing at the border of the clipping spline?
Title: Re: Maintaining scale on variing heights - hanging lamps
Post by: Rokas on December 08, 2014, 03:57:53 PM
sure:

(http://i.imgur.com/pCD1Q2l.gif)
Title: Re: Maintaining scale on variing heights - hanging lamps
Post by: thefox on December 08, 2014, 05:32:20 PM
Perfetto.

Owe you a beer. ;)

Title: Re: Maintaining scale on variing heights - hanging lamps
Post by: thefox on December 10, 2014, 12:33:08 PM
Well.. lamps dont work well without light..

I found out that it's not directly possible to scatter vray lights with railclone (or FP) - but what would be the best way to get light attached to the objects?

Using the utilities to generate a mesh from the RC object? Aligning vray lights to those? E.g. with instance_align script..

Too bad it destroys the paramatric options. Therefor if there's a better workflow than the one described please tell me. ;)

PS: How can I at least generate a single mesh from each railclone element, in this case each hanging lamps?
Title: Re: Maintaining scale on variing heights - hanging lamps
Post by: Paul Roberts on December 10, 2014, 06:19:53 PM
Hi,

When using RailClone tools with objects that include nested styles, I'm afraid the end result is always a single collapsed mesh. This makes using the Clone and Align tools to add lights problematic for this style. To resolve this I've attached an amended version that uses only a single RailClone object, you can then use the Clone and Align tool to add the lights as described here (http://forum.itoosoft.com/index.php?topic=2600.msg9891#msg9891). Note that this file requires the RailClone 2.4 beta as if uses exported sizes to calculate the position of the lampshades.

Alternatively, if it isn't possible to use clone and align tools (or similar) because instantiate doesn't produce individual instances - as can happen if segments are deformed - I've had some success with using Rappatools (http://remusjuncu.com/rappatools/). This is a commercial collection of scripts but the previous version  (http://remusjuncu.com/maxscripts/#rappatools2)is free and contains the facade script that we need. Using this script you can replace each polygon assigned with a Mat ID of 313 with any max object, including lights. The procedure to use this is as follows:

(http://i.imgur.com/zu16S4F.gif)


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

Many thanks,

Paul
Title: Re: Maintaining scale on variing heights - hanging lamps
Post by: thefox on December 11, 2014, 03:19:44 PM
Thanks Paul,

appreciate your effort!

I was thinking the nested RC being the cause, too.
Otherwise it might have produced single objects, not instances as they are partly unique at last.

I'll have a in-depth look asap as I'm on another little project right now. ;)

Title: Re: Maintaining scale on variing heights - hanging lamps
Post by: thefox on January 12, 2015, 01:46:55 PM
Works perfectly! Thanks!

What about a little helper tool to maybe generate a bridge between a placeholder element within a railclone object to ease the link of non-mesh objects (maybe not lights only..) to RC elements..?

Would make it way more easy to swap elements and, more important, keep the paramatrical possibilities.

Or is there a reason why this would hardly be possible?

Title: Re: Maintaining scale on variing heights - hanging lamps
Post by: thefox on January 28, 2015, 09:27:32 AM
Hey, once more,

I'm up to finish this project - and wanted to thank for your great support on helping achiveing the wanted results, perfect!
I'll definitely keep this as a base for similar purposes.
Maybe you could even think about adding sth. alike to your presets, definitely come in handy.

But before I forget about things when the project is done, what about the last question, just quoting myself:

"What about a little helper tool to maybe generate a bridge between a placeholder element within a railclone object to ease the link of non-mesh objects (maybe not lights only..) to RC elements..?

Would make it way more easy to swap elements and, more important, keep the paramatrical possibilities.

Or is there a reason why this would hardly be possible?"

I guess this is not really possible otherwise it might be there already, still I'd would like to know. ;)
Title: Re: Maintaining scale on variing heights - hanging lamps
Post by: Paul Roberts on January 28, 2015, 11:04:03 AM
Hi,

Thanks for the kind words, I'm glad we could help out.

Thanks too for the suggestions. I've added the lights idea to out libraries wishlist. As for the helper object, unfortunately RailClone cannot use non-geometric objects (such as lights), because it's a procedural geometric object. In the past we have tried some tricks to sidestep this limitation (specifically to create lights), but so far we are not entirely satisfied with the results. That said we haven't discarded this idea for a future version, if we find a feasible way to implement it.

Cheers,

Paul
Title: Re: Maintaining scale on variing heights - hanging lamps
Post by: raistlin on January 30, 2015, 03:13:45 PM
Maybe a way where we can replace a helper/ detachable polygon/ group?... Or a pivot which it could be kept on each new object and where we can send our object to scatter... For sure it could be interesting...
But in another way Vray could have a shader to transform everything in a light.. Not "optimised" but still a solution...

In all, i'm interestd by that post... :)