hey, i managed to getPixel my 7megapixel holiday photos... just kidding. but the rest of it works really nice!
thanks for sharing and clarification, frank On Oct 18, 4:38 pm, visose <[EMAIL PROTECTED]> wrote: > I think its in the to-do list, at least its in the wish list. I have > requested this a couple of times. Ideally there should be a 'material' > component (so it could be rendered) not just the display color, and > then with another component you could associate geometry and > materials. Maybe I'm asking too much but it would be really cool (and > very useful for architecture) to be able to change not only color but > transparency, etc. to geometry using the same parameters that drive > the geometry itself. > > On Oct 18, 2:57 pm, Marc Hoppermann <[EMAIL PROTECTED]> wrote: > > > true, the calculation of that could be done outside the function. It > > was just a first test... > > > I haven't really had a look at the color compornets yet. > > Guess I should play around with them, too ;o) > > By the way, up till now I only know of the meshPaint that has an > > ipnput for colors, right? > > > It would be great to also have a component for other objects that uses > > the colorInput for the Object color. > > Thats a tricky one as that information has to be used during the > > baking process and a script doesn't have access to the final Object > > that is created then. > > > On Oct 18, 12:46 pm, visose <[EMAIL PROTECTED]> wrote: > > > > I haven't tried it, but I think you could spare the last line of code > > > that calculates the intensity value. Just output the pixel color > > > directly and use one of the color components that has hue saturation > > > and brightness as outputs. > > > > On Oct 18, 11:39 am, Marc Hoppermann <[EMAIL PROTECTED]> wrote: > > > > > hey frank.. > > > > > this line is locked because its automatically created by grasshopper. > > > > You have to create a new input variable which is not possible in the > > > > script itself. > > > > In order to do that just right click the component -> go to input > > > > parameters and add a new one called: strFileName. > > > > With that one you Input the filename of the image. Be aware that the > > > > screenshot I send will output information over each Pixel of the image > > > > so don't ur 7 megaPixels holiday phoyo as a test... 100 x 100 is > > > > already a lot of information... > > > > > The same you have to do for the output: in this case R,G,B and lum. > > > > You will notice that the inputParameter part of your component is > > > > updated to it and you can plug things to it... > > > > > --------------------- > > > > It was just a first test, but I have plenty of examples for the > > > > RhPicture PlugIn. When I have some spare time I will post some ghx > > > > files... > > > > Just google the DotNET graphics class and you will find more > > > > inspiration. Like creating images form code where you just have to use > > > > setPixel instead of getPixel ;o) > > > > > Marc > > > > > On Oct 18, 11:01 am, frankS <[EMAIL PROTECTED]> wrote: > > > > > > think i understood how the file get into the component: > > > > > another inlet shows up after a new variable is being declared. and > > > > > that is where the bitmaps filename goes, right? > > > > > still, i cannot edit line 22... > > > > > > see > > > > > screenshot:http://groups.google.com/group/grasshopper3d/web/VB.net_How-To-declar... > > > > > > On Oct 18, 10:52 am, frankS <[EMAIL PROTECTED]> wrote: > > > > > > > this is a great example! > > > > > > i try to keep track here but am quite unexperienced with scripting > > > > > > (while willing to learn). > > > > > > started by copying the code from the screenshot. > > > > > > > there are some issues that keep me from get this to run: > > > > > > 1. the script editors content in only editable in between the "your > > > > > > code" section. how can i declare variables in line 22? it appears to > > > > > > be locked. the tooltip error message at the outlet states that > > > > > > strFileName is not declared. > > > > > > > 2. where does the bitmap come from? is there a filebrowser dialog > > > > > > popping up when the code is fixed or do i need to connect anything > > > > > > to > > > > > > the inlet? when exactly is the script being executed? the moment i > > > > > > click OK button or when there is input coming in? > > > > > > > thanks, > > > > > > frank > > > > > > > On Oct 17, 1:28 am, Marc Hoppermann <[EMAIL PROTECTED]> wrote: > > > > > > > > hey visose... thats a nice one, too... > > > > > > > Its really amazing how few objects are neccessary to identify the > > > > > > > base > > > > > > > image... > > > > > > > > Its a pretty good way of controlling a 2d parametrer grid (point > > > > > > > grid > > > > > > > or UVs on a surface). > > > > > > > I've used the RhPicture PlugIn for Rhinoscript quite extensively > > > > > > > for > > > > > > > these purposes (facade, etc...). > > > > > > > > Marc > > > > > > > > On Oct 15, 5:36 pm, visose <[EMAIL PROTECTED]> wrote: > > > > > > > > > Nice example. I managed to recreate something similar with the > > > > > > > > screen > > > > > > > > shots you posted. Here's my cat made out of > > > > > > > > boxes:http://grasshopper3d.googlegroups.com/web/bansan.jpghttp://grasshoppe... > > > > > > > > > On Oct 14, 3:30 am, Marc Hoppermann <[EMAIL PROTECTED]> wrote: > > > > > > > > > > Now that the scriting component works I wanted to test it > > > > > > > > > right > > > > > > > > > away... > > > > > > > > > > The first thing that came into my mind was to use it for > > > > > > > > > reading Pixel > > > > > > > > > images (similar to Davids RhPicture Plugin for RhinoScript) > > > > > > > > > > Unfortunately I don't know how to place images here so here a > > > > > > > > > link:http://shift-lab.blogspot.com/ > > > > > > > > > > The VB component takes the filename of an image and a (x,y) > > > > > > > > > coordinate as an input and outputs the r,g,b values and the > > > > > > > > > resulting > > > > > > > > > greyscale value at the Pixel(x,y). > > > > > > > > > > For that it uses the "getPixel"-method of the DotNET Graphics > > > > > > > > > class... > > > > > > > > > > @David: great stuff!! this is what I have been waiting for... > > > > > > > > > Only one question so far: Is it possible to write code in the > > > > > > > > > locked > > > > > > > > > (grey) areas? It would be great to be able to add Import > > > > > > > > > statements. > > > > > > > > > > Hope to be able to post some more soon, > > > > > > > > > Marc- Hide quoted text - > > > > > > > > > - Show quoted text -- Hide quoted text - > > > > > > - Show quoted text -- Hide quoted text - > > > > - Show quoted text -
