# Normal to Rotation with XPresso

THREAD CLOSED
 Thread Tools Search this Thread Display Modes
 01 January 2013 Theropoda Expert Normal to Rotation with XPresso Hello, I'm quite noobish concerning XPresso and think that this might be an easy task for most of you: I want the direction of a polygon normal to drive the rotation of another object. So that, for example, the Y Axis of my object is in line with the polygon normal. The polygon node has a normal output which gives me a vector, I think. At least the result node shows me 3 different values, all between -1 and +1, depending on the rotation of the polygon. How do I connect this vector to the HPB values of my object? I tried with the range mapper, p.ex. mapping the -1 to +1 values to -90 to +90 degrees... but this gives me strange results. What's the best way to accomplish this task? Thanks a lot Günter share quote
 01 January 2013 littledevil Meh   portfolio Ferdinand Germany hi, a normalized vector has nothing to do with a rotation vector. you will have to use a python node to use a helper function provided by the utils class to calculate a HBPvector from a normal vector. i do not hink that there is a preset for this. `````` import c4d from c4d import utils as u ... HBPRotation = u.VectorToHPB(Normal)`````` share quote
 01 January 2013 Theropoda Expert Hi, Thanks for the reply. I didn't think that I would have to use scripting for this - unfortunately I have practically zero experience with python and coding in general and thus try to avoid it. I thought of it as a relatively easy task: - the polygon normal points in a certain direction - the Y axis of my object should point in the same direction So I thought there must be some relatively simple way to connect both. I'm looking into constraints now as I just have no clue about scripting. Thanks Günter share quote
 01 January 2013 Theropoda Expert I just found out that the clamp constraint does exactly what I need. Anyway, I'd still be interested if there's some way with XPresso. Günter share quote
 01 January 2013 Srek Some guy   portfolio CGConnect Member Björn Dirk Marl Technical Design Maxon Computer GmbH Friedrichsdorf, Germany The Vector2Matrix node converts the normal into a matrix, then feed the result in the Matrix2HPB node to get rotational values. Make sure to select the correct rotation system. __________________ - www.bonkers.de - The views expressed on this post are my personal opinions and do not represent the views of my employer. share quote
 01 January 2013 CGTalk Moderation Expert Thread automatically closed This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum. __________________ CGTalk Policy/Legalities Note that as CGTalk Members, you agree to the terms and conditions of using this website. share quote
 Thread Closed share thread

 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.
Minimize Ads
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
Miscellaneous

All times are GMT. The time now is 01:13 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.