Houdini inside to achieve the effect of sci-fi ring panel-tron

Source: Internet
Author: User

Make a summary of the previous procedural modeling method, the goal is to make a Tron-style disc interface. :

The right side of the target effect is the implementation effect


Shawn Teacher's idea did a reference, here to talk about my ideas.

The smallest element in the interface is a small fan in each circle, so the basic structure is:

Fan-ring, circle-wide panel

1, Fan

Fan-shaped approach is relatively simple, the main consideration is the fan span, the fan minimum radius and the maximum radius of the three parameters, it is worth noting that in the Houdini to make a complete closed fan surface, then the fan above the point arrangement must be in the order of the hour, otherwise it will produce a strange twist on the surface.


2, Ring

The circle determines the maximum minimum fan length and the gap width, and generates a new fan in the range class, and if all the fans and voids are longer than 2π, the ring is created.


3, entire panel

At this level, the primary is to randomly determine the minimum and maximum radii for each ring, and determine how much height in a space within the travel panel.

Here is the code, written directly in a attrib wrangle inside the detail level is good:

#define DAO 6.28318530718int Segment (    float resolution;    float Level ;    float Start_theta;    float End_theta;    float Min_radius;    float Max_radius;    ){    int Prim = Addprim (Geoself (),"Poly");    //min_radius    float Steps = Start_theta;     while(1){        if(Steps < End_theta) {            Vector next_pt = Set (cos (steps)*Min_radius, Level , sin (steps)*Min_radius);            int PT = Addpoint (Geoself (), next_pt);            Addvertex (Geoself (), Prim, PT);            Steps += resolution;         }Else{            Vector next_pt = set (cos (end_theta)*Min_radius, Level , sin (end_theta)*Min_radius);            int PT = Addpoint (Geoself (), next_pt);            Addvertex (Geoself (), Prim, PT);            Steps = End_theta;             Break;        }    }    //max_radius     while(1){        if(Steps > Start_theta) {            Vector next_pt = Set (cos (steps)*Max_radius, Level , sin (steps)*Max_radius);            int PT = Addpoint (Geoself (), next_pt);            Addvertex (Geoself (), Prim, PT);            Steps -= resolution;         }Else{            Vector next_pt = set (cos (start_theta)*Max_radius, Level , sin (start_theta)*Max_radius);            int PT = Addpoint (Geoself (), next_pt);            Addvertex (Geoself (), Prim, PT);             Break;        }    }    return 1;}int Circle (    int definition;    int Step;    float Level ;    float Min_radius;    float Max_radius;    ){    float Total_length = 0;    float Seg_length = 0;    float Gap_length = 0;    int Seg_num = 0;    float resolustion = DAO / 181 * definition;    float Seg_step = Pow (rand (step*934),2)*2;    float Gap_step = Pow (rand (step*547),2)*0.5;    float min_seg = 0.01;    float max_seg = min_seg + Seg_step ;    float Min_gap = 0.002;    float Max_gap = Min_gap + Gap_step;    float Start_theta = 0;    float End_theta = 0;    int Flag = 1;     while(flag) {        Seg_length = fit01 (rand (Seg_num*234), Min_seg, max_seg);        Gap_length = fit01 (rand (Seg_num+ the)* -), Min_gap, max_gap);        End_theta = Start_theta + seg_length;        segment (Resolustion, Level , Start_theta, End_theta, Min_radius, Max_radius);        Total_length = Total_length + Seg_length + gap_length;        if (Total_length > DAO) {            Flag = 0;        }        Seg_num++;        Start_theta = total_length;    }}int Tron () {    float Max_level = 1;    float Min_level = 0;    float Max_r = 1.5;    float Min_r = 0.8;    float Max_width = 0.05;    float Min_width = 0.001;    int Max_num =  -;     for(int Step = 0; Step < Max_num; Step++){        float  Level = fit01 (rand (step*234), Min_level, max_level);        float Min_radius = fit01 (rand (step*344), Min_r, max_r);        float width = fit01 (rand (step* the), Min_width, max_width);        float Max_radius = Min_radius + width;        Circle (1, Step, Level , Min_radius, Max_radius);    }}tron ();

Houdini inside to achieve the effect of sci-fi ring panel-tron

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.