Jump to content
[[Template core/front/profile/profileHeader is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]

Community Reputation

0 Neutral

About machinainfinitum

  • Rank
    Peon

Personal Information

  • Name
    Machina Infinitum
  1. FBX EXPORT - DIFFERENT FILE FOR EACH FRAME

    Thanks everyone ! Got it working with Alain's setup, thanks for that Emmanuel I need separate fbx because the mesh I'm slicing is around 60gb in size, can't create one unique abc or fbx for an easier file handling during import in Unreal Engine. Cheers
  2. Hi brains ! Need help! I've got a mesh (as an example I'll use pig head) and I'm using a "mesh slice" node to split it in different parts, using $F as index, basically every frame I see a different slice of the pig. Tried to export in fbx using rop fbx but can't find a way to create a different file for each frame. I can export in obj and it works by saving each frame in a separate file "test$F.obj" but does not work with FBX rop, I always get only one FBX file.. Any idea ? Thanks in advance, happy houdiniiiing ! MeshSliceFBX.hip
  3. HOUDINI - VEX - OSL CONVERSION

    This works perfectly ! Thanks so much! Now I'll try to convert all the formulas I have
  4. HOUDINI - VEX - OSL CONVERSION

    Thanks I need to convert all my existing OSL fractals code to VEX. Than I can mesh the VEX fractal and use it as dummy obj on top of Octane Vectron fractals
  5. HOUDINI - VEX - OSL CONVERSION

    I’m looking for someone who can convert some OSL code to VEX code. I have a fractal formula written in OSL that needs to be volume density output VEX. For now the simple mandelbulb fractal conversion is enough but I'm looking for someone that could convert many other complex formulas.(200-300 lines of code). New to Houdini, and can't find a way to get this working...after days of looking around, this forum is my last option. OSL CODE TO CONVERT: shader OslGeometry( int Iterations = 10, float Power = 2.0, float Bailout = 20, output _sdf c = _SDFDEF) { vector pos = P; vector z = P; float dr = 1.0; float r = 0.0; for (int i = 0; i < Iterations ; i++) { r = length(z); if (r>Bailout) break; // convert to polar coordinates float theta = acos(z[2]/r); float phi = atan2(z[1],z[0]); dr = pow( r, Power-1.0)*Power*dr + 1.0; // scale and rotate the point float zr = pow( r,Power); theta = theta*Power; phi = phi*Power; // convert back to cartesian coordinates z = zr*vector(sin(theta)*cos(phi), sin(phi)*sin(theta), cos(theta)); z+=pos; } c.dist = 0.5*log(r)*r/dr; } OSL CODE THAT WORKS BUT NEED IT TO BE LIKE THE OSL: function int Mandel(float x0, y0, z0; int Iterations){ float x, y, z, xnew, ynew, znew, n=ch('n'), r, theta, phi; int i; x = x0; y = y0; z = z0; for(i=0; i < Iterations; i++){ r = sqrt(x*x + y*y + z*z); theta = atan2(sqrt(x*x + y*y) , z); phi = atan2(y,x); xnew = pow(r, n) * sin(theta*n) * cos(phi*n) + x0; ynew = pow(r, n) * sin(theta*n) * sin(phi*n) + y0; znew = pow(r, n) * cos(theta*n) + z0; if(xnew*xnew + ynew*ynew + znew*znew > 8){ return(i); } x = xnew; y = ynew; z = znew; } return(Iterations); } //--- Main --- int maxiter = 8; if(Mandel(@P.x, @P.y, @P.z, maxiter) < maxiter){ @density = 0.0; } else { @density = 1.0; } AAND MY CONVERSION THAT DOES NOT WORK function int Fractal(int Iterations, float Power, float Bailout, vector pos, vector z, float dr, float r){ for (int i = 0; i < Iterations ; i++) { r = length(z); if (r>Bailout) break; // convert to polar coordinates float theta = acos(z.z/r); float phi = atan2(z.y,z.x); dr = pow( r, Power-1.0)*Power*dr + 1.0; // scale and rotate the point float zr = pow( r,Power); theta = theta*Power; phi = phi*Power; // convert back to cartesian coordinates z = zr*vector(sin(theta)*cos(phi), sin(phi)*sin(theta), cos(theta)); z+=pos; } return 0.5*log(r)*r/dr; } int Iterations = 10; float Power = 2.0; float Bailout = 20; vector pos = @P; vector z = @P; float dr = 1.0; float r = 0.0; if(Fractal(Iterations,Power,Bailout,@P,@P,dr,r) < Iterations){ @density = 0.0; } else { @density = 1.0; } Thanks in advance. Cheers, Scappin Matteo www.machina-infinitum.com
×