Map bitmap onto geometry


I am trying to draw a bitmap in the model. I see that there is a DisplayPipeline.DrawBitmap(), but this is in screen coordinates. I am hoping to do something more like the command “PictureFrame”. It appears I can Draw a mesh with the material set correctly and do this. I don’t see how to get from a bitmap to a material or a texture though. I see DisplayMaterial.SetBitmapTexture() but it needs either filename or texture. I could get the filename, but I actually want to get the bitmap from a RhinoView.CaptureToBitmap(), so it seems an extra step to write to a file.

Just to frame this, the end result would be sort of like a projector, in the file, where the image projected on the mesh is coming from the camera (so its like a camera that is projecting).


I posted about this some time ago too, I was hoping to get a webcam feed directly into the rhino view using a plane as a “transmitter” by updating the bitmap on it. Writing to disk then reading it back is a massive waste of resources and slow. I tried creating a ram drive to pump the save through but it was making coding very difficult as running the dll that does that works fine, but requires admin access and the end user to install the driver in the first place.

I ended up placing my video feed into a panel and use it docking (or floating) in rhino now. not perfect but my users don’t have to keep switching between applications to view the target geometry.

( i synced my Z revolution to an external turntable that roll a component to match the current rotation of the perspective port.)

(Dale Fugier) #3

Where is this bitmap coming from? Any screen shots of what you want to do might help.

– Dale


Hi Dale,
Eventually I was also going to try getting it from a device capture, but in the meantime, I was trying to use RhinoView.CaptureToBitmap() from a camera in the scene. The camera is animated, and I am using a display conduit to draw a mesh that is overlaid on the far clipping plane of the camera.