Hi,
in the rhino forum I have got a very nice script good for arch viz. Now we can use 2D textures of tree and peoples with opacity map (I think it will be ready in the next releases) at camera aligned planes.
The script helps to align the planes with the texures to the camera again after the camera was moved.
-Micha
Here the script ready to copy to a rhino button:
in the rhino forum I have got a very nice script good for arch viz. Now we can use 2D textures of tree and peoples with opacity map (I think it will be ready in the next releases) at camera aligned planes.
The script helps to align the planes with the texures to the camera again after the camera was moved.
-Micha
Here the script ready to copy to a rhino button:
Code:
_-runscript (orientBillboardsToCamera Sub orientBillboardsToCamera() Dim objects objects = Rhino.GetObjects("Select billboard surfaces", 8,, True) If Not IsArray(objects) Then Exit Sub Dim redrawing redrawing = Rhino.EnableRedraw(False) Dim cameraLine, flattenedCameraLocation cameraLine = Rhino.ViewCameraTarget flattenedCameraLocation = setZ(cameraLine(0), 0) Dim objectID For Each objectID In objects orientBillboard objectID, flattenedCameraLocation Next Rhino.EnableRedraw redrawing End Sub Sub orientBillboard(objectID, flattenedCameraLocation) Dim centroidPoint, centroidUV, centroidNormal centroidPoint = Rhino.SurfaceAreaCentroid(objectID) centroidUV = Rhino.SurfaceClosestPoint(objectID, centroidPoint(0)) centroidNormal = Rhino.SurfaceNormal(objectID, centroidUV) Dim referenceLine, targetLine referenceLine = Array(setZ(centroidNormal(0), 0), setZ(centroidNormal(1), 0)) targetLine = Array(referenceLine(0), flattenedCameraLocation) Rhino.OrientObject objectID, referenceLine, targetLine End Sub Function setZ(point, value) setZ = Array(point(0), point(1), value) End Function)
Comment