# XPresso: Stay within range?

 09 September 2006 allanalogy Frequenter portfolio ... Canada XPresso: Stay within range? HI, how is it possible with XPresso to have an object stay within a defined distance of another master object? So the object is freely movable but when the master moves beyond the defined distance the slave must move with it. thanks, share quote
 09 September 2006 Srek Some guy   portfolio CGConnect Member Björn Dirk Marl Technical Design Maxon Computer GmbH Friedrichsdorf, Germany Calculate the difference vector (by simply subtracting one global psotion from the other) and check for the length of this vector. If it is above the limit distance multiply the normal of the difference vector by the limit distance and add it to the slave objects global position. Cheers Björn __________________ - www.bonkers.de - The views expressed on this post are my personal opinions and do not represent the views of my employer. share quote
 09 September 2006 allanalogy Frequenter portfolio ... Canada Originally Posted by Srek: Calculate the difference vector (by simply subtracting one global psotion from the other) and check for the length of this vector. If it is above the limit distance multiply the normal of the difference vector by the limit distance and add it to the slave objects global position. Cheers Björn great! seems simple enough, thanks share quote
 09 September 2006 allanalogy Frequenter portfolio ... Canada "Check for the length"? ok so how does one "check for the length" of a vector? share quote
 09 September 2006 Srek Some guy   portfolio CGConnect Member Björn Dirk Marl Technical Design Maxon Computer GmbH Friedrichsdorf, Germany Either use the distance node or a math node set to subtract and vector. If you use the math node you can simply use the resulting vector as a scalar (real value), xpresso will autoconvert any vector into the length of the vector if you connect a vector to a real port. Cheers Björn __________________ - www.bonkers.de - The views expressed on this post are my personal opinions and do not represent the views of my employer. share quote
 09 September 2006 allanalogy Frequenter portfolio ... Canada Originally Posted by Srek: Either use the distance node or a math node set to subtract and vector. If you use the math node you can simply use the resulting vector as a scalar (real value), xpresso will autoconvert any vector into the length of the vector if you connect a vector to a real port. Cheers Björn ok thanks. and i suppose i'll have to make a user data field to input the required max distance away from the master object at which to make the slave a child of the parent. (using the virtual Parent preset from the content browser). Last edited by allanalogy : 09 September 2006 at 01:37 PM. share quote
09 September 2006
right so i've sorta got it working:

the distance between the "Master" Cube and the "Pet" Sphere is found then this is compared with a distance set by a User Data slider on the "Master" Cube. If the output is greater than the setting on the User Data slider,then the Virtual Parent XPresso is enabled.

However when i drag the "pet" sphere too quickly it goes beyond the invisible bounds set by the "masters" user data and gets stuck.

Anyone know how I can prevent this?

I've attached the file.

thanks,
Attached Files
 master pet.c4d.zip (7.8 KB, 21 views)

 09 September 2006 Cactus Dan Of the West   Cactus Dan Libisch Freelance Character TD Ferron, USA Howdy, I'm not sure, but is this what you were trying to achieve? Adios, Cactus Dan __________________ It doesn't matter what people say about you, just as long as they're talking about you. cactus3d.com, cactus3d-Plugins, CD Character Plugins forum share quote
 09 September 2006 allanalogy Frequenter portfolio ... Canada thanks CD! thats exactly what i needed! Its a thing of beauty! Calling it a FIX is a HUGE understatement. I'm kinda disappointed that i was so way off. I see that "virtual parent" wasn't even necessary. Now i need to dissect this and figure out how to give one "master" multiple "pets". thanks again, share quote
 09 September 2006 Cactus Dan Of the West   Cactus Dan Libisch Freelance Character TD Ferron, USA Howdy, You're welcome. Adios, Cactus Dan __________________ It doesn't matter what people say about you, just as long as they're talking about you. cactus3d.com, cactus3d-Plugins, CD Character Plugins forum share quote
 09 September 2006 Cactus Dan Of the West   Cactus Dan Libisch Freelance Character TD Ferron, USA Howdy, You can also string them together like this. Adios, Cactus Dan __________________ It doesn't matter what people say about you, just as long as they're talking about you. cactus3d.com, cactus3d-Plugins, CD Character Plugins forum share quote
 09 September 2006 allanalogy Frequenter portfolio ... Canada hey that's pretty cool! I was trying to give you another "useful" credit in the thread, but was told that i couldn't. :( My main reason for neding this XPresso was because i am animating a character that needs to do high flying somersaults and cartwheels. (the characters are in my portfolio) I didnt want the IK targets to get too far out of reach when i move the character. So I was thinking I'd use this XPresso to keep the foot and hand targets from falling too far behind. the reason i used virtual parent before was so that if i rotate the "master" the "pets" would rotate too as if they were children of the "master". However I'll be using a different null for those rotations anyway thanks Last edited by allanalogy : 09 September 2006 at 12:45 AM. share quote
09 September 2006
I've changed a couple of things:

I moved the User Data slider to the "pets" so they can be easily copied without have to adjust the XPresso.
They can also have individual "Leash Lengths" set by their own sliders.

cheers
Attached Files
 InvisibleLeash.c4d.zip (8.6 KB, 41 views)

10 October 2006

This is "not at range" but maybe useful

Cheers
Renato
Attached Files
 RtVariant.zip (8.7 KB, 23 views)
__________________
Plugins Site: renato-tarabella.com

VRayforC4D Site: www.vrayforc4d.net/

Last edited by RenatoT : 10 October 2006 at 10:32 PM.

 10 October 2006 allanalogy Frequenter portfolio ... Canada thanks Originally Posted by RenatoT: This is "not at range" but maybe useful Cheers Renato that's pretty cool! So anything can be dropped into the null object and it will begin to follow along in turn. and the "Multiplier" slider regulates how close they stay to the "Master" I'll have to look at it more closely to see how u did it. thanks Renato 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.
Forum Jump
 Please select one User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home -------------------- Gallery     Latest Entries     Featured 2D     Featured 3D     CG Awards     Community Awards Main     News     General Discussion     Off Topic     Recruitment         Temp Job Board Challenges     Rival Crimson X Chaos     Education     Demo Reel     Portfolio Review GROUPS WIP ADVICE     Pro Select     Art Direction and Interviews     New 2D/3D Sketchbooks 2018     WIP 2D/3D & Animation         WIP/Critique: 3D         WIP/Critique: 2D             Speedpaints & Sketchbooks         WIP/Critique: Animation     Partners and Groups         Kitbash 3D Thunderdome         Collaborative Projects Autodesk     Autodesk Maya         Maya Dynamics         Maya Rendering         Maya Character Setup         Maya Programming     Autodesk Miscellaneous         Autodesk MotionBuilder         Autodesk Mudbox         Autodesk Softimage             XSI: Programming             ICE: Interactive Creative Environment     Autodesk 3ds max         3dsMax Tutorials & Tips         3dsMax Resources         3dsMax SDK and MaxScript         Plugins & Add-ons         Particle Flow     Mudbox Featured Gallery ZBrush     Featured Zbrush Gallery     Pixologic ZBrush     Keyshot     Marvelous Designer Texturing     Allegorithmic Substance         Substance Designer         Substance Painter         Substance Featured Gallery     Texturing XYZ     Mari     Marmoset Toolbag Software     Maxon Cinema 4D         Cinema 4D Resources     Side Effects Houdini     Compositing Software         The Foundry Nuke         Adobe After Effects         Autodesk Effects and Compositing         Eyeon Software Digital Fusion     Additional Software         Lightwave 3D             LW Resources             LW Tutorials         The Foundry Modo             The Foundry Time Travel Challenge         E-on Software Vue         Photoshop / Painter         Blender         3DCoat Techniques     Art Techniques and Theories     Digital Matte Painting         Digital Matte Painting Mini-Challenge     Modeling         Modeling Challenge             Member Model Collection     Texturing and Surfacing     Character Rigging     Animation     Lighting and Shaders         Lighting Challenges     Compositing and Editing     Anatomy and Figurative Art         SPOTLIGHT: Best of the Artistic Anatomy and Figurative Art Forum         Tutorials and Workshops         Personal Anatomy & Sketchbook Threads         References, Resources, and Supplies Technical     VR/AR     Master Virtual Reality with BrioVR     Workstation Builds     Game Engine     Graphics Programming     Technical and Hardware CGS Labs     Sketchbooks     Hardcore Crit     Discussions and Meet Ups
Miscellaneous

All times are GMT. The time now is 12:47 AM.