Design forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Randomize Materials

Anonymous
Not applicable
I am just starting to play with the connection plugin and see that V20 has many more parameters to play with. I am currently doing a randomized facade that is working well. However I am wanting to randomize the colour of some fins between two different surface materials. Any thoughts as to which grasshopper component will allow me to plug different surface or composite inputs into?

As an aside the my Archicad points dont seem to be translating into grasshopper points like they should. They seem to shift in strange directions. What could be affecting this?

Thanks

Derek
1 ACCEPTED SOLUTION

Solution
leceta
Expert
"pick´n´choose" component serves for this purpose (in conjuction of other compontents, as shown in the image)
Captura_00002.JPG

View solution in original post

31 REPLIES 31

Solution
leceta
Expert
"pick´n´choose" component serves for this purpose (in conjuction of other compontents, as shown in the image)
Captura_00002.JPG

leceta
Expert
...

leceta
Expert
this definition has better randomness (random seeds)
Captura_0002.JPG

leceta
Expert
in archicad...
Captura0004.JPG

Anonymous
Not applicable
Thank you! Some great ideas in there. I ended up using Random Split List from Lunchbox which also has a seed value so I could change my 'randomness' easily.

I am still having problems with converting an archiCad point into a grasshopper point. Archicad is in mm and Rhino is in mm but the data is coming in as metres. Any thoughts as to how to get the point data in mm without deconstructing the points multipling by 1000 and constructing the point?

Anonymous
Not applicable
@leceta

Thank you for posting those screenshots.

Can you explain how you added the x0 x1 x2 nodes to the object settings component? If I zoom into it there aren't any options to add those.

Perhaps it was available in a previous version and now it isn't...?
It would be great to know how to achieve this.

Thanks.

leceta
Expert
Hi yafimski, this is possible also in the current version.

I wrote a custom gdl object for the grid shell beams, and then exposed those parameters (x0,y0,z0,...) to grasshopper. You can expose those, right clicking over the component and checking the object's parameters you want to feed from grasshopper.

I hope I answered your question, you can find more info about the usage of custom GDL objects plugin manual. It works the same way with any object you have on your Archicad library.

Anonymous
Not applicable
Hi Ieceta,

Thanks for the quick reply.

Do you think it will also be feasible to perform this kind of color randomization on walls and slabs etc. and not only on objects?

leceta
Expert
sure. you just need to apply a random building material assignation logic to the elements (wall, slabs, whatever...)
I will try to take time this weekend to illustrate the process.

Anonymous
Not applicable
Hi

I'm attaching my attempt for walls using your script as a guide.

I think there are a few issues that I didn't understand:

1 - it seems the random numbers are in the domain 0.0 to 3.0 and this limits the color indexes not to include index 3 itself. So probably it should be 0.0 to 4.0 right?

2 - I'm not sure archicad elements created this way (especially walls since they have quite a lot of bugs) can show color directly in the AC window.

3 - Not sure that 'color swatch' can translate to 'building material' which gives the wall its color. I connected it for now to 'property settings' but in AC itself I wasn't sure which 'type' of parameter needs to be created in the Property Manager (i.e. integer, number, boolean etc.)

4 - perhaps creating this kind of color randomization needs a wall as input and not a 2D curve. Since the GH-AC connection has a lot of bugs and missing functionality, it's hard to know if it doesn't work because of the plugin or because of some error in the script.

Hopefully you'll be able to check these things out over the weekend.

Thanks

Anonymous
Not applicable
Some follow up work I've tried.

In the image below you can see the data types from the various components. It seems like the Path Mapper component outputs correct RGB values. From the Property Settings however, the element classification is a Beam, when the element I want to create is a wall.

Initially the settings in the Property Manager in AC were according to the below image: I thought that might be an issue, so I changed it to the following setting below, but unfortunately this didn't bring up the property in the Property Settings selection options in GH. It just wasn't appearing there :
Would you have any idea how to move this forward?
Thanks.

Anonymous
Not applicable
Thanks for this topic. I have missed the possibility to expose GDL parameters to GH. Nice..

If you want to change element classification I suppose you should right click and select proper type.

Anonymous
Not applicable
@kzaremba,

Yes this is exactly how it's done, and it's no problem to add properties to that component, but the issue is how to get building material or surface material properties into the wall settings in a valid way that will randomize the wall colors.

leceta said he might have an answer.

Do you know of any way to achieve a correct result? (see the attached images in my previous post).

Thanks

leceta
Expert
hi, Yafimski,
sorry for the delay. The plugin was crashing my Rhino/GH when launching grasshopper from a month ago or so, and I couldn't figure out the solution. It seemed to be some compatibility issue with another piece of software installed on my machine. well, today I wake up decided to solve this problem... and I spend almost the entire day looking for a solution, and I ended up formatting my hard drive!!! someday this plugin will be stable, but...

anyway, now I can illustrate the solution for you (and at least I can play with the connection plugin...)

The solution is very similar to the previous one. I guess you were missing the Composite parameter in wall settings component.
I created four composites in ArchiCAD, each one with a colored building material. It is pretty straightforward. Look the picture... I hope it is what you were trying to achieve.

saludos
leceta

Anonymous
Not applicable
Hi Ieceta,

Thank you for the additional help! I've replicated what you've done here, excluding the height variation because I don't need that.

At the moment I can't seem to achieve the same color variation as you have. All of my walls come out with the same composite type instead of 4 different ones, even if from the panels in the attached image you can see that it should be 4 colors not 1...
What I do want to vary with a graph mapper or another method is the color weights, so "how much of each color there is" across all of the walls created. I'm thinking I can either use a graph mapper or there is a component that allows to give a 'weight ratio' to a set of numbers.

So my questions are:
- Do you have any idea why this is?
- Can you explain why you reparametrized the end results in the wall component?
- Is there a way/component to add the mentioned 'weight ratio'?

leceta
Expert
you have to be aware of the path of your data tree. what I do in the last component is not a reparameterization, but a combination of "simplify" and "graft" operations, precisely in order to match the data trees of both Curve List and Wall Settings List.

to weight the ratio, you should input a evenly distributed series of numbers (0,1,2,3,...) to your graph mapper, instead of a randomly distributed one. I guess that this should work. I will try it later...

further info about data trees: http://wiki.bk.tudelft.nl/toi-pedia/Grasshopper_Data_Tree_Editing
and to become a master : https://vimeopro.com/rhino/grasshopper-masterclass-with-david-rutten/video/79914772

leceta
Expert
no, you were right... to obtain weighted random distribution, random series connected directly to graph mapper is a better solution. That way the graph doesn´t need to be noisy, so weight control can be more intuitive.

Anonymous
Not applicable
Do you know why the walls I generate all come out with the same color despite being different composite profiles?

(the image in my previous post is relevant).

Barry Kelly
Moderator
yafimski wrote:
Do you know why the walls I generate all come out with the same color despite being different composite profiles?

(the image in my previous post is relevant).
I have no idea what you guys are doing - looks interesting though.

But a thought.
Have your walls all got surface overrides happening? - so you are seeing the override and not the composite.

Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

Didn't find the answer? Start a new discussion

Labels

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!