Grasshopper

algorithmic modeling for Rhino

Hi guys, first I want to say this is really cool, Im happy to join the new froum!!!

Still, about the slider animation, I pasted the following code in the vb component, but the vb turns to red, what should I do to make it right?

Dim i As New Integer
Dim x_i As New OnBrep
Dim count As New Integer
count = x.Count()
Dim obj_list As New List(Of IRhinoBrepObject)
For i = 0 To count - 1
x_i = x(i)
Dim obj As IRhinoBrepObject = doc.AddBrepObject(x_i)
obj_list.Add(obj)
doc.Regen()
Next


Dim filename As String = "C:\wherever\whatever" & y & ".bmp"


app.RunScript("-_Render")
app.RunScript("-_SaveRenderWindowAs """ & filename & """")
app.RunScript("-_CloseRenderWindow")


For i = 0 To count - 1
doc.DeleteObject(New MRhinoObjRef(obj_list(i)), True, True)

Views: 10753

Replies to This Discussion

Here's a complete definition that renders a simple animation of grasshopper objects and materials. No need to change anything inside the vb.net component, just change the text of the yellow panel to the correct directory and filename. If you type 'c:\dir\filename' it will create images called filename0.bmp, filename1.bmp, etc inside the c:\dir\ directory.

renderanimation.ghx

*EDIT: ...Finally!
Truely thanks Vicente!!
Vicente..If I dont want to rendering the color things ,just white material , how to do that?
Ok..Its done..I turn the color compent to traffic modem and make them transperent...:P
Or just delete the gradient component and connect a simple white material to the 'mat' input.
Thanks,Its realy helpfull.But Do you know how to stop it during the rendering ?
I think the animate function of a slider can't be canceled. Best bet is to close rhino. You should be able to close it in between iterations without forcing the rhino process to terminate.
Thank you very much~~!
Vicente,

I've been messiong around with your vray animation vb script. I've been able to get it to render individual frames of the slider. so if the slider is say at 0 and then i manually set the value to 10 it will render the 10th value of the slider, but not all of the in betweens.

Is the vb script aimed at setting it to render all the in betweens? or is it set up such that it needs to be done one at a time. One thing i noticed with my version is the Y input (shown for the slider) really has no affect on the script. Is there a part of the script or can there be that says continue to push the slider forward and bake and delete until it reaches x?

Since this forum has been dead for a while, it's possible its the new version of grasshopper that is the problem

-js
I'm using this definition in a file, but having difficulty when VRay is set as the active Renderer.
For some reason Transparency settings aren't translating through the shader.
Does anyone have any information on how to set this option?
When opening this definition in GH 0.8, it does not work for me. The following message comes up:"Unable to cast object of type 'Rhino.Geometry.Brep' to type 'RMA.openNURBS.IOnBrep'. (line: 87)

Would anyone be able to help with that?

Anne
Attachments:

So ive looked at some sample vbnet scripts for rendering through vray, but how do you actually initiate the process. Do you just bake the script that was my first thought but that did not work. also in your script if you hover over the A output it just states null, is this correct or should it show the files that re being output? I realize this is an old topic so maybe it just has to do with the grasshoppper version, or maybe im just clueless? Any help from anyone would be great. Thanks.

 

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service