05 May 2012 JokerMartini Expert   portfolio John Martini CG Supervisor, 3D, Maxscript, VFX Ingenuity Engine Los Angeles, USA I like the direction this is going a lot. I understand it doesn't look like the typical cobwebs....I've gear mine more towards the random look like this ReferenceImage Thanks gazybara for the code. I'm going to try it out now. __________________ ____________ ___ __ _ John A. Martini JokerMartini@hotmail.com www.JokerMartini.com share quote
 05 May 2012 JokerMartini Expert   portfolio John Martini CG Supervisor, 3D, Maxscript, VFX Ingenuity Engine Los Angeles, USA Hey gazybara, Do you have a gmail account or skype? __________________ ____________ ___ __ _ John A. Martini JokerMartini@hotmail.com www.JokerMartini.com share quote
 05 May 2012 gazybara Architect   portfolio Branko Živković Freelancer Niš, Serbia look in your hotmail inbox __________________ Looking in the right side. [bgaTools] share quote
 05 May 2012 JokerMartini Expert   portfolio John Martini CG Supervisor, 3D, Maxscript, VFX Ingenuity Engine Los Angeles, USA Subdivide spline What is a good way of subdividing a spline X number of times with smooth knots? Every time you add a knot it changes the spline segement index???? `````` steps = 4 theShape = \$ clearlistener() for idx = 1 to numSplines theShape do ( divideSeg = ceil (steps / numSegments theShape idx) as integer part = 1 for s = 1 to numSegments theShape idx do ( knot = subdivideSegment theShape idx (1*part) divideSeg part += (divideSeg*s) ) updateShape theShape )`````` __________________ ____________ ___ __ _ John A. Martini JokerMartini@hotmail.com www.JokerMartini.com share quote
 05 May 2012 gazybara Architect   portfolio Branko Živković Freelancer Niš, Serbia When you use subdivide method then alwas use backward loop ei for idx in (numSplines theShape) to 1 by -1 do... __________________ Looking in the right side. [bgaTools] share quote
 05 May 2012 gazybara Architect   portfolio Branko Živković Freelancer Niš, Serbia Good exampele is this script by Garp Resize Splines From First __________________ Looking in the right side. [bgaTools] share quote
 05 May 2012 JokerMartini Expert   portfolio John Martini CG Supervisor, 3D, Maxscript, VFX Ingenuity Engine Los Angeles, USA Alright sounds good. I'll begin testing that and see what I get. I've got some quite noticeable improvements which will be quite interesting once you get to mess with it. If you feel up to it and want to further help out, I will eventually need to find a way to do this.... I have an array of 20 positions (point 3 values) I need to collect only the ones whose positions fall within a given volume examples:a sphere. __________________ ____________ ___ __ _ John A. Martini JokerMartini@hotmail.com www.JokerMartini.com share quote
 05 May 2012 gazybara Architect   portfolio Branko Živković Freelancer Niš, Serbia Try this ``````posArr = for p in 1 to 20 collect random (point3 0 0 0) (point3 1000 1000 1000) radius = 500 -- virtual sphere radius center = point3 0 0 0 -- virtual sphere center posInsideVirtualVolume = for p in posArr where distance p center < radius collect p`````` __________________ Looking in the right side. [bgaTools] share quote
 05 May 2012 JokerMartini Expert   portfolio John Martini CG Supervisor, 3D, Maxscript, VFX Ingenuity Engine Los Angeles, USA nice clever way of doing that. Good one. I'm pretty excited about this next version.Will definitely be pretty versatile. As far as those renders you mentioned lastnight, was one of those renders in the email you sent me? __________________ ____________ ___ __ _ John A. Martini JokerMartini@hotmail.com www.JokerMartini.com share quote
 05 May 2012 gazybara Architect   portfolio Branko Živković Freelancer Niš, Serbia I'm currently working on one big architectural project and i'm quite busy. That render is a small test when I get a break from work. I hope to have more free time to make some interesting render. __________________ Looking in the right side. [bgaTools] share quote
 05 May 2012 JokerMartini Expert   portfolio John Martini CG Supervisor, 3D, Maxscript, VFX Ingenuity Engine Los Angeles, USA break through Some pretty big breakthroughs in the next build of cobwebs, Thanks again for everyone's comments and help along the way. Thanks Denis for making the remark that it does not appear to be radial like an actual web. In the next release it does just that. It needs a few performance tweaks but aside from that it is pretty close to being finished. I'll have a post later tonight if anyone is around. If anything be sure to check back tomorrow. For those who don't touch the pc over the weekends just check back at the beginning of the work week. I look forward to hearing back from you guys. john __________________ ____________ ___ __ _ John A. Martini JokerMartini@hotmail.com www.JokerMartini.com share quote
 05 May 2012 JokerMartini Expert   portfolio John Martini CG Supervisor, 3D, Maxscript, VFX Ingenuity Engine Los Angeles, USA I noticed with spline creation I have to do a complete redraw in order for the substrands to be created. Is there a way I can avoid doing that process as it slows down the script quite a bit? I'll try to put together a basic sample script for quicker and easier testing. But if anyone happens to know the answer to this ahead of time id be glad to know. __________________ ____________ ___ __ _ John A. Martini JokerMartini@hotmail.com www.JokerMartini.com share quote
 05 May 2012 JokerMartini Expert   portfolio John Martini CG Supervisor, 3D, Maxscript, VFX Ingenuity Engine Los Angeles, USA Another question Alright so I've got an improvement suggestion from Branko and this is what he has suggested as a base. It's definitely a quicker way of calculating random points on objects. I was wondering why this doesn't work on a cylinder or any shape other than a sphere very well? When it boils down to it I'm trying to find ways to improve the processing of the script. One case is finding if there is a faster way of generating pos/point3 values on the surface of objects. `````` start = timeStamp() sph = geosphere radius:50 pos:[30,65,28] cyl = cylinder radius:50 height:50 pos:[100,50,28] objCol = #(sph,cyl) surfacePosArr = #() for obj in objCol do ( for i = 1 to 20 do ( seed (random 100000 999999) centRay = ray obj.center (random (point3 1 1 1) (point3 -1 -1 -1)) intRay = intersectRay obj centRay if intRay != undefined do ( append surfacePosArr intRay.pos -- create point helper to see intersection place (don't use in the script) point drawontop:on size:5 pos:intRay.pos wirecolor:(random (point3 0 0 0) (point3 255 255 255)) ) ) ) surfacePosArr -- intersection positions arr print surfacePosArr`````` __________________ ____________ ___ __ _ John A. Martini JokerMartini@hotmail.com www.JokerMartini.com Last edited by JokerMartini : 05 May 2012 at 05:19 PM. share quote
 05 May 2012 gazybara Architect   portfolio Branko Živković Freelancer Niš, Serbia Originally Posted by JokerMartini: I noticed with spline creation I have to do a complete redraw in order for the substrands to be created. Is there a way I can avoid doing that process as it slows down the script quite a bit? I'll try to put together a basic sample script for quicker and easier testing. But if anyone happens to know the answer to this ahead of time id be glad to know. I don't know about other way then *update shape fn*. It's good that you use it outside for-loop. __________________ Looking in the right side. [bgaTools] share quote
 05 May 2012 JokerMartini Expert   portfolio John Martini CG Supervisor, 3D, Maxscript, VFX Ingenuity Engine Los Angeles, USA does it work to do just an update shape and not have to do viewport redraw. i feel like the completeredraw shouldn't affect the spline creation no matter what. __________________ ____________ ___ __ _ John A. Martini JokerMartini@hotmail.com www.JokerMartini.com share quote

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts vB code is On Smilies are On [IMG] code is On HTML code is Off CGSociety Society of Digital Artists www.cgsociety.org Powered by vBulletinCopyright ©2000 - 2006, Jelsoft Enterprises Ltd.