anicg Posted January 24, 2019 Share Posted January 24, 2019 I have cables(see image and network) and I'd like to add a bit realism/noise instead of each following a straight line, the cable is meant to be very long. Quote Link to comment Share on other sites More sharing options...
Sepu Posted January 24, 2019 Share Posted January 24, 2019 (edited) Here is one way, You can control the ramp so you can affect where you want to add the noise, etc noiseWires.hipnc Edited January 24, 2019 by Sepu 1 Quote Link to comment Share on other sites More sharing options...
anicg Posted January 24, 2019 Author Share Posted January 24, 2019 many thanks, it works great, it took me a while to figure out what's going on in the attributevop stuff, but it works. Thanks. Quote Link to comment Share on other sites More sharing options...
kiryha Posted January 25, 2019 Share Posted January 25, 2019 And VEX noise version: // Define UI controls float remap_uv = chramp('remap_uv', @uv.x); float power = chf('Noise_Power'); float freq = chf('Noise_Frequency'); // Create noise vector noiseXYZ = noise(@P*freq); // Modify noise values vector displace = fit(noiseXYZ, 0,1, -1, 1)*power*remap_uv; // Apply modified noise to a points position @P += displace; // Visualize fade ramp on curve @Cd = remap_uv; Personally, I would try to use bounding box information to get curve ends, but Herman solution with UVs much nicer! noiseWires.hipnc Quote Link to comment Share on other sites More sharing options...
anicg Posted January 25, 2019 Author Share Posted January 25, 2019 For the VEX stuff, which node should I use and past it in? thanks (I'm new) Quote Link to comment Share on other sites More sharing options...
reeson Posted January 25, 2019 Share Posted January 25, 2019 (edited) 42 minutes ago, anicg said: For the VEX stuff, which node should I use and past it in? thanks (I'm new) After Copytopoints, add Attribute Wrangle and paste the vex code in. Then click on this icon (see below in the picture) to generate the parameters. The Polywire comes last. Edited January 25, 2019 by reeson Quote Link to comment Share on other sites More sharing options...
kiryha Posted January 25, 2019 Share Posted January 25, 2019 (edited) !There is a scene file attached to my previous post with a Sepu setup and my VEX option: It requires uvtexture SOP in "Pts and Columns" mode before this wrangle, so you have to create wrangle after uvtexture SOP! Just use output from Attribute Wrangle "noise" node in your further network Edited January 25, 2019 by kiryha Quote Link to comment Share on other sites More sharing options...
kiryha Posted January 28, 2019 Share Posted January 28, 2019 I use noise function a lot to randomize something or to bend geometry. The basic code is : // Define UI controls float noise = chf('Noise_Power'); float freq = chf('Noise_Frequency'); // Create noise vector noiseXYZ = noise(@P*freq); // Remap and pply noise to a point position v@ns = fit(noiseXYZ, 0,1, -1, 1)*noise; @P += @ns; It will add value in the range between -1 and 1 to a point position. Each point will get individual value defined by noise parameters. One more example, if I need to randomize the distribution of scattered points I use nose to delete them. Here is VEX delete points under noise pattern file. Instead of removepoint() you can use another function, to add/set attributes etc. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.