Beer glass scene creation
This course contains a little bit of everything with modeling, UVing, texturing and dynamics in Maya, as well as compositing multilayered EXR's in Photoshop.
# 1 07-02-2014 , 11:23 PM
Registered User
Join Date: Feb 2014
Posts: 3

Generating a wavy/sine surface

I can't find it out using maya or using google how I can generate/manipulate a surface to make it wavy like in the picture below.

Here is a link which describes this surface as: Sin[x]*Sin[y]
https://xahlee.info/SpecialPlaneCurve.../sinusoid.html

Hope anyone can help me with this, using nurbs or polygones? Building it using loft on multiple cv curves gives a result something like it, but I cannot work/manipulate it the way I want.

user added image

# 2 08-02-2014 , 03:21 AM
sampson01's Avatar
Subscriber
Join Date: May 2006
Location: Williamson, WV
Posts: 121
sculpt geometry tool...


Sampson
# 3 08-02-2014 , 10:15 AM
PixalZA's Avatar
Lifetime Member
Join Date: May 2011
Location: Riyadh, Saudi Arabia
Posts: 525
Do you just want to create a single square and the duplicate it? How do you want to manipulate it?


Earth: The crazy asylum of the universe.
# 4 08-02-2014 , 08:51 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
Do you want to be able to put in the equation, and have it draw the surface? Something like MATLAB or Maple would be better for that kind of thing.


Imagination is more important than knowledge.
# 5 08-02-2014 , 09:34 PM
EduSciVis-er
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
Use a non-linear deformer, the sine one, or rather two at right angles. This is what I got.

Attached Thumbnails
# 6 09-02-2014 , 06:36 PM
PixalZA's Avatar
Lifetime Member
Join Date: May 2011
Location: Riyadh, Saudi Arabia
Posts: 525
After messing around with vertices using a mel script

Attached Thumbnails

Earth: The crazy asylum of the universe.
# 7 11-02-2014 , 12:57 AM
Registered User
Join Date: Feb 2014
Posts: 3
Sorry for my late reply, thanks for al the help so far.

@PixalZA: that looks great, would you want to share the script?

# 8 11-02-2014 , 11:31 AM
Skalman's Avatar
Registered User
Join Date: Apr 2012
Posts: 293


20 year old guy from Sweden



Big Bob Marley fan
Love skateboarding
Maya, Mudbox and Photoshop user

Full name: Marcus Ralman


https://www.facebook.com/MarcusRalman3D

^ My facebook page ^

Last edited by Skalman; 11-02-2014 at 11:34 AM.
# 9 11-02-2014 , 03:20 PM
PixalZA's Avatar
Lifetime Member
Join Date: May 2011
Location: Riyadh, Saudi Arabia
Posts: 525
Here you go. Not elegant at all. The script assumes the geo is a square. The vertices are displaced along the y-axis of the object (Object space).
Select all the vertices and execute.
Code:
string   $allObjects[];
string   $obj;
float    $locwidth = 30.0;
float    $loclength = 30.0;
float    $xWaveCnt = 2.0;
float    $zWaveCnt = 2.0;
float    $amplitude = 2.0;
float    $displace;
float    $coords[];
float    $xOffset;
float    $zOffset;
float    $degreesX;
float    $degreesZ;
float    $xSin;
float    $zSin;
$allObjects = `ls -fl -selection`;

for ( $obj in $allObjects )
{
    $coords = `xform -q -os -t $obj`;
    $xOffset = $locwidth - $coords[0];
    $zOffset = $loclength - $coords[2];
    $degreesX = (360.0 * $xWaveCnt) * ($xOffset / $locwidth);
    $degreesZ = (360.0 * $zWaveCnt) - ((360.0 * $zWaveCnt) * ($zOffset / $loclength));
    $xSin = sin(deg_to_rad($degreesX));
    $zSin = sin(deg_to_rad($degreesZ));
    $displace = ($xSin * $zSin) * $amplitude;
    xform -os -r -t 0.0 $displace 0.0 $obj;
};


Earth: The crazy asylum of the universe.
# 10 11-02-2014 , 07:26 PM
Registered User
Join Date: Feb 2014
Posts: 3
Thanks PixalZA!

After messing with the amplitude and wave count I got a nice result. What does the $locwidth and $loclength variable precisely?

@Skalman: thanks I will check it out, didn't need it now for this static surface but it looks like a great tool. Do you know if the learning license gives full usage of the software?

# 11 11-02-2014 , 07:37 PM
PixalZA's Avatar
Lifetime Member
Join Date: May 2011
Location: Riyadh, Saudi Arabia
Posts: 525
locwidth and loclength is the maximum width and length of the plane. (Was too lazy to get the values from the geo itself). I use it to convert the position of the vertex as a factor of the total degrees. E.g. a vertex at position 10 out of a width of 30 should be 1/3 of the total degrees. (Wave count * 360).


Earth: The crazy asylum of the universe.
# 12 11-02-2014 , 08:37 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
The learning edition has the following restrictions:

* This is a Non-Commercial license and CANNOT BE USED IN PRODUCTION
* XML and workspace restricted (so you cannot open scenes created in a Learning Edition in a Standard Commercial version - and vice versa)

You could also look into the Apprentice version of Houdini, and their FLIP fluid solver.

https://www.sidefx.com/index.php?opti...834&Itemid=386


Imagination is more important than knowledge.
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads