I’m a mathematician new to Grasshopper who is trying to use the ImageSampler to paste an image onto a parametric surface. In my file uploaded here, the surface is a sphere, but that’s just for practice. I need to be able to create a surface from parametrically defined points and then get the colors from an image to go with the vertices on the mesh of the surface.
I have matched the grid of my parameter input to the grid of a rectangle on which I can paste the image without a problem. My formulas create the spherical surface correctly. But when I de-mesh the SrfGrid it has a different number of vertices from what the original grid had.
In the example file, 40401 points go in, but only 39800 vertices are present when I demesh. Seems weird.
Can someone suggest a better way to do this? Thanks in advance for any help.
It’s not a problem getting the dimensions of the image. I can get those easily. The problem is that the mesh constructed from points seems to have the wrong number of vertices.
I tried a Delauney mesh and got better results, attached. Yes, this is uv texture mapping, but I don’t find canned tools for that. An expert told me to do it this way, demeshing a surface and using colors from the image sampler to add colors.
The problem with the Delauney mesh, or perhaps the problem in general, is that it takes quite a long time to update the dimensions. With u and v equal to 200, the image quality is very poor. With 1500, it’s better but still not what I want.
I would love to see a tutorial on using Human to put images on parametric surfaces. I think your example is a box that you’ve bulged out to make it look round. For my application, I’m working on mathematically defined surfaces.
Thanks,
Frank
Yes, that’s fine if what I want is to paste an image onto a sphere. I’ve been using Photoshop for that. What I need is to put the image on a surface that I have constructed from equations.
I did make a file that uses your advice to put the bitmap onto a meshed sphere and it works fine. But when I try to give it the surface from the file I posted, it didn’t work.
Thanks for trying. I bet that Human will be nice for my application, but only after I figure out this issue with a mesh created by parametric equation.
While you don’t use the human plug-in yet, perhaps you can use the same point data to get a mesh from points instead of the surface for a slightly ‘faster’ mesh - “mesh from points” is from MeshEditTools, though, which is still a plug-in…
If MeshEditTools ins’t an option then you can regenerate the mesh using the radius/point information:
You can use the ‘Custom Mapping’ component to assign a UV texture coordinate per vertex.
You can use the same parameters you are plugging into the sphere equations here (or any other parametric surface)
This is brilliant. It took me a while to notice that you changed 0 to 0.00000001 or whatever to trick the grid into thinking that the singularity isn’t there. I think this would not allow me to compute the volume of the mesh, right?
My next step is to learn how to bake the preview so that I can render it in Rhino. I’m studying the materials component and the bake component, but need to keep learning.
Thank you so much! I really appreciate all the help I’ve received in a short time.
I’ve been using this very helpful method, but have run into a problem. I can see the texture on the surface and when I change the view to Rendered, it shows up fine. But when I push the render button, it does not add the texture map. I can see under the Textures tab that the file is there and assigned to the object.
I’m circling back to this after a couple of years. When I try to open this file, it says it’s missing the component Mesh FromPoints from a plug-in called MeshEdt Components. I can’t find that with the PackageManager and it doesn’t seem to come up in the help search. Any advice?
I really loved using this. Thanks in advance for any help available.
Best,
Frank