Jump to content
Altivec

Marionette Texture Mapping

Recommended Posts

Hi Everyone.  I'm hoping someone can help me out.  For the most part I can figure most stuff out on my own but the way the description in this node is presented, I just can't figure it out.  All I am trying to do is change the texture map type to auto-align plane and turn on the follow longest edge check box. I tried a billion ways but I get no change no matter what I do.  Below is how I think it should work but it obviously doesn't.  Anybody have any suggestions.  Thanks in advance.image.thumb.png.1b2e0fe0d9cbf82f8bf84819329b30b6.pngimage.thumb.png.85bb3483e4049392ca0eca28984c0a78.png

Share this post


Link to post

It looks like from the script for this node the Map Type value in the OIP must be set to Boolean, to set that data type.

 

  • Like 1

Share this post


Link to post
Posted (edited)

Thank you Dave.  It still doesn't work but it got me going again in a different direction.  I now realize the iselector 7 is not to set the map type to "Auto-Align Plane" but instead to Turn on or off the "Align Selected Mappings" check box.   So I checked every other node I can think of to see where the option of changing the texture map type (ie. Plane, Auto-Align Plane, Sphere...) could be and I keep coming back to this node.  I tried some more things and I got the map type to change by using the iselector set to 1 (which is defined as "Init" in the description, however, I could only get it to change by having the OIP set to Boolean.  So by default the map type is set to perimeter but if I check the Boolean to TRUE then it changes the map type to plane.  That's great if these were the only two options but there are 5.  How do we select those other ones.  I tried using Integers but then it doesn't work.   This is by far the strangest and least explained node I have ever come across.

 

image.thumb.png.4021327167d17f50f60189ef79a752ab.png

 

 

Edited by Altivec

Share this post


Link to post

Hi

Sometimes it helps me to take a look on the code inside a node to understand how it works.

 

In your case the there are three important functions, one for each type in the OIP.

SetTexMapBoolN

SetTexMapIntN

SetTexMapRealN

 

Perhaps these function reference pages will help you understand how the node works.

Share this post


Link to post

Thanks MRoth.  Although I do not know Vectorscript, I always go inside and look at the code.  I've been comfortable enough to customize and create my own nodes by logically working through the code but this one has got me stumped.  I looked at the links of the Vectorscript functions you posted and figured that the one that changes the map type is  SetTexMapIntN.  So logic tells me that the OIP setting needs to be set to INT for that function run as per the if statements inside .  The function notes then states its expected int values ( 0=plane, 1=sphere, 2 cylinder...etc) .   So unless the node is not working correctly or I'm not understanding something these are the values I think it needs:

 

OIP Type = Integer

PartID = 3 for overall,

LayerID = 0 to control the texture and not a decal

Selector ID = 1 to set the map type to integer

Value = 3 for algorithmic.

 

I have attached the file if anyone has any other ideas and wants to play around with it.

 

image.thumb.png.db2eeaaebc15e6041e6b7af98e1d098d.png

TexMapTest.vwx

Share this post


Link to post

I made some progress and I'm almost there but need some help on the last thing.  I will explain what I've learned just in case others run into a similar issues.  Apparently, the "set texture map" node does not work when you have your object textured by class.  Although the texture shows up on your object without the "apply texture" node, you can not manipulate or control the texture unless you use the "Apply Texture Node" first.  So basically I just modified the get class texture node so that it gets the name of the texture from the class settings and re-applies the texture to the objects.  Now it's controllable and the remaining parts of my script work.  So I can change the mapping type to plane, spherical etc... they are all there except for the one I need  "Auto-Align Plane".   All documentation I found skips that option and I tried a lot of random numbers without success.  Does anyone know what the integer number for Auto-Align Plane is?

 

image.thumb.png.2f0e091e35ec926bbe67811dc4c59c99.png

Share this post


Link to post

It looks like you will have to edit the node script as it does not appear to handle all of the options. The following is from the VectorScript Function Reference 2020.

 

It appears that 7 is auto align.

SetTexMapBoolN	Textures 
Vectorworks 2010
VectorScript Declaration:

PROCEDURE   SetTexMapBoolN
(	 	obj	:HANDLE;
 	 	texPartID	:LONGINT;
 	 	texLayerID	:LONGINT;
 	 	selector	:INTEGER;
 	 	value	:BOOLEAN
) ;
Python:

def  vs.SetTexMapBoolN(obj, texPartID, texLayerID, selector, value):
   return None
Description:

Set map info for specific part of object. partID is texture part, 
overall is 3. Selector: init:1, flip:2, repH:3, repV:4, long edge:5, 
worldZ:6, auto align:7

 

Share this post


Link to post

Thanks Pat.  Unfortunately, I started down that path and ended up in the wrong area.  I also got confused with words auto align-7.  This is not the auto-align I am looking for.  The function TexMapBool that you referenced is to turn on or off all the check box options found in the rendering tab.  That makes sense because it's a Boolean. #7 is to check on or off the "Align Selected Mappings" checkbox near the bottom.  What I am looking to change is the "Auto-Align Plane" found in the popup list titled Map Type: right under the texture icon.  This section is controlled by the function SetTexMapIntN.  I am able to cycle through all the options in that menu except for Auto-Align plane.   I am not sure if there is a technical reason why that one item is not selectable or if there is some undocumented option or bug that's in VectorScript.

Share this post


Link to post

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...