This is a process for mapping an image to the entire surface of a pumpkin. The process of this instructable builds upon a script outlined in another instructable (link) which projects an image onto a pumpkin's surface, here the projected image becomes distorted as the pumpkin is not a flat object: limiting the ability of the pumpkin to scare.
With the added ability to wrap an image around the whole pumpkin a pumpkin can communicate more than just a scary face: telling a story or creating a scene. The pumpkin can now illuminate a graveyard silhouette onto the side of a building or be situated in an open area, not limiting the pumpkin's position to edges of spaces.
This instructable illustrates the logic of how an image can be wrapped around a pumpkin - 360 degrees of rotation.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Pumpkin
As shown how to model in my previous instructable, a pumpkin surface is created by intersecting 8 spheres together with offset origin points
Step 2: Divide Surface Into Points
The way the divide surface component in Grasshopper works is by referencing surfaces, not polysurfaces (breps) so the original 8 spheres need to be referenced to create the pumpkins surface points. The issue is this creates points within the pumpkin essentially so these points need to be removed, so the script in the next steps is only referencing the points on the surface of the pumpkin.
Step 3: Selecting Pumpkin Surface Points
This is done by testing for inclusion, finding all the points within a slightly smaller scaled pumpkin geometry and removing them. This returns a true or false value for all the surface points of the 8 sphere, creating a pattern used to select just the most outer points
Step 4: Reducing Points
This step was to redo the inclusion test but for outer points which fall in the middle region, this was to create a more useable point list for the later remapping of the .jpeg image.
These last two steps are copied and fed with referenced uv coordinates of the original 8 spheres so that there are as many uv coordinates as there are points. This ensures that the mapping is accurate and creates the required input for the .jpeg mapping function
Step 5: Creating Planes for Polygons Oriented to Surface Normals
By calculating the direction between the surface points and the volumetric centre of the pumpkin, frames (or origin points) can be created for the placement of the polygons used to cut the surface of the pumpkin - meaning that the polygon shapes will follow the curvature of the surface
Step 6: Selecting Largest Returned Polygons on Pumpkin Surface
The image sampler calculates the black and white values of the image and returns values which are mapped to the surface of the pumpkin. After performing a test for the largest values, the smaller polygons can be removed from the list to only leave the ones which will cut the surface of the pumpkin - where the black in the referenced .jpeg is
Step 7: Cutting Geometry
Using the line created in a previous step as the direction for extrusion (line between surface points and centre of the pumpkin), the polygons are extruded into solid geometries
Step 8: Cut Pumpkin Surface
These geometries are used to cut the holes in the surface through a surface split component
Step 9: Thickening Pumpkin
The final step is to thicken the pumpkin. This was done by reducing the scale of the pumpkin (duplicating it) and lofting between its edge curves to fill in the gaps. The resulting sets of surfaces (outer pumpkin, inner pumpkin and extrusion surfaces between them) are joined together into a single solid geometry
Step 10: Render
After using multiple referenced .jpeg's to create different patterns on the pumpkins I set up a render to illustrate these.
For this I download the following sketchup model - link
Opened it up in 3ds Max, set up a photometric light (target light), created a ground plane and gave it a grass material, imported my pumpkins, added more lights to illuminate them and rendered the image using iRay.
Thank you for reading my instructable
Participated in the
Jack o' Lantern Challenge