Last active
February 27, 2025 16:50
-
-
Save Limbicnation/6aae256de1706c2fa48719ef4f326607 to your computer and use it in GitHub Desktop.
VEX lattice-Structure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // From Algorithmic Design Workbook with Houdini https://app.gumroad.com/d/782fb33b45a3bbc40fdc24d9196cb6ec | |
| // https://www.tokeru.com/cgwiki/index.php?title=HoudiniVex#Attributes_vs_variables | |
| int npnt = nearpoint(1,@P); | |
| vector targetpos = point(1, 'P', npnt); | |
| float dist = distance(@P, targetpos); | |
| float freq = chf('frequency'); | |
| float pos = chf('Position'); | |
| float amp = chf('amplitude'); | |
| float d; | |
| float speed; | |
| d = length(@P); | |
| @density = sin(dist*freq)*amp; | |
| @P += normalize(pos); | |
| @Cd = @P; | |
| @Cd.r = sin( @P.x * ch('scale')); | |
| // Add wave deform | |
| @d = length(@P); | |
| @d *= ch('scale'); | |
| @speed = @Time*ch('speed'); | |
| @P.y = cos(@d+@speed); | |
| // Add height | |
| @P.y *= ch('height'); | |
| @P.x *= ch('amplitude'); | |
| @P.z *= ch('frequency'); | |
| @P.x *= sin(d*ch('Position')+speed); | |
| // Add Falloff | |
| @P.y *= chramp('falloff', @falloff); |
Author
Limbicnation
commented
Dec 13, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment