Appearance Texture Rotation with iLogic only?

Appearance Texture Rotation with iLogic only?

Anonymous
Not applicable
1,236 Views
5 Replies
Message 1 of 6

Appearance Texture Rotation with iLogic only?

Anonymous
Not applicable

I'm working on a fully automated tool for my company which will take input from an external program, import it as parameters into Inventor and output images of the finished product as close to real as I can get it.  I've got most of it working with iLogic only but now I'm down to appearance settings.  

 

As certain features are suppressed/unsuppressed and the geometry starts to change, sometimes the texture map changes orientation in an undesirable way.  Wood grain direction, for example, is very important to how this product will work and these are my screenshots of the issue as I switch between two styles of geometry.  These are the same components using the same material and the same appearance:

 

Grain 01.JPG        Grain 02.JPG

 

As the contour that's routed into the wood changes from a flat face to a curved face, the texture is laid out at a different angle.  I wasn't sure if this was based on the fact that the corner joints were different so I tested with another style which used the Miter joint yet still had a flat face and I confirmed it was definitely the curvature, not the joint style.  

 

Grain 04.JPG

 

First off:  I'm not going to use the appearance adjust tool because that is awful for a fully dynamic part/assembly.  It forces face overrides and does not allow a texture rotation independent of the appearance style nor can it be automated to work with full automation.

 

Second off:  I don't want to have separate files for each component with pre-rotated textures and switch between them when the texture will mess up.  This dynamic assembly is slow enough already and I can't afford sloppy patches that take up excess memory.

 

I'm experiencing many limitations with Inventor's simplified materials/appearances which are causing the need to bypass most of the built in settings. 

 

My current idea is actually a big work-around where instead of switching between materials and appearances in each document (like 8 wood materials and 20 appearances, one for the respective wood and more for paint colors) I would instead set up better textures (tileable this time) and have 90deg rotation variants for each wood grain all in a library of JPGs.  I would then override a single texture file in a separate folder where Inventor pulls from for one single material.  This would allow my C# application to choose appearance in the folder system and Inventor won't be any-the-wiser that its changing.  

I wouldn't need to go through the trouble if I could reach into material/appearance settings and set each by iLogic code.  I could do a lot dynamically if the code snippets were available.  

 

Also, when I use a feature like seen below where a center panel gets a raised contour, the texture causes an issue per face.  I understand that what I'm seeing here is a texture direction based on the parallel/perpendicular relationship to the sweep/extrude features used to generate these contours.  I also know that at this point, rotating the texture won't help me.  It can be fixed with the appearance adjust tool but that can't be automated.  If there is a way to hard-lock the texture into a projected axis direction (like in any other 3D software) I'm sure that will also be helpful information. 

Grain 05.JPG

1,237 Views
5 Replies
Replies (5)
Message 2 of 6

BrandonBG
Collaborator
Collaborator

Did you make any progress in controlling wood grain direction?

 

I'm struggling with the connecting between the underlying part grain direction, the material/appearance grain direction, and the resulting applied direction. (Let's not talk about nesting yet...).

 

Brandon

0 Likes
Message 3 of 6

benedictsweet
Contributor
Contributor

I too am interested if any progress was made? I'm currently in an assembly wanting to apply a 90deg rotation to a series of block parts in there. I was hoping to find any ilogic that would manipulate the faces' UV maps.

Message 4 of 6

johnsonshiue
Community Manager
Community Manager

Hi! I could be wrong but I don't think there is an iLogic solution in this case since there isn't an API interface to do that. Let me move the thread to Inventor Programming so other experts can take a look and confirm the behavior.

Many thanks!



Johnson Shiue ([email protected])
Software Test Engineer
0 Likes
Message 5 of 6

benedictsweet
Contributor
Contributor

Hi Johnson, thank you very much for that, much appreciated

0 Likes
Message 6 of 6

WCrihfield
Mentor
Mentor

Hi guys.  This is honestly an area that I have not ventured into before, because I never needed to, but I suspect that the Face.TextureMaps property could be the 'rabbit hole' that may lead somewhere useful for these types of situations.  If you follow its trail downward, you find lots of interesting things that could potentially be used.  However, almost everything down that path is either a 'ReadOnly' property, or a 'Get' type method.  I did not see a TextureMaps.Add type method, or any 'Set' type methods.  But there may be more to this story than what I know about right now.  Maybe this will help open the door to further investigations by others with more experience in those areas though.

TextureMaps 

TextureMap 

TextureMap.GenerateImage (method)

TextureMap.GetTextureCoordinateSet (method)

TextureMap.Image 

TextureMap.Transformation 

TextureMap.MaskColor 

TextureMap.UseMask 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes