Jump to content

Search the Community

Showing results for tags 'geometry creation VEX'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Lounge/General chat
    • Education
    • Jobs
    • Marketplace
  • Houdini
    • General Houdini Questions
    • Effects
    • Modeling
    • Animation & Rigging
    • Lighting & Rendering + Solaris!
    • Compositing
    • Games
    • Tools (HDA's etc.)
  • Coders Corner
    • HDK : Houdini Development Kit
    • Scripting
    • Shaders
  • Art and Challenges
    • Finished Work
    • Work in Progress
    • VFX Challenge
    • Effects Challenge Archive
  • Systems and Other Applications
    • Other 3d Packages
    • Operating Systems
    • Hardware
    • Pipeline
  • od|force
    • Feedback, Suggestions, Bugs

Product Groups

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Name


Location


Interests

Found 1 result

  1. float theta; int res_lon = 10; //longitude resolution float start_theta = 0; float end_theta = 0.5; float theta_step = ((end_theta-start_theta)/float(res_lon)); float phi; int res_lat = 10; //latitude resolution float start_phi = 0; float end_phi = 0.6; float phi_step = ((end_phi-start_phi)/float(res_lat)); float r_min = 1 ; float r_max = 2 ; int pt_n; int prim_poly_n = addprim(geoself(), "poly"); //inner radius arcs for (int i = 0; i < res_lat ; i++){ for (int j = 0; j < res_lon; j++){ theta = (start_theta + theta_step*j); vector pos = set( r_min*cos(theta), 0, r_min*sin(theta) ); //latitude arcs phi = start_phi + phi_step*i; matrix rot = ident(); vector up = set( 0, 1, 0); vector rot_axis = cross ( normalize(pos), up); float angle= phi; rotate(rot, angle, rot_axis); pos *=rot; pt_n = addpoint(geoself(), set(pos)); // ptnum created addvertex(geoself(), prim_poly_n, pt_n); } } //outer radius for (int i = 0; i < res_lat ; i++){ for (int j = 0; j < res_lon; j++){ theta = start_theta + theta_step*j; vector pos = set( r_max*cos(theta), 0, r_max*sin(theta) ); //latitude arcs phi = start_phi + phi_step*i; matrix rot = ident(); vector up = set( 0, 1 , 0); vector rot_axis = cross ( normalize(pos), up); float angle= phi; rotate(rot, angle, rot_axis); pos *=rot; pt_n = addpoint(geoself(), set(pos)); // ptnum created addvertex(geoself(), prim_poly_n, pt_n); } } Hello OdForce!!! I am trying to create a nice slice of cake in VEX. The above code is written in an attribute wrangle SOP, run over Detail. It generates the points just right, but the face connection is not correct. I believe this is related to the order of creation of the points, hence the ptnum. What is the right ptnum order to make the faces connect properly? Any tips on how to achieve the result is much appreciated and will be rewarded with a tasty slice of Cake! thank you!
×
×
  • Create New...