web analytics

tuto

Home / Archive by category "tuto"
Photogrammetrie

Photogrammetrie

Guide du flux de production photogrammétrique

Un guide pratique étape par étape qui vous apprend à capturer les objets et matériaux du monde réel pour vous aider à améliorer vos projets Unity.

ici

(sources : site unity)

 

Houdini VEX Attributes

Houdini VEX Attributes

Popular Built-in VEX Attributes (Global Variables)

General  
typenamedescription
int@ptnumPoint Number
int@numptTotal number of points
float@TimeCurrent time, in seconds
float@TimeIncTime increment per frame in seconds
float@FrameCurrent frame
int@primnumPrimitive Number
int@numprimTotal number of primitives
int@vtxnumVertex number
int@numvtxTotal number of vertices
Geometry
typenamedescription
vec3@PPoint/Primitive Position
vec3@NPoint/Primitive/Vertex Normal
vec3@vVelocity (ex: motion blur in particle systems)
float@pscaleUniform scale. Used in copy-SOP or particle systems
vec3@scaleNon-Uniform scale. For use see pscale
vec3@upUp-Vector. Used together with @N to orient point/particle/instance
vec4@orientQuaternion defining the rotation of a point/particle/instance
vec3@rotQuaternion definig additional rotation
vec3@transTranslation of instance
matrix@transformTransformation matrix (used for example in Copy-Sop)
vec3@pivotLocal pivot point for instance
float@lodDetail/Primitive level of detail
vec3@restRest position
vec3@forceForce (acting on particle)
float@ageParticle Age
float@lifeMax. Particle Life
Volumes  
typenamedescription
float@densityDensity of voxel
int@ix, @iy, @izVoxel indices along each axis. Ranging from 0 to resolution -1
vec3@centerCenter of current Volume
vec3@origBottom left corner of current Volume
vec3@sizeSize of current Volume
vec3@dPdxChange in position to get from one voxel to the next in x direction
vec3@dPdyChange in position to get from one voxel to the next in y direction
vec3@dPdzChange in position to get from one voxel to the next in z direction
vec3@BBrelative position inside bounding box. Ranging from {0,0,0} to {1,1,1}
Shading  
TypeNameDescription
vec3@CdDiffuse Color
float@AlphaAlpha Transparency
vec3@uvPoint/Vertex/ UV coordinates
vec3@CsSpecular Color
vec3@CrReflective Color
vec3@CtTransmissive Color
vec3@CeEmissive Color
float@roughRoughness
float@fresnelFresnel Coefficient
float@shadowShadow intensity
float@sbiasShadow bias
typenamedescription
vec3@PInstance Position
float@pscaleUniform Scale
vec3@scaleNon Uniform Scale
vec3@NNormal (+Z axis of the copy, if no orient)
vec3@upUp-Vector. Used together with @N to orient instance (+Y axis of the copy, if no orient)
vec4@orientQuaternion defining the rotation of a point/particle/instance
vec4@rotQuaternion defining additional rotation (applied after @orient)
vec3@vVelocity (motion blur, also used as +Z axis of the copy if no orient or N is present
vec3@transTranslation of instance
matrix@transformTransformation matrix (used for example in Copy-SOP
vec3@pivotLocal pivot point for instance
Les figures acoustiques de Chladni avec Houdini

Les figures acoustiques de Chladni avec Houdini

Ernst Florens Friedrich Chladni, né le 30 novembre 1756 à Wittemberg, mort le 3 avril 1827 à Breslau, est un physicien allemand.

Chladni est le fondateur de l'acoustique moderne. Il étudiait expérimentalement les vibrations des plaques, en les saupoudrant de sable fin, obtenant ainsi les figures acoustiques qui portent son nom. (Wikipédia)

ENTAGMA s'est penché sur le sujet afin de reproduire les figures acoustiques de Chladni sur HOUDINI.
Leur video est disponible sur leur compte PATREON : https://www.patreon.com/entagma
Ils ont trouvé comme source d'information ce site complet sur le sujet : https://thelig.ht/chladni/

La formule suivante est isolée : s(x,y)=asin(πnx)sin(πmy)+bsin(πmx)sin(πny)

Il s'agit du modèle mathématique des lignes de Chladni qui apparaissent sur une plaque rectangulaire.
Cette formule est transposée dans houdini afin d'obtenir le même effet dans un environnement digital.

s(x,y) = a * sin (PI * n * x) * sin (PI * m * y) + b * sin(PI * m * x) * sin(PI * n * y)

PI = 3.14159265

On crée un plan orienté sur Z (node grid) suivi d'un node pointwrangle.

Dans ce pointwrangle :

// création des variables a, b, m et n

float a = chf("A");
float b = chf("B");
float m = chf("M");
float n = chf("N");

// définition des points de la grille sur les axes X et Y :
float x = v@P.x;
float y = v@P.y;
f@amp = s(x,y) = a * sin (PI * n * x) * sin (PI * m * y) + b * sin(PI * m * x) * sin(PI * n * y)

// On clampe les résultats pour s'approcher de la représentation graphique des figures de Chladni

float extreme = abs(a) + abs(b);
f@amp = extreme - abs(f@amp);
f@amp -= extreme * .9;


 

Résultat