yujiyuji Posted November 22, 2020 Share Posted November 22, 2020 I have now created something like the image attached here. Now all the lines are glowing. Is it possible to make only certain places glow with noise in the rendering just using Mantra? Other places are fine to leave dark lines. Someone please advise. Quote Link to comment Share on other sites More sharing options...
Librarian Posted November 22, 2020 Share Posted November 22, 2020 (edited) @yujiyuji You can Use alpha Like Mask for Glowing in this Case Brightness .Maybe it Helps it have Potential +plus you have endless control with wire and points in the code v@Cd = {1,1,1}; @pscale = 0.0007; ___________________________-------_____________________________ if (chs("parm_cam_obj")=="") { error("Need a camera object!"); } if (!haspointattrib(0, "pscale")) { @pscale = 1.0; } if (!haspointattrib(0, "Alpha")) { f@Alpha = 1.0; } f@pscale *= chf("parm_pre_scale"); vector camPos = cracktransform(0,0,0,{0,0,0},optransform(chs("parm_cam_obj"))); float resx = ch("`chs("parm_cam_obj")`/resx"); float focal = ch("`chs("parm_cam_obj")`/focal"); float filmwidth = ch("`chs("parm_cam_obj")`/aperture"); vector myP = ptransform("space:object","space:world",@P); float dist_to_cam = abs(length(myP-camPos)); float pixelSize; if (chi("parm_use_dome_projection")) { pixelSize = (atan(2*@pscale / dist_to_cam) * (resx/2.0)); } else { pixelSize = ((2*@pscale / dist_to_cam) * ((resx * focal) / filmwidth)); } if ((pixelSize == 0.0) || (@Alpha == 0.0)) { @Alpha = 0.0; } else { float multFac = chf("parm_min_pixels")/pixelSize; if (chi("parm_visualise")) { @Cd = {0,1,0}; if (pixelSize < chf("parm_min_pixels")) { @Cd = {1,0,0}; } } else { if (pixelSize < chf("parm_min_pixels")) { @pscale *= multFac; if (chi("parm_col_not_alpha")) { @Cd /= chi("parm_wires") ? multFac : pow(multFac,2); } else { @Alpha /= chi("parm_wires") ? multFac : pow(multFac,2); } } else { if (chi("parm_brighten_near_ones")) { @pscale *= multFac; @Cd /= chi("parm_wires") ? multFac : pow(multFac,2); } } } } Edited November 22, 2020 by Librarian 1 Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted November 22, 2020 Share Posted November 22, 2020 You could simply bind export color-ramped noise as color emission (Ce). glow_lines.hipnc 1 Quote Link to comment Share on other sites More sharing options...
yujiyuji Posted November 22, 2020 Author Share Posted November 22, 2020 @Librarian Thank you so much!! Do you main if I ask you to give me sample hipfile?? Quote Link to comment Share on other sites More sharing options...
yujiyuji Posted November 22, 2020 Author Share Posted November 22, 2020 59 minutes ago, konstantin magnus said: You could simply bind export color-ramped noise as color emission (Ce). glow_lines.hipnc Wow! I's really easy to understand!! Thank you!! Quote Link to comment Share on other sites More sharing options...
Librarian Posted November 22, 2020 Share Posted November 22, 2020 @yujiyuji I use Abs Everything From this Topic and 1 exampel just copy paste code into att wrangle. and Have Some Camera in you Scene.Have Fun Combine Stuff 1 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.