Home Technical Talk

Polyurethane foam deformation

Hi,

Does anyone have experience with polyurethane foam or mattress deformation (I'm using Max)? I need to make object (polyurethane foam) between goggles and face that protects face when contacting with goggles. I kind of want it to deform to certain volume. For example: when 80% of the object is pushed in, it should stop deforming and stay solid.

There is an illustrative image of what I want to make: http://www.flextechfoam.com/wp-content/uploads/2014/03/fleece-laminated-dual-material-goggle-foam.jpg

I found similar tutorials of how to model mattress but nothing about how to actually make it deformable.

Any links and recommendations are welcome. Thanks in advance!

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    Lots of ways to do this. Are you animating it? Does it need to animate in a game engine, or are you just rendering a video?

    You can use a mesh of a face to deform the foam, probably the easiest setup. But depends whether it's in-game or pre-rendered.

    The foam surface could be just a well-tuned Cellular map.
  • SoDamnTrue
    Options
    Offline / Send Message
    Lots of ways to do this. Are you animating it? Does it need to animate in a game engine, or are you just rendering a video?

    You can use a mesh of a face to deform the foam, probably the easiest setup. But depends whether it's in-game or pre-rendered.

    The foam surface could be just a well-tuned Cellular map.

    Not in a game engine but I want to animate it inside 3ds Max. Could you be more specific? Any links or tutorials what you just refer to?

    This is what I have right now: FfrNMfQ.jpg

    Foam aka blue object between goggles and the face should kind of deform according to face. I want it to deform only side of face tho, so the foam on the goggles side should quite much sustain original shape (stay pinned).

    What I tried right now was something like this: 1. Made face as static massfx rgbody 2. Made foam as mCloth, pinned vertices to goggles 3. Simulated with gravity direction to the face 4. Discovered pile of crap that I cannot use
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    A simple morph could work.
  • Eric Chadwick
    Options
    Offline / Send Message
    I just got slammed with work, but take a look at the Conform SpaceWarp.
  • SoDamnTrue
    Options
    Offline / Send Message
    I just got slammed with work, but take a look at the Conform SpaceWarp.

    Tried and failed.

    Going to try morphing. Script to align all the vertices between two.
    Link: http://www.polycount.com/forum/showpost.php?p=1016735&postcount=2
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    An another script maybe. Or:
    http://forums.autodesk.com/t5/modeling/aligning-vertices-in-a-straight-line/td-p/4106016
    There is a button called make planar by the way. Or you can scale the verticles on an axis.
  • SoDamnTrue
    Options
    Offline / Send Message
    Obscura wrote: »
    An another script maybe. Or:
    http://forums.autodesk.com/t5/modeling/aligning-vertices-in-a-straight-line/td-p/4106016
    There is a button called make planar by the way. Or you can scale the verticles on an axis.

    Thanks for sharing but the last script is actually working. Human error by me ;)

    Still trying to solve the main problem.
  • Eric Chadwick
    Options
    Offline / Send Message
    Create a height map of the face. Use a Displace modifier on the foam to make it match the face heightmap. You can use a Volume Select modifier below the Displace to select the inner-most vertices of the foam, and enable Soft Select to give the Displacement a falloff. I'll work up a sample a bit later.
  • Eric Chadwick
    Options
    Offline / Send Message
    Hopefully self-explanatory, if not let me know.
    OaYrqbA.jpg
  • SoDamnTrue
    Options
    Offline / Send Message
    Create a height map of the face. Use a Displace modifier on the foam to make it match the face heightmap. You can use a Volume Select modifier below the Displace to select the inner-most vertices of the foam, and enable Soft Select to give the Displacement a falloff. I'll work up a sample a bit later.

    It sounds like a very simple method. Did you try to push that object more? Could you make image of what your object looks like when pushed closer to the face (like 80%)? I tried Volume Select before and with simple objects (like yours) it worked but with objects that had more subdivisions, it kind of looked like a big mess. I'll try your method tomorrow and let you know.

    Meanwhile, it took me like 15 minutes to make this Morph method to work. Time wise it is a worst option. Result wise best so far.

    Not a best angle and doesn't look anything fancy but here it is:
    https://www.youtube.com/watch?v=r6pGgPoerM0&feature=youtu.be
  • Eric Chadwick
    Options
    Offline / Send Message
    You can use different methods inside Volume Select to select the vertices, for example vertex color, or a bitmap, or another mesh. That allows a lot of control. Looks like what you have is good enough though, congrats!
  • Eric Chadwick
    Options
    Offline / Send Message
    I created the height map of the face by assigning a Gradient Ramp to the head, rotating the UV so the white end is at the nose, and black behind the head. I set the material to 100% Self-Illumination, and rendered the Front view to a 1024x1024 16bit TIF. Then I adjusted the Displace modifier UVs to match the view I rendered.
  • SoDamnTrue
    Options
    Offline / Send Message
    I created the height map of the face by assigning a Gradient Ramp to the head, rotating the UV so the white end is at the nose, and black behind the head. I set the material to 100% Self-Illumination, and rendered the Front view to a 1024x1024 16bit TIF. Then I adjusted the Displace modifier UVs to match the view I rendered.

    I tried something like this before but I just don't understand UV rotating part. I have flat UVs. My process before your post: 1. I created Standard material. 2. I chose Gradient under diffuse map (should be same as Gradient Ramp). 3. Changed color order white to black. 4. Also set 100% self-illumination for ignoring scene lights 5. Whole face was consistently white, no highlights
  • Eric Chadwick
    Options
    Offline / Send Message
    Good so far, except maybe you;re using existing UVs? Need new flat-to-the-world UVs. Select the face model, add a UVW Map modifier, and set the Alignment to Z. May need to rotate it on Z axis, depends on the direction of your gradient map.
  • SoDamnTrue
    Options
    Offline / Send Message
    Good so far, except maybe you;re using existing UVs? Need new flat-to-the-world UVs. Select the face model, add a UVW Map modifier, and set the Alignment to Z. May need to rotate it on Z axis, depends on the direction of your gradient map.

    Where did I screw up?

    dd7Xx5G.jpg
  • Eric Chadwick
    Options
    Offline / Send Message
    What does the UVW Map gizmo look like? Should be a big rect encompassing the whole head, and projecting from the top down (should look like a rect when viewing head model in Top view).

    Also your gradient has U and V tiling set to .01 but those should be 1.
  • Eric Chadwick
    Options
    Offline / Send Message
    Which version of Max is this? I can send you a file.
  • SoDamnTrue
    Options
    Offline / Send Message
    Which version of Max is this? I can send you a file.

    Using 2014 Max Design. File would be maybe useful. I could check all the settings myself. I am off to sleep soon, don't bother with this problem too much. I will try tomorrow but morphing is also a solution. Thanks for all the help so far.

    7riyhOu.jpg
  • Eric Chadwick
    Options
    Offline / Send Message
    The green line on the UVW Map gizmo is the right side of your map (gradient, in this case). Rotate the gizmo so it's behind the head, this will put the black end of the gradient back there, and the white end on the nose.

    Press the Fit button to make it fit the head, this will prevent the gradient from tiling.
  • SoDamnTrue
    Options
    Offline / Send Message
    The green line on the UVW Map gizmo is the right side of your map (gradient, in this case). Rotate the gizmo so it's behind the head, this will put the black end of the gradient back there, and the white end on the nose.

    Press the Fit button to make it fit the head, this will prevent the gradient from tiling.

    That kind of worked:
    42BqGTL.png

    Wasn't able to position Gizmo of Displace map. I could only position Gizmo either horizontally or vertically. Therefore face only pushes vertices on the object in one direction. Ex. when Gizmo placed vertically, vertices on deforming object only move horizontally. Because that parts like nose don't work well, because object there should deform from both sides. Is there a solution or should I drop this method for now?
    NC8uwts.jpg
  • Eric Chadwick
    Options
    Offline / Send Message
    Scroll down in the Displace modifier, and use the UV controls to adjust the gizmo. You want the Displace UVs to match the angle and dimensions of the view from which you rendered the height map.
Sign In or Register to comment.