Apply texture on an 3D object

Hi,
I have a 3D scanner that outputs 3D model (STL file) as well as texture for that model (PNG file). I'm able to open the STL file in Labview (as mesh object), but I don't know how to plot texture on the mesh, because Apply Texture.vi doesn't work (at least not correctly). However, I'm able to apply the same texture on a simple sphere (see the attached example), therefore I don't understand why it's not working for my mesh.
Any help is greatly appreciated. Also the example is attached.
Attachments:
3DPicture.7z ‏3677 KB

Now, I think that you probably want to show your 'hand' on top of your points. Then, although STL doesn't have Texture information, once you read into LabVIEW, you can manipulate the mesh to generate the missing infomation.
The Texture is specified by two parameters S and V. They correspond to the Horizontal and Vertical coordinates (normalize between 0 and 1) of the picture that will be use inside the triangle. So, I noticed that you want to see your hand 'projected' to the points measured. Also, I noticed that the X, Y position is 'similar' to the location of your picture, so I just tried to map the X and Y points (ignoring Z) into the S and V parameters. I also noticed that your dimensions were way bigger than the picture, so I normalized the X,Y,Z coordinates. Then, by applying a those two transformations, I was able to get this:
Now, I also noticed a relationship between the size of the picture and points, so that is the reason I tried 'eye ball' it. Also, I have to flip the picture vertically to match the inicial points.
Notice also that your measurements have several points that are not in the hand, so probably you'd want ot clean those points and also remove points that are 'off' the hand (probably errors).
In short, the trick in using textures and meshes is to map the part of the picture you want to map into your object (in your case, the triangles). If you look into the shipping example: "C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Graphics and Sound\3D Picture Control\Using Meshes.vi", you will see how meshes work with textures.
Would this work for you?
Barp - Control and Simulation Group - LabVIEW R&D - National Instruments
Attachments:
STL and JPEG examples with texture.vi ‏41 KB
hand 2.jpg ‏60 KB

Similar Messages

  • Applying a texture to an OrientedShape3D object?

    greetings,
    i am having problems applying a texture to an OrientedShape3D object. i am following the "recipe" and related examples in the j3d tutorial's chapter 7 on textures. my image is a 32x32 gif file that i want to texture onto an OrientedShape3D object that has 4 vertices:
    the "face" vertices for the OrientedShape3D object are:
    0.0f, 2.0f, 0.0f,
    0.0f, 0.0f, 0.0f,
    2.0f, 0.0f, 0.0f,
    2.0f, 2.0f, 0.0f
    the color for the "face" is red:
    1.0f, 0.0f, 0.0f,
    1.0f, 0.0f, 0.0f,
    1.0f, 0.0f, 0.0f,
    1.0f, 0.0f, 0.0f,
    the texture vertices are:
    0.0f, 1,0f,
    0.0f, 0.0f,
    1.0f, 0.0f,
    1.0f, 1.0f
    as i wrote my code follows the tutorial's recipe whereby i a create an OrientedShape3D, then the textured appearance, and then i apply that appearance to the OrientedShape3D object.
    when the shape is rendered i do not see the image. rather i see a color from the image but that color occupies the entire face. if i use the texture loader object to, say, scale the image then i see a rendering behavior that looks like the image is folded on itself similar to the problems the tutorial says will happen if the texture vertices are not correct.
    when i do not apply my textured appearance to the OrientedShape3D object the behavior is ok - the face of the shape is always oriented towards my eye, and remains red, as i rotate, scale, and translate the object..
    i'd really appreciate any help. thanks in advance!
    pgm...

    When you import a 3D object into Photoshop it has to be UV mapped meaning that there will be a JPEG referenced by the material file associated with the object. When you load the object, it is the JPEG which is actually a Texture layer. You can't access it with the 3D tools active but either before or after you apply the 3D adjustments you can double click on the specific texture layer which opens in a new window and then use any of the normal 2D painting/editing tools. When you save the changes to that file it will be applied to the model.
    Try opening a couple of the sample 3D models in the Goodies folder on the Photoshop install disk. Most do have JPEGs associated with them which means you will have an editable texture layer but one (at least) called Simple Robot I think has only a .mtl file which means you will see color and placement, perhaps a bump map, but there is no UV texture, just a procedural made inside the 3D app. Those aren't editable in Photoshop nor can you add a texture layer. A 3D model either has one which you can edit or it doesn't.

  • Problem with applying fills & strokes to grouped objects in Illustrator CC

    I have this problem that I deal with everyday & I can't figure out how to fix it.
    I am always struggling with applying fills & strokes (or changing fills & strokes).
    It seems like I always have to ungroup the objects first (even if I never grouped them in the first place), or I have to clear appearance first. Sometimes I have to ungroup several times, even if it is only one object by itself, not grouped with anything else.
    I think It may have something to do with the pathfinder... like the pathfinder is creating groups when I use the divide filter.
    Even when I use the direct selection tool, to select just the object I want, it wont let me apply the fill or stroke that I want.
    Also, it seems like it has several layers of appearance... when I ungroup the object, it changes appearance (the fill or stroke changes).
    Also, if I eyedrop the object to apply its appearance to another object, the "hidden" appearance is the one that gets appled to the new object.
    The closest discussion I could find was about compound paths, but I think this is a different issue, because when I go to compound paths in the menu, it doesn't give me the option to release anythig.
    I have this problem ALL DAY LONG, every day. Please help!!

    Thanks for your reply!
    I see what you are saying, and I think is some cases that could be a helpful trick - but the problem I'm having is slighlty different.
    The object that I want to change doesn't show the actual appearance... it only shows its underlying appearance after ungrouping several times, and then when it is completely ungrouped, it visibly changes to another fill & stroke. This happens even when the object is not grouped with anything... it is just grouped to itself i guess & I am not grouping these items, they just become grouped somehow - I think because of the pathfinder. I often have to ungroup 3-5 times, which is a hassle in iteself... but sometimes I actually need to grouping to keep items togther so I can manage all the ojects & move them around as needed.
    So... the method you are suggesting could possibly solve the issue, except I don't know what the fill & stroke is until I ungroup everything, so I can't create the swatch off to the side to match it. The other thing is, it seems like I would be creating a lot of swatches, since I use lots of different fills & it seems like it would be a lot of extra work.
    Here is an example of 2 objects before using the pathfinder. Please note how the object selected & the fill & stroke boxes all jive:
    Now here are two images after using the pathfinder tool (I added another object to get the problme to happen). Please note how the fill & stroke boxes do not match the objects selected:
    This is what happens when I try to change the fill to green (the fill does not apply):
    I thought it had something to do with compound paths, but as you can see below, the menu doesn't give me an option to release compound paths:
    The final image is what happens after I ungroup the objects:
    I don't understand:
    1) why pathfinder is grouping these objects
    2) why the strokes & fills change & why the fill & stroke boxes don't match the actual fill & stroke.
    3) why I can't change the fill or stroke without ungrouping (even when using the direct selection tool).
    4) why the fill & stroke change again after ungrouping

  • Applying filter settings to multiple objects

    Is it possible like in Microsoft Word, Excel et al using the
    'paint' icon to apply formatting settings to other objects? In
    Fireworks case, filter settings like drop shadow, angle etc..
    ?

    Hi Adobe,
    > Is it possible like in Microsoft Word, Excel et al using
    the 'paint' icon
    > to apply formatting settings to other objects? In
    Fireworks case, filter
    > settings like drop shadow, angle etc.. ?
    Yup! Apply what you want to one object, then copy the object,
    then
    shift+ctrl+alt+v the other objects to paste attributes (or
    Edit>Paste
    attributes).
    Aloha,
    Jerry

  • Searching for the methods applied to each type of object....

    Hi everybody...
    I want to find all the methods applied to each type of object in Swing/AWT java application.....
    for example in a text filed , there is
    jTextField1.setText('test')...
    in a combo box , there is
    jComboBox1.addItem("4")....
    Where can I find all which can be applied...????
    There is a url in on-line help
    http://java.sun.com/products/jfc/tsc/articles/component_gallery/
    which is invalid.....
    Thanks , a lot
    Simon

    Simon,
    all properties you see in the property palette are method calls in the code. So for a quick glance this will do it. Beside of this, there are books out there - e.g. from O'Reilly - that cover all components. If this isn't enough, you can get the JavaDocs from the SUN website
    Frank

  • [JS][CS4-5] Apply hyperlink to xml tagged object

    Hi,
    Can anyone please help me? I'm strugling with this problem for days....
    I'm trying to apply a new hyperlink to a xml tagged object (piece of text, frame or image)...
    The script trows an error "wrong source. Expected text but received XML element"
    Does anyone know how i can fix this?
    Thanks
    Code:
    var myDoc = app.documents[0];
    Check(myDoc.associatedXMLElement);
    alert("Done !");  
    //recursive function
    function Check(elm){
             for(var i=0; i<elm.xmlElements.length; i++){
                   myXMLElement = elm.xmlElements[i];
                   XMLelementName = myXMLElement.markupTag.name.toString();
                   // only apply to tagged object using the tag "Hyperlink"
                   if (XMLelementName == "Hyperlink"){
                          var myHyperlinkURL = myDoc.hyperlinkURLDestinations.add("http://www.google.com");
                          myHyperlinkURL.name = "http://www.google.com";
                          var myObject = elm.parent;
                          if(!( elm.xmlAttributes.item("href") == null)){
                                    // it's a picture
                                   // i'm not sure this will work
                                myHyperlinkSource = myDoc.hyperlinkPageItemSources.add(myObject);                 
                          }else{
                                   // it's not a picture
                                  // Error is in the line below
                                myHyperlinkSource = myDoc.hyperlinkTextSources.add(myObject);                 
                          var myHyperlink = myDoc.hyperlinks.add(myHyperlinkSource, myHyperlinkURL);
           // process all sub elements
           for (var i = 0; i < elm.xmlElements.length; i++){
                Check(elm.xmlElements[i]);

    Hi,
    Thanks for your feedback.
    Due to your great feedback, I've made some changes to the line below...
    var myObject = elm.texts[0];
    When performing the script, a hyperlink is added to all text in the textframe, not only to the text tagged by the xml tag. Does anyone know how this can be fxed?
    Also, when trying to do the same thing for  an image, but this doen't work...
    var myObject = elm.images[0];
    An error occures.
    And what about a empty graphic frame ? How can I add a hyperlink to frame if it's tagged by a certain xml tage?
    Any feedback would be helpfull...
    Tim

  • Add multiple textures to a collada object

    Hi,
    I am trying to add textures and materials to a collada object. My problem is, that the collada-type only has one property for textures as a "string".
    I need to know whether it is possible to add multiple texture files to a single collada object and - if it is - how to add them.
    Thanks and regards,
    Marc

    Hello Marc,
    in the backend the VBI application object has a method GET_INITIAL_ZIP_ARCHIVE. This method returns a Base64 encoded ZIP archive including an XML file and all required resources, e.g. DAE-Files. This ZIP archive needs also to include the Texture with the right path relative to the DAE-Files.
    When calling this method you can specify additional resources to be added to the archive via table IT_ADDITIONAL_RESOURCES. This table holds resource entries with a name and the binary content. I checked it and you can just add the path to the name:
    - Texture.jpg will be in the root of the ZIP archive
    - Image/Texture.jpg will create a sub folder Image and place the texture there
    Best regards,
    Uwe

  • How to apply same Animation to different Objects?

    Hello,
    So, as the question stated, I am trying to animate multiple objects in the scene with the same animation.
    For example, I have a SQUARE and a CIRCLE in the scene, both of them in different layers. I want them to both scale from 0% to 120%, then back to 90%, and finally to 100%. What I do is going in the SQUARE "scale" section and add keyframes to the time I want each elements (percentage) to be at. When done, the SQUARE works perfectly (scaling from 0>120>90>100 percent). Then, I copy and paste the keyframes I use with the SQUARE to the CIRCLE, which gives me the same animation as the SQUARE (0>120>90>100 percent). But when I want to make changes to both of them, I need to change each keyframes in each objects (SQUARE and CIRCLE) one by one...
    Having only two objects in the scene isn't bad, but I have around 30 objects that needs to be animated exactly the same... so changing them one by one is pretty time-consuming.
    So, the question is, is there a way where I can easily apply a type of animation (scaling 0>120>90>100, and adjustable afterwards) to different objects (SQUARE, CIRCLE, etc.) in my composition without doing it one by one?
    This might be a stupid question, but I'm new with After Effects so this is quite complicated for me...
    Thank you,
    Pascal

    Several ways, parenting and expressions.
    Parenting: Create a small solid or a null object that will be 'controlling' the other layers. Parent the CIRCLE and the SQUARE to it (to achive this, in the Parent column of the Composition Panel, select the name of the controlling layer or directly pickwhip the layer).
    Once done, when you scale/rotate/move the controlling layer the parented layers transform accordingly. It doesnt affect opacity.
    Be aware that parenting modifies the values you see in the Composition panel for each of these properties (scale/rotation/position) for each of the parented layers. This is because the transform properties are now expressed in the coordinate system of the parent layer, and not in the one of the comp. Modifying the transform properties of the parented layers tranform these layers relatively to the controlling one.
    Expressions: You can enter expressions in the transform properties of your layers. For instance, if your controlling layer is named 'controller', alt+click the stopwatch of the property 'Scale' of the SQUARE for instance and enter this in the expression box:
    thisComp.layer("controller").transform.scale;
    Now when you scale the controller, the SQUARE scales accordingly. It works for any property.
    Note that since the expression doesnt refer to the property's own keyframes, those keys are now ignored. To refer to the property's own key value in an expression, use simply 'value'. For instance:
    s = thisComp.layer("controller").transform.scale/100;
    [s[0]*value[0], s[1]*value[1]];
    The possibilities are pretty much infinite.

  • How to apply branding in the Flash object

    Hello everyone,
    How we can apply the CSS to the flash object in Nakisa 3.0 (orgchart). for example changing colors fonts, etc..
    Br

    Hi Ibrahim,
    These elements cannot be changed without an enhancement from Nakisa. They have to include your new fonts/colours into the flash module. You must contact them directly to findout if/how/when this can be done and for what cost.
    Best regards,
    Luke

  • How to Apply Row level restrictions On objects

    Hi All,
    I am working on universe designer(BO 3.1) .....
    I would like to apply row level restrictions on a cloumn of table based on the user who is running the report .
    can any one please help me on this..
    Thanks in Advance.............

    Hi
    Universe access and row-level security can also be managed at the group or individual user level from within the design environment.
    Find the below video row level restrictions
    http://www.youtube.com/watch?v=6yM0OLK6QlI
    Create a data security profile that restricts access to specific rows: Information design tool 4.x - YouTube
    Implementing row level security in IDT using Data Security Profile
    And You cannot set row-level security authorizations in an OLAP universe.
    User security can be defined at the most granular level for the following content objects.
    Folders and sub-folders
    Reports
    Categories
    Events
    Program Files
    Publications

  • Applying a graphics style to object in extendscript

    Hi
    I've looked around but can't find anything on this although I'm sure its pretty straightforward.
    How do I apply a graphic style (pre defined in the GRAPHIC STYLES palette as 'Line 1) to an object, say rectangle, called 'rectangle1' using extendscript.
    Can't work this out. (In illustrator CS5 bye the way)
    Thanks
    Bob

    here's a sample, graphic style "add" applied to Selection
    var idoc = app.activeDocument;
    var sel = idoc.selection[0];
    var addStyle = idoc.graphicStyles['add'];
    addStyle.applyTo (sel);

  • Applying a gradient to my object results in a tiled pattern.

    Hi,
    I'm not sure how to explain this, and have had trouble trying to find help because I don't really know how to describe what's happening.
    I created a diagonal gradient that I applied to a rectangle with rounded corners. I added the gradient to the swatches pallet. I then created another rectangle which was immediately filled with the gradient swatch. However, the gradient created was shaped like the rectangle and did not line up with the object, thus creating a tiled pattern of the swatch inside the rectangle. Attached image "gradient.jpg" shows the first (normal) gradient and the second (tiled) gradient.
    I moved the rectangle and observed that the gradient did not move with the object. It's like the gradient is stuck to the page and so the tiling pattern changes depending on where I move the rectangle.
    Does anyone know what is going on and how I can get rid of it? I just want a rectangle with a regular gradient across the fill.
    I'm using Illustrator CS4 win.
    Thanks for any help you can provide.
    Steven

    Thanks for the quick reply, Wade.
    Fantastic - it worked just fine. The only thing I noticed is that the swatch doesn't retain the -45 degree angle. Is this something I have to specify in the gradient pallet each time I apply the swatch? Actually I just tested it and worked out that a graphic style contains both the gradient information and the angle.
    Thanks again for your help.
    Cheers,
    Steven
    BTW, were you able to view the image I attached? When I view my post, it has the word QUEUED after it and I can't select it. Sorry, first time I've attached an image... Actually, just worked out there's an 'insert image' button in the editor, so I'll use that from now on. Cheers.

  • [CS5] How to apply outside stroke to (united) objects without covering them?

    Hi guys,
    AI CS5 is brilliant, I love it - that's beyond any doubt. But I found one more issue which I cannot solve...
    I want to apply outside stroke (Align Stroke to Outside) on my just outlined copy but it covers other objects.Take a look at this preview.
    With CS4 I simply outlined and merged objects by using pathfinder. Also new Shape Builder tool won't work because these objects are all separated. Let me know if you have any ideas to solve this issue
    Thanks!

    Well i did not know how you prepared the file so thought you might have the stroke on top.
    Above the fill of the characters
    below the fill at the character level
    edit
    here it as compound paths

  • Apply multiple effects to multiple objects with single click box

    I would like to click on a click box and have one object appear and another object disappear. I guess what I'd like to do is apply effects to multiple objects with a single click box. Is that possible?
    Thank you.

    Welcome to our community
    Sure it can be done but you won't use effects to do it.
    When you insert an object in Captivate, you have an option to enable or disable Visibility. You also have an option to name the object. So you would give the object a meaningful name and clear the Visibility option to "hide" it until needed.
    Then you would create an Advanced Action that would hide some objects and show others.
    After that, you would assign the Advanced Action to a Click Box or a Button or some other event.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Applying Textures to an IndexedTriangleStripArray

    Hi @ all,
    As mentioned in the topic, I want use an IndexedTriangleStripArray for rendering Textures. But I can't programm a prototype with which i would be able to design more complex geometry objects.
    I' m not able to assign the right indices to the vertex- and texturecoordinates in the Array.
    I've tried to implement it with data BY_REFERENCE like below:
    float[] coordinates={
    1.0f, 1.0f, -1.0f,
    1.0f, -1.0f, -1.0f,
    -1.0f, 1.0f, -1.0f,
    -1.0f, -1.0f, -1.0f};
    float[] texCoord={
    0.0f, 0.0f,
    0.0f, 1.0f,
    1.0f, 0.0f,
    1.0f, 1.0f};
    int[] coordIndex={0, 2,     3, 0, 1, 3};
    int[] texCoordIndex={0, 2, 3, 0, 1, 3};
    int[] stripIndexCounts={6};
    IndexedTriangleStripArray plane = new IndexedTriangleStripArray(4, GeometryArray.COORDINATES | GeometryArray.BY_REFERENCE     |      GeometryArray.TEXTURE_COORDINATE_2, 6,stripIndexCounts);
    plane.setCoordRefFloat(coordinates);
    plane.setTexCoordRefFloat(0,texCoord);
    plane.setCoordinateIndices(0,coordIndex);
    plane.setTextureCoordinateIndices(0,0,texCoordIndex);
    //Later a texture image is being loaded and the Geometry is embedded in the SimpleUniverse
    Unfortunately this sample just displays a white square without the Texture image. Why is the image not been displayed? What did I wrong with the indices numbers?

    Hi,
    here is the complete source code of the testprogram. It's a modified file of the Java3D Examples1.6
    import java.applet.Applet;
    import java.awt.BorderLayout;
    import java.awt.GraphicsConfiguration;
    import com.sun.j3d.utils.geometry.*;
    import com.sun.j3d.utils.applet.MainFrame;
    import com.sun.j3d.utils.universe.*;
    import com.sun.j3d.utils.image.TextureLoader;
    import javax.media.j3d.*;
    import javax.vecmath.*;
    * SimpleTextureApp creates a single plane with texture mapping.
    public class SimpleTextureApp extends Applet
    BranchGroup createScene()
    BranchGroup objRoot = new BranchGroup();
    Transform3D transform = new Transform3D();
                   float[] coordinates={
                   1.0f, 1.0f, -1.0f,
                   1.0f, -1.0f, -1.0f,
                   -1.0f, 1.0f, -1.0f,
                   -1.0f, -1.0f, -1.0f};
                   float[] texCoord={
                   0.0f, 0.0f,
                   0.0f, 1.0f,
                   1.0f, 0.0f,
                   1.0f, 1.0f};
                   int[] coordIndex={
                   0,
                   2,
                   3,
                   0,
                   1,
                   3};
                   int[] texCoordIndex={
                   0,
                   2,
                   3,
                   0,
                   1,
                   3};
                   int[] stripIndexCounts={
                   6};
                   IndexedTriangleStripArray plane = new IndexedTriangleStripArray(4, GeometryArray.COORDINATES | GeometryArray.BY_REFERENCE     |
                   GeometryArray.TEXTURE_COORDINATE_2, 6,stripIndexCounts);
                   plane.setCoordRefFloat(coordinates);
                   plane.setTexCoordRefFloat(0,texCoord);
                   plane.setCoordinateIndices(0,coordIndex);
                   plane.setTextureCoordinateIndices(0,0,texCoordIndex);
    Appearance appear = new Appearance();
    String filename = "stripe.gif";
    TextureLoader loader = new TextureLoader(filename, null);
    ImageComponent2D image = loader.getImage();
    if(image == null) {
    System.out.println("load failed for texture: "+filename);
    // can't use parameterless constuctor
    Texture2D texture = new Texture2D(Texture.BASE_LEVEL, Texture.RGBA, image.getWidth(), image.getHeight());
    texture.setImage(0, image);
                   appear.setTransparencyAttributes(new TransparencyAttributes(TransparencyAttributes.FASTEST, 0.1f));
    Shape3D planeObj = new Shape3D(plane, appear);
    objRoot.addChild(planeObj);
    Background background = new Background();
    background.setColor(0.5f, 0.5f, 0.5f);
    background.setApplicationBounds(new BoundingSphere());
    objRoot.addChild(background);
    return objRoot;
    public SimpleTextureApp()
    setLayout(new BorderLayout());
    GraphicsConfiguration config =
    SimpleUniverse.getPreferredConfiguration();
    Canvas3D canvas3D = new Canvas3D(config);
    add("Center", canvas3D);
    canvas3D.setStereoEnable(false);
    SimpleUniverse u = new SimpleUniverse(canvas3D);
    // This will move the ViewPlatform back a bit so the
    // objects in the scene can be viewed.
    u.getViewingPlatform().setNominalViewingTransform();
    u.addBranchGraph(createScene());
    public static void main(String argv[])
    System.out.print("SimpleTextureApp.java \n- ");
    System.out.println("The simpliest example of using texture mapping.\n");
    System.out.println("This is a simple example progam from The Java 3D API Tutorial.");
    System.out.println("The Java 3D Tutorial is available on the web at:");
    System.out.println("http://java.sun.com/products/java-media/3D/collateral ");
    new MainFrame(new SimpleTextureApp(), 256, 256);
    I hope this is helpful for you.
    Geetings User239

Maybe you are looking for