Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Texture (New Custom Feature!)

2

Comments

  • MichaelPascoeMichaelPascoe Member Posts: 2,012 PRO
    edited September 2022
    @fnxf
    It is possible, but not in the features current state. I will need to add the ability to use a feature as a texture input. The image would need to be placed inside a sketch, then that sketch could be selected as a custom material.

    I'm adding this to my improvements list. This is a fantastic idea! 

    It may take a while, but I plan to re-write the feature from the ground up. When I do, I will try to implement this.

    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • fnxffnxf Member, User Group Leader Posts: 138 PRO
    @MichaelPascoe
    Glad to know it might be included in future versions- but with no delivery date 😉 

    Yes, this seems like a good workflow. You need to place and size the image anyway, so a sketch is needed in the first place.

    thanks!
  • STEGSTEG Member, User Group Leader Posts: 103 PRO
    JUST WOW!!!
  • mahirmahir Member, Developers Posts: 1,309 ✭✭✭✭✭
    fnxf said:
    Is it possible to add an image as a texture?
    @fnxf Look at you reaching for the sky :D I know SolidWorks does this, but implementing a method to convert image data into geometry would be quite the undertaking for a FeatureScript. @MichaelPascoe if you could pull this off that would be quite impressive!
  • EvanReeseEvanReese Member, Mentor Posts: 2,186 ✭✭✭✭✭
    mahir said:
    fnxf said:
    Is it possible to add an image as a texture?
    @fnxf Look at you reaching for the sky :D I know SolidWorks does this, but implementing a method to convert image data into geometry would be quite the undertaking for a FeatureScript. @MichaelPascoe if you could pull this off that would be quite impressive!
    I thought he may have just meant patterning sketch images on a part for visuals. I think you're referring to an actual displacement map that modifies geometry and can be 3D printed, which is definitely on my wishlist! I currently use Keyshot or Rhino for this. I know Onshape's Render Studio can also do displacement mapping, but I've not played with it enough to know if there's a way to export the resulting mesh. I don't think featurescript currently has any capability of actually evaluating images (like reading the RGB values and using them in a feature). If they add it, you can bet I'll add something like that to Attractor Pattern.
    Evan Reese
  • MichaelPascoeMichaelPascoe Member Posts: 2,012 PRO
    edited October 2022
    Good catch @Evan_Reese

    @mahir
    @fnxf
    Evan's right, currently Onshape doesn't have the capability to wrap images. In my custom feature, the only thing an image "texture" would do is resize the image and place it in the patterned locations. It would not wrap to the surface.


    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • fnxffnxf Member, User Group Leader Posts: 138 PRO
    mahir said:
    fnxf said:
    Is it possible to add an image as a texture?
    @fnxf Look at you reaching for the sky :D I know SolidWorks does this, but implementing a method to convert image data into geometry would be quite the undertaking for a FeatureScript. @MichaelPascoe if you could pull this off that would be quite impressive!
    @mahir 😉 Maybe it's just a pipe dream.. But the Rendering Studio does Texture as a displacement (e.g. https://www.youtube.com/watch?v=ZTMbo79daIo) and that's sufficient for those times when I need it.

    @Evan_Reese yes, I did mean just patterning sketch images for quicker visuals. Nice that Keyshot together with Rhino can export modified geometry.

    @MichaelPascoe yeah, it's the wrapping (texturing) of images that I want, and if Onshape can't do it (yet), then we just have too keep writing improvement requests 😀 
  • Ammon_HovanskiAmmon_Hovanski Member Posts: 2
    how would you go about making a rough sheet rock texture
  • MichaelPascoeMichaelPascoe Member Posts: 2,012 PRO
    @Ammon_Hovanski Using the Attractor Pattern by @Evan_Reese would be a great way to generate some rough bumps on a texture square that could be used as a custom texture. There are some special techniques you can use to make the texture seamless. 

    I'll try to work up an example for you.

    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • marshall_polandmarshall_poland Member Posts: 10 PRO
    Hey @MichaelPascoe , awesome work! This feature is very useful to me as-is... and I have two humble requests :D
    1) Make it possible to select multiple faces for "Face to texture." For example I'm working on this part which has a surface I'd like to make grippy with a texture. The surface is curvature-continuous, but it's made up of 3 separate faces. Currently it looks like I have to create 1 Texture feature for each.

    2) Add an option to specify spacing between pattern members, rather than the total rows/colums. For example I would like these spheres to be equally spaced on my surface. Currently it seems I have to use trial and error to get the right # of rows and columns, and the spacing would get off if my selected face changed size.
    Cheers--
  • MichaelPascoeMichaelPascoe Member Posts: 2,012 PRO
    Excellent requests @marshall_poland. These are currently already on my to do list for the next version. 

    Here is a sneak peak of my To Do List for the next version. Note that I have many other projects in the way so it will be some time before I get to this. If at anytime someone needs specific functionality for their production work sooner, feel free to sponsor your specific needs through CADSharp.
    Functionality:
    - Features as custom inputs so you can use images within sketches. (Images will not wrap as this functionality is not currently possible with Onshape)
    - Multi surface inputs - Select multiple faces.
        - If faces are adjacent, feature will treat them as one face.
        - If faces are not adjacent, feature will treat it like a new separate face.
    - Configuration input for face selection: All faces, selective - Row / column count by width or height
    - Selective: Range input. Example: row 2 to 5, column 1 to 3 - Color - Color per configuration
        - Color gradient from column or row similar to "selective" input
    - Property
        - Name
        - Description
        - Part number
        - etc
    - Border: trim parts to edges will now automatically extend parts beyond edge then trim them. Previously required you to "save parts at edges" then "trim parts at edges".
    - Other
        - Flip columns and rows


    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • EvanReeseEvanReese Member, Mentor Posts: 2,186 ✭✭✭✭✭
    Oh boy if you figure out a good way to do multiple faces I'd be pumped!
    Evan Reese
  • MichaelPascoeMichaelPascoe Member Posts: 2,012 PRO
    @Evan_Reese I will probably do it in a similar way to that mod with your Face Curves feature.

    @marshall_poland Here is a UX sneak peak:


    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • gauthier_östervallgauthier_östervall Member Posts: 99 ✭✭
    Amazing! I'm also doing a tower, so that is handy. 

    The way I'm using it, the pattern ends early at edges:


    So, there are some bricks "missing":


    Can I somehow cover them?
  • S1monS1mon Member Posts: 3,039 PRO
    Cut the castellations after the texture.
  • gauthier_östervallgauthier_östervall Member Posts: 99 ✭✭
    Thanks @S1mon! This works well in this case. But sometimes I need the "simple" untextured part to reference to, in the following features. For example in the case of a round tower, I might need the clean section (a circle), without the texture. In these cases, I need to apply texture after all the other features.
  • MichaelPascoeMichaelPascoe Member Posts: 2,012 PRO
    edited November 2022

    @gauthier_östervall
    Try changing the grid type to Staggered and trimmed.

    This is basically adding two configurations: 
    Other > Border > Save off surface parts
    Other > Border > Trim parts at edges


    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • gauthier_östervallgauthier_östervall Member Posts: 99 ✭✭
    @MichaelPascoe Thanks for this awesome work! Since your asking for suggestions:
    - "Sort X" confused me. Maybe because I'm a programmer, I interpreted "sort" as "put them in increasing order". "Fix" or "Auto" would be a better word.
    - I don't find to rotate the pattern. Like if you want the grain of the wood pattern to go perpendicular to default.
    - scaling confuses me a lot. Here is a picture of "Tongue and Groove", applied to a small surface.
    - scaling gives x, y, z, but are there the global axis? Maybe the ability to give a direction line? I my example above, the small surface is slanted, so global axis don't help.

    Thanks for the energy you're putting into it, I've been missing this since forever!
  • MichaelPascoeMichaelPascoe Member Posts: 2,012 PRO
    edited November 2022

    @gauthier_östervall, these are great suggestions! I will add a few of them to the list for sure.

    As far as the tongue and groove material, this one, along with some others, have some default real world values that they instantiate with. This is so that you can place these on a real wall and not worry about it being the wrong scale because it is based on real world dimensions.


    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • carlos_berdealcarlos_berdeal Member Posts: 76 ✭✭
    @MichaelPascoe . Hi. is there a reason I cant find this tool in the search tools? Edit: Found it.
  • kevin_mason558kevin_mason558 Member Posts: 47 EDU
    i have added the diamond plate texture to a stair tread i am drawing. is there a way to select multiple faces at a time? i have had to add three "textures to each folded face on the tread.
    also it has added all of the dimples as individual parts, adding this to an assembly is then a lot of work scrolling through my parts lidt finding them to add to the tread. is there a way of adding them as a block? 
    i would like these to show on my 2D drawing too so being on the assembly is how i would do this.

    fairly new to onshape and learning a lot as i go. may not be doing things the best way
    any help appreciated.
  • MichaelPascoeMichaelPascoe Member Posts: 2,012 PRO

    Hey @kevin_mason558, welcome to Onshape! 

    Currently this feature only supports one face at a time. This is on the list of things for me to upgrade in future releases.

    If you share a link to your document, I can help you find the best practice for getting all of your treads textured. You may have to forum DM me because my forum notifications haven't been working well lately.


    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • mmiratemmirate Member Posts: 2
    @MichaelPascoe Sometimes I have a complex overhung part that cannot be milled from a single stock, but rather must be cut in half (or more), each half milled separately, and the whole thing bolted back together. Right now, the cutting tool is a plane, nothing more, producing an interface between the parts which is smooth and low-friction. When such a part is manufactured and bolted togther, any loading that wants to try to slide the parts against each other, will only be opposed by the shear strength of the bolts. What I would like to be able to do instead, is exchange material between the two parts in a patterned way along the cut plane, such that as long as the bolts are pressing the parts together sufficiently, their interface surface will apply normal force which resists most loads that would try to shear the bolts in half at the cut plane. (only leaving the component of tension normal to the cut plane, which will inevitably try to shear the heads off of the bolts  - no way around that). Could this type of operation become possible via improvements to this Texture tool, or is there already a better way to do that?
  • MichaelPascoeMichaelPascoe Member Posts: 2,012 PRO
    edited March 2023

    @mmirate, If I were to split a part to give it shear strength, I would split the part using a configured surface. You could create a surface in a part studio, then have a configuration that changes the size and quantity of the surface pattern. Then you can derive it into your part studio where you need to do the splitting. I recommend Point derive by @Alex_Kempen, it will derive and place your part studio at the same time. 

    Alternatively, when you create the surface, you could thicken it a very small amount. Then when you do the point derive, you can derive, transform, and remove all in one go without having to split the part.

    https://cad.onshape.com/documents/735d432f59538d6571ff064b/w/2a03ae2dd9d83769c71f2693/e/23b75d1d337049c7ad63c1ae?renderMode=0&uiState=64235375ed32cb6d6305ac53



    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • Marc_MillerMarc_Miller Member Posts: 110 ✭✭✭
    Really cool feature script @MichaelPascoe, thank you.

  • roberto_grossoroberto_grosso Member Posts: 1
    edited May 2023
    I have an issue with texture, it switch colums and row, how i can rotate the texture pattern?
    how to define the X and Y axis for the texture?  :#

  • MichaelPascoeMichaelPascoe Member Posts: 2,012 PRO
    edited May 2023

    @roberto_grosso, currently you would have to create a move configuration and rotate it 90 degrees. This is a bit painful and will be much easier in the new version of the feature. I'm not sure when I will be able to make the time to work on this feature again. I have started, but there are more pressing projects in my pipe line at the moment.

    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • michael_rozellemichael_rozelle Member Posts: 4
    Hi Michael - Brilliant stuff here, but I feel like I'm missing something basic.  When adding diamond plate texture, using 1x1 grid as suggested, the texture comes out very large and I'm at a loss on how to scale the 'diamonds' down in size.  What am I missing?
  • MichaelPascoeMichaelPascoe Member Posts: 2,012 PRO

    @michael_rozelle, I believe diamond plate along with some other textures are 1:1 scale for the real world. This may be why it is large. Those 1:1 textures don't scale to fit the face, they are a set size that is patterned. 

    If you share your document, I'll take a look at it.


    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • michael_klinemichael_kline Member Posts: 21 ✭✭
    @MichaelPascoe getting into using the pattern tool, so far its been great, thanks for your work. I was wondering if there is a reason it runs slower than a turtle with no legs? simple changes take minutes to work out. is there a way to speed this up? should i have made my own copy of the script "locally"?
Sign In or Register to comment.