Texturing a Cylinder

Hi!
I'm working on a project were I want to texture a cylinder with a specified image. I'm using this code to create the texture and apply it to the cylinder:
Texture texture = new TextureLoader(workDir + "/Textures/picture.jpg", this).getTexture();
Appearance textureAp = new Appearance ();
textureAp.setTexture(texture);
Cylinder tempMantel3D = new Cylinder(10.0f, 5 , Cylinder.GENERATE_NORMALS | Cylinder.GENERATE_TEXTURE_COORDS, 32, 1, textureAp); The problem is that the texture doesn't map to the cylinder as I want. It is mapped on the cap and not around the cylinder. Can anyone give me a CODE-example of how to specify the mapping coordinates for a cylinder so that the texture is layed around the cylinder?
Regards,
Henrik

Nevermind, I solved it my self...
If anyone is interested, here is the code:
//Texture
Appearance theApp = new Appearance();
TexCoordGeneration texCoordGen = new TexCoordGeneration(TexCoordGeneration.OBJECT_LINEAR,
                                                                            TexCoordGeneration.TEXTURE_COORDINATE_2);
TextureLoader textureLoader = new TextureLoader("fl?ta.jpg", null);
ImageComponent2D img = textureLoader.getImage();
Texture2D wallsTexture = new Texture2D(Texture.BASE_LEVEL,
                                                                            Texture.RGBA,img.getWidth(), img.getHeight());
wallsTexture.setBoundaryModeS(Texture.WRAP);
wallsTexture.setBoundaryModeT(Texture.WRAP);
wallsTexture.setImage(0, img);
wallsTexture.setEnable(true);
wallsTexture.setMagFilter(Texture.NICEST);
wallsTexture.setMinFilter(Texture.NICEST);
PolygonAttributes polyAttr = new PolygonAttributes(PolygonAttributes.POLYGON_FILL,
                                                                                            PolygonAttributes.CULL_NONE, 0.0f);
theApp.setPolygonAttributes(polyAttr);
theApp.setTexture(wallsTexture);
Material matShield = new Material();
Color3f mantelF?rgFloat = new Color3f((float)220/255.0f, (float)220/255.0f, (float)220/255.0f);
matShield.setDiffuseColor(mantelF?rgFloat);
Transform3D positionMantel = new Transform3D();
positionMantel.setTranslation(new Vector3d(0.0, 0.0, 0.0));
TransformGroup tgMantel = new TransformGroup(positionMantel);
Cylinder tempMantel3D = new Cylinder((float)ytterRadie, h?jd , Cylinder.GENERATE_NORMALS | Cylinder.GENERATE_TEXTURE_COORDS, 32, 1, theApp);
Appearance theCapApp = new Appearance();
Material mat = new Material();
mat.setDiffuseColor(0.5f, 0.5f, 0.5f);
theCapApp.setMaterial(mat);
tempMantel3D.setAppearance(tempMantel3D.TOP, theCapApp);
tempMantel3D.setAppearance(tempMantel3D.BOTTOM, theCapApp);//Henrik

Similar Messages

  • How do I wrap an image or texture around a cylinder please?

    I am working on a project for uni, and am a complete beginner in Illustrator (and Photoshop for that matter).  I have CS5, and want to wrap texture or an image (or an image of texture) around a cylinder.  Can anyone please tell me how?
    Many thanks in advance.

    1. Place your image in an Illustrator document
    2. Drag it to the symbols panel and give it a name when the option window appears and click OK It does not matter whether you choose Movie or Graphic symbol.
    3. Draw a Circle ellipse using the elipse tool
    4. Go to Effects>3D. Extrude and bevel
    5.turn on Preview the the extrude dialog window
    6.Make you adjusts to the depth of the extrude.
    7. Click on the Map art button
    8. in the map art window select the face of the cylinder you want to map the art to
    9. Select the texture symbol you made form the image from the drop symbol menu
    10. adjust the position and click Ok.

  • Texture Difficulties: Maps as solid color

    Greetings,
    I've recently begun developing java3d applications, and have run into a snag with my latest endeavour. I am attempting to texturemap a cylinder, and have thus far been outwitted. The texture is pulled down from the URL and laid upon the cylinder, but it appears as a solid color. I originally thought this was a RGB vs RGBA issue, but after endless musings with the constructor I'm still at a loss.
    Below is a snip of my problem area. Thanks in advance for any insight. I will again remind you that I am a beginner at Java as well as 3D development so I apologize for possibly asking a silly question.
        URL url_bodyTexture = null;
        try
          url_bodyTexture = new URL("http://mrkasai.undergroup.com/agsense/images/body.png");
        catch (MalformedURLException e) {}
        // appearance of bin body
        Appearance a_binBody = new Appearance();
          ColoringAttributes c = new ColoringAttributes();
            c.setColor(gray);
            c.setShadeModel(ColoringAttributes.SHADE_GOURAUD);
          TransparencyAttributes trans =
            new TransparencyAttributes(TransparencyAttributes.BLENDED,0.4f);
          Material m = new Material();
            m.setAmbientColor(darkgray);
            m.setDiffuseColor(lightgray);
            m.setSpecularColor(white);
            m.setShininess(90.0f);
         // my nemesis:  I have changed this line many many times with similar results
          Texture t_binBody = new TextureLoader(url_bodyTexture, "RGB", this).getTexture();
            t_binBody.setEnable(true);
          TextureAttributes ta_binBody = new TextureAttributes();
            ta_binBody.setTextureMode(TextureAttributes.MODULATE);
          a_binBody.setColoringAttributes(c);
          a_binBody.setTransparencyAttributes(trans);
          a_binBody.setMaterial(m);
          a_binBody.setTexture(t_binBody);
          a_binBody.setTextureAttributes(ta_binBody);Thanks,
    --Michael                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    so maybe I should apply coordinates?--> you have to :) a texture can only successfully be put on an object, if there are coordinates, which describe the position, size, adjustment etc.. Texture coordinates can either be assigned to the object (for each vertex of the geometry), or to be generated automatically (in form of the class TexCoordGeneration and assigned
    to the Appearance).
    I would recommend you to read the manual at http://java.sun.com/developer/onlineTraining/java3d/index.html, Chapter 7 Textures. In addition I would like to suggest the use of AniFun3 to work trough the examples. In AniFun3 you can change all the parameters in dialog boxes and you will see changes on the fly - without the otherwise usual time-consuming change/compile/test procedure.
    Regards,
    Oliver

  • Rotate a Cylinder within the x,y,z axis

    I want to set a Point3d object as an argument in the method and then the cylinder to orientate accordingly to that point (maybe vector). Is this possible?

    It worked, now i want to rotate a TruncatedCone like this
    package shape;
    import shape.*;
    import java.io.*;
    import java.util.*;
    import javax.media.j3d.*;
    import javax.vecmath.*;
    Truncated Cone is a geometry primitive defined with two radius and a height.
    It is a truncated cone centered at the origin with its central axis
    aligned along the Y-axis.
    <p>
    When a texture is applied to a truncated cone, the texture is applied to the
    caps and the body different. A texture is mapped CCW from the back of the
    body. The top and bottom caps are mapped such that the texture appears
    front facing when the caps are rotated 90 degrees toward the viewer.
    <p>
    This class hs been copied from the Cylinder class and was then modified to
    match the needs of a runcated cone.
    @author <a href="http://www.gressly.ch/rene/" target="_top">Rene Gressly</a>
    public class TruncatedCone extends Primitive
        float radius1, radius2, height;
        int xdivisions, ydivisions;
        boolean bDrawCaps=true;
        static final int MID_REZ_DIV_X = 10;
        static final int MID_REZ_DIV_Y = 1;
         * Designates the body of the truncated cone.  Used by <code>getShape</code>.
        public static final int BODY = 0;
         * Designates the top end-cap of the truncated cone.
         * Used by <code>getShape</code>.
        public static final int TOP = 1;
         * Designates the bottom end-cap of the truncated cone.
         * Used by <code>getShape</code>.
        public static final int BOTTOM = 2;
         *   Constructs a default truncated cone of bottom radius of 1.0, top radius 0.5 and height
         *   of 2.0. Resolution defaults to 15 divisions along X axis and
         *   1 along the Y axis.
        public TruncatedCone()
              this(1.0f, 0.5f, 2.0f, GENERATE_NORMALS, MID_REZ_DIV_X, MID_REZ_DIV_Y, null/*,true*/);
         *   Constructs a default truncated cone of two given radius and height.
         *   @param radius1          Bottom Radius
         *   @param radius2      Top Radius
         *   @param height           Height
        public TruncatedCone (float radius1, float radius2, float height)
              this(radius1, radius2, height, GENERATE_NORMALS, MID_REZ_DIV_X, MID_REZ_DIV_Y, null/*, true*/);
         *   Constructs a default truncated cone of two given radius, height height and appearance.
         *   @param radius1          Bottom Radius
         *   @param radius2      Top Radius
         *   @param height           Height
         *   @param ap                Appearance
         *      @param bDrawCaps     Indicates if top and bottom caps shall be drawn
        public TruncatedCone (float radius1, float radius2, float height, Appearance ap/*, boolean bDrawCaps*/)
              this(radius1, radius2, height, GENERATE_NORMALS, MID_REZ_DIV_X, MID_REZ_DIV_Y, ap/*, bDrawCaps*/);
         *   Constructs a default truncated cone of two given radius, height, primitive flags and appearance.
         *   @param radius1          Bottom Radius
         *   @param radius2      Top Radius
         *   @param height           Height
         *   @param primflags      Flags
         *   @param ap                Appearance
         *      @param bDrawCaps     Indicates if top and bottom caps shall be drawn.
        public TruncatedCone (float radius1, float radius2, float height, int primflags, Appearance ap/*, boolean bDrawCaps*/)
              this(radius1, radius2, height, primflags, MID_REZ_DIV_X, MID_REZ_DIV_Y, ap/*, bDrawCaps*/);
         *  Obtains the Shape3D node associated with a given part of the truncated cone.
         *  This allows users to modify the appearance or geometry of individual parts.
         *  @param partId The part to return (BODY, TOP, or BOTTOM).
         *  @return The Shape3D object associated with the partID.  If an
         *  invalid partId is passed in, null is returned.
        public Shape3D getShape(int partId)
            if (partId == BODY)
                return (Shape3D) ( (Group)getChild(0) ).getChild(BODY);
            else if (partId == TOP)
                return (Shape3D) ( (Group)( (Group)getChild(0) ).getChild(TOP) ).getChild(0);
            else if (partId == BOTTOM)
                return (Shape3D) ( (Group)( (Group)getChild(0) ).getChild(BOTTOM) ).getChild(0);
            return null;
        /** Sets appearance of the truncated cone. This will set each part of the
         *  truncated cone (TOP,BOTTOM,BODY) to the same appearance. To set each
         *  part's appearance separately, use getShape(partId) to get the
         *  individual shape and call shape.setAppearance(ap).
        public void setAppearance(Appearance ap)
              ((Shape3D)((Group)getChild(0)).getChild(BODY)).setAppearance(ap);
              ((Shape3D)((Group)((Group)getChild(0)).getChild(TOP)).getChild(0)).setAppearance(ap);
              ((Shape3D)((Group)((Group)getChild(0)).getChild(BOTTOM)).getChild(0)).setAppearance(ap);
         *   Constructs a customized truncated cone of two given radius, height,
         *   resolution (X and Y dimensions), and appearance. The
         *   resolution is defined in terms of number of subdivisions
         *   along the object's X axis (width) and Y axis (height). More divisions
         *   lead to more finely tesselated objects.
         *   @param radius           Radius
         *   @param height           Height
         *   @param xdivision      Number of divisions along X direction.
         *   @param ydivision      Number of divisions along height of cylinder.
         *   @param primflags      Primitive flags.
         *   @param ap                Appearance
         *      @param bDrawCaps     Indicates if top and bottom caps shall be drawn.
         public TruncatedCone(float radius1, float radius2, float height, int primflags,
                                  int xdivision, int ydivision, Appearance ap/*, boolean bDrawCaps*/)
              super();
              this.radius1 = radius1;
              this.radius2 = radius2;
              this.height = height;
              this.xdivisions = xdivision;
              this.ydivisions = ydivision;
              flags = primflags;
              this.bDrawCaps = bDrawCaps;
              boolean outside = (flags & GENERATE_NORMALS_INWARD) == 0;
              // Create many body of the cylinder.
              Quadrics q = new Quadrics();
              GeomBuffer gbuf = null;
              Shape3D shape[] = new Shape3D[3];
              GeomBuffer cache = getCachedGeometry(Primitive.CYLINDER, radius1, radius2, height, xdivision, ydivision, primflags);
              if (cache != null)
                   shape[BODY] = new Shape3D(cache.getComputedGeometry());
                   numVerts += cache.getNumVerts();
                   numTris += cache.getNumTris();
              else
                   gbuf = q.cylinder((double)radius1, (double)radius2, (double)height, xdivision, ydivision, outside);
                   shape[BODY] = new Shape3D(gbuf.getGeom(flags));
                   numVerts += gbuf.getNumVerts();
                   numTris += gbuf.getNumTris();
                   if ((primflags & Primitive.GEOMETRY_NOT_SHARED) == 0)
                   cacheGeometry(Primitive.CYLINDER, radius1, radius2, height, xdivision, ydivision, primflags, gbuf);
              if ((flags & ENABLE_APPEARANCE_MODIFY) != 0)
                   (shape[BODY]).setCapability(Shape3D.ALLOW_APPEARANCE_READ);
                   (shape[BODY]).setCapability(Shape3D.ALLOW_APPEARANCE_WRITE);
              (shape[BODY]).setCapability(Shape3D.ALLOW_GEOMETRY_READ);    
           (shape[BODY]).setCapability(Shape3D.ALLOW_GEOMETRY_WRITE);   
             ((GeometryArray)(shape[BODY]).getGeometry()).setCapability(GeometryArray.ALLOW_COORDINATE_READ);
                  ((GeometryArray)(shape[BODY]).getGeometry()).setCapability(GeometryArray.ALLOW_COORDINATE_WRITE);    
              if ( bDrawCaps )
              {          Appearance a = new Appearance();
      Material mat = new Material();
      PolygonAttributes polyAtt= new
    PolygonAttributes(PolygonAttributes.POLYGON_FILL,PolygonAttributes.CULL_BACK
    , 0.0f);
      a.setMaterial(mat);
      a.setPolygonAttributes(polyAtt);
                   // Create top of cylinder
                   gbuf = q.disk((double)radius2, xdivision, outside);
                   shape[TOP] = new Shape3D(gbuf.getGeom(flags));
                   shape[TOP].setAppearance(a);
                   if ((flags & ENABLE_APPEARANCE_MODIFY) != 0)
                        (shape[TOP]).setCapability(Shape3D.ALLOW_APPEARANCE_READ);
                        (shape[TOP]).setCapability(Shape3D.ALLOW_APPEARANCE_WRITE);
                   numVerts += gbuf.getNumVerts();
                   numTris += gbuf.getNumTris();
                   //move it up
                   Transform3D t2 = new Transform3D();
                   Vector3d vec = new Vector3d(0.0, 0.0, (double)height);
                   t2.setTranslation(vec);
                   TransformGroup objTrans2 = new TransformGroup();
                   objTrans2.setTransform(t2);
                   objTrans2.addChild(shape[TOP]);
                   objTrans.addChild(objTrans2);
              (shape[TOP]).setCapability(Shape3D.ALLOW_GEOMETRY_READ);    
           (shape[TOP]).setCapability(Shape3D.ALLOW_GEOMETRY_WRITE);   
             ((GeometryArray)(shape[TOP]).getGeometry()).setCapability(GeometryArray.ALLOW_COORDINATE_READ);
                  ((GeometryArray)(shape[TOP]).getGeometry()).setCapability(GeometryArray.ALLOW_COORDINATE_WRITE);   
                   // Create bottom
                   gbuf = q.disk((double)radius1, xdivision, !outside);
                   shape[BOTTOM] = new Shape3D(gbuf.getGeom(flags));
                   shape[BOTTOM].setAppearance(a);
                   if ((flags & ENABLE_APPEARANCE_MODIFY) != 0)
                        (shape[BOTTOM]).setCapability(Shape3D.ALLOW_APPEARANCE_READ);
                        (shape[BOTTOM]).setCapability(Shape3D.ALLOW_APPEARANCE_WRITE);
                   numVerts += gbuf.getNumVerts();
                   numTris += gbuf.getNumTris();
                   // Flip the cap so that texture coords are right.
                   Transform3D t3 = new Transform3D();
                   rotMat = new Matrix4d();
                   objectMat = new Matrix4d();
                   rotMat.setIdentity();
                   objectMat.setIdentity();
                   // rotMat.rotZ(Math.PI);
                   objectMat.mul(objectMat, rotMat);
                   t3.set(objectMat);
                   // Move it down
                   vec = new Vector3d(0.0, 0.0, 0.0);
                   t3.setTranslation(vec);
                   TransformGroup objTrans3 = new TransformGroup();
                   objTrans3.setTransform(t3);
                   objTrans3.addChild(shape[BOTTOM]);
                   objTrans.addChild(objTrans3);
                        (shape[BOTTOM]).setCapability(Shape3D.ALLOW_GEOMETRY_READ);    
           (shape[BOTTOM]).setCapability(Shape3D.ALLOW_GEOMETRY_WRITE);   
             ((GeometryArray)(shape[BOTTOM]).getGeometry()).setCapability(GeometryArray.ALLOW_COORDINATE_READ);
                  ((GeometryArray)(shape[BOTTOM]).getGeometry()).setCapability(GeometryArray.ALLOW_COORDINATE_WRITE);    
              // Set Appearance
              if (ap == null){
              setAppearance();
              else setAppearance(ap);
                     transformCylinder(new Point3f(-5f,-5f,-5f), new Point3f(5f,5f,5f),new TruncatedCone());
         * Used to create a new instance of the node.  This routine is called
         * by <code>cloneTree</code> to duplicate the current node.
         * <code>cloneNode</code> should be overridden by any user subclassed
         * objects.  All subclasses must have their <code>cloneNode</code>
         * method consist of the following lines:
         * <P><blockquote><pre>
         *     public Node cloneNode(boolean forceDuplicate) {
         *         UserSubClass usc = new UserSubClass();
         *         usc.duplicateNode(this, forceDuplicate);
         *         return usc;
         * </pre></blockquote>
         * @param forceDuplicate when set to <code>true</code>, causes the
         *  <code>duplicateOnCloneTree</code> flag to be ignored.  When
         *  <code>false</code>, the value of each node's
         *  <code>duplicateOnCloneTree</code> variable determines whether
         *  NodeComponent data is duplicated or copied.
         * @see Node#cloneTree
         * @see Node#duplicateNode
         * @see NodeComponent#setDuplicateOnCloneTree
        public Node cloneNode(boolean forceDuplicate)
            TruncatedCone c = new TruncatedCone(radius1, radius2, height, flags, xdivisions, ydivisions, getAppearance()/*, bDrawCaps*/);
            c.duplicateNode(this, forceDuplicate);
            return c;
         * Copies all node information from <code>originalNode</code> into
         * the current node.  This method is called from the
         * <code>cloneNode</code> method which is, in turn, called by the
         * <code>cloneTree</code> method.
         * <P>
         * For any <i>NodeComponent</i> objects
         * contained by the object being duplicated, each <i>NodeComponent</i>
         * object's <code>duplicateOnCloneTree</code> value is used to determine
         * whether the <i>NodeComponent</i> should be duplicated in the new node
         * or if just a reference to the current node should be placed in the
         * new node.  This flag can be overridden by setting the
         * <code>forceDuplicate</code> parameter in the <code>cloneTree</code>
         * method to <code>true</code>.
         * @param originalNode the original node to duplicate.
         * @param forceDuplicate when set to <code>true</code>, causes the
         *  <code>duplicateOnCloneTree</code> flag to be ignored.  When
         *  <code>false</code>, the value of each node's
         *  <code>duplicateOnCloneTree</code> variable determines whether
         *  NodeComponent data is duplicated or copied.
         * @see Node#cloneTree
         * @see Node#cloneNode
         * @see NodeComponent#setDuplicateOnCloneTree
        public void duplicateNode(Node originalNode, boolean forceDuplicate)
            super.duplicateNode(originalNode, forceDuplicate);
         Retrieves the height of the truncated cone.
         @return     The height of the truncated cone.
         public float getHeight()
              return height;
         Retrieves the bottom radius of the truncated cone.
         @return     The bottom radius of the truncated cone.
         public float getRadius1()
              return radius1;
         Retrieves the upper radius of the truncated cone.
         @return     The upper radius of the truncated cone.
         public float getRadius2()
              return radius2;
           public void transformCylinder(Point3f pointA, Point3f pointB, TruncatedCone c) {
              Point3f a=pointA;  
              Point3f b=pointB;   
              //rotation components   
              double za=Math.atan(Math.abs((b.x-a.x)/(b.y-a.y)));   
              System.out.println("RZ: "+Math.toDegrees(za));   
              double ya=Math.atan(Math.abs((b.z-a.z)/(b.x-a.x)));   
              System.out.println("RY: "+Math.toDegrees(ya));   
              Transform3D rotY=new Transform3D();   
              rotY.rotY(-ya);   
              Transform3D rotZ=new Transform3D();   
              rotZ.rotZ(-za);   
              rotY.mul(rotZ);   
              Transform3D upT=new Transform3D();   
              upT.setTranslation(new Vector3f(b));  
               Transform3D downT=new Transform3D();   
               downT.setTranslation(new Vector3f(a));   
               GeometryArray top=(GeometryArray)c.getShape(TruncatedCone.TOP).getGeometry();   
               GeometryArray bottom=(GeometryArray)c.getShape(TruncatedCone.BOTTOM).getGeometry();   
               GeometryArray body=(GeometryArray)c.getShape(TruncatedCone.BODY).getGeometry();   
               for(int i=0;i<top.getVertexCount();i++) {     
               Point3f p=new Point3f();     
               top.getCoordinate(i,p);     
               if(p.y<0) {       
               p.y += c.getHeight() / 2;      }    
                if(p.y>0) {        p.y -= c.getHeight() / 2;      }    
                 rotY.transform(p);     
                 upT.transform(p);     
                 top.setCoordinate(i,p);    }   
                 for(int i=0;i<body.getVertexCount();i++) {    
                  Point3f p=new Point3f();     
                  body.getCoordinate(i,p);     
                  float ly=p.y;     
                  if(ly>0f) {       
                  p.y-=c.getHeight()/2;      
                   rotY.transform(p);       
                   upT.transform(p);      }
                   else {       
                   p.y+=c.getHeight()/2;       
                   rotY.transform(p);       
                   downT.transform(p);      }     
                   body.setCoordinate(i,p);    }   
                   for(int i=0;i<bottom.getVertexCount();i++) {     
                   Point3f p=new Point3f();     
                   bottom.getCoordinate(i,p);     
                   if(p.y<0) {       
                   p.y += c.getHeight() / 2;      }     
                   if(p.y>0) {        p.y -= c.getHeight() / 2;      }     
                   rotY.transform(p);     
                   downT.transform(p);     
                   bottom.setCoordinate(i,p);   
    }i recieve no errors but it doesn't work.
    It requires the shape package. Please write your mail if you want me to send the package to you in order to test the whole class himself.
    Thanks in advance

  • Photoshop CC / 3D - Wrapping a graphic around a cylinder without repeating.

    I'm trying to wrap a label around a 3D bottle by inserting the label as a diffuse texture. I am able to position and scale the label proportionately, however instead of wrapping around the bottle once, it's repeating twice. I've tried fooling with the UV Properties with no success. Can anyone tell me how to successfully wrap a graphic around a model once without repeating?

    You know a lot more about 3D then I do.  You wrote that you were wrapping you label around a cylinder. So that is what I did. I know nothing about how to use extrusions like you do. I have just played a little with Adobe preset meshes like the wine bottle, cylinder and sphere.  Its easy to put label on cylinders or wrap the earth around a sphere or put a collage on a Christmas ball.  That is what  I did and I also created an opacity map.
    View screen captures in new tabs ans scale to actual size.

  • CS5 - Wrap label around a cylinder (like wine label or pop can)

    [This is not a Windows-specific question, I hate to exclude Mac users from this answer, but there is no platform-neutral forum here]
    In Photoshop CS3 and earlier, taking a layer, such as a label for a wine bottle or jar, wrapping it around a 3D cylinder and compositing it to an image (of the actual jar or bottle) was almost trivially easy.
    Unfortunately, with the advanced 3D tools available in CS4+, the simplicity of the Wrap > Cylinder option seems to have been lost.
    Wrapping a complex texture around a cylinder (full coverage, top to bottom) is possible, but how about wrapping a label (especially one that has a die-cut ie: not full coverage)?
    A couple of quick searches have surprisingly turned up no tutorials on the subject. Has what was once such a simple technique become so technical and obscure?
    Can someone point me to a tutorial (written or video), or provide a list of steps here on this forum?
    Thanks!

    SG... wrote:
    Are you saying the work on Refine Edge which is new in CS5 needs re-re-architecting? ;-)
    Heh, I sure am. Not that it isn't on its way. The Refine Edge in CS4 showed us where Photoshop was heading in terms of broadening its selection maniuplation toolset (ah, I remember the days of alpha channels + blur + levels + maximize / minimize). But we saw the (almost) disappearance of Extract Filter. Then its most powerful algorithm reappered in Refine Edge in CS5 and it was a Good Thing. Decontaminate Color alone is worth its weight in gold - that's a nifty little algorithm that saves us all time with the paintbrush manually un-pre-multiplying sub-pixel content.
    But it still needs work - notably, it is one of the few tools yet that still feel "outside" the standard application workflow. It's its own dialog box (not a palette) and it's a one-shot, destructive effect. I appreciate that you can output to a separate layer, AND make your settings default. It still feels like it's stuck in a pre Smart Filters era.
    Please note that I'm not complaining here, just pointing out that it can still get better, and mask manipulations (from my perspective, and that's only one, as the Photoshop userbase is one of the most diverse out there) are core functionality, whereas 3D is arguably not. Or let me put it this way: lots of apps do 3D, and most of them do it better than PS. But no other apps do selections better than PS and that's a fact. Play to your strengths is all I'm saying.
    I'm interested in this combination above. You don't feel the additional 3D features in Ps is a good fit, and yet you're being proactive to address demand from students. What are their specific use cases, if any? Do they resist your guidance to try other shoes if the ones Ps provides don't fit? What points do your students raise for why they want/need to use Ps for 3D instead of developing a tool kit that includes full 3D modeling applications?
    You're right, my comment warrants clarification. The demand from students is not for 3D functionality per se. The demand for students is that you teach them the latest and the greatest (regardless of what industry actually expects out of a graduate's skillset), because they saw it on Adobe TV, or they read about it in some product review. I spend 24 hours of class time on colour correction (and that's scratching the surface), but about 5 minutes on Content Aware Fill. And I wouldn't even touch it if it weren't for the inevitable savvy student that pipes up in class when I talk about the Clone Tool and says "but isn't that replaced by Content Aware Fill?". So you have to touch on it.
    One of the strange new realities of teaching Photoshop post PS5.5 is telling students "just because it's in the menu doesn't mean you should use it." This was first true with things like magnetic lasso, or art history brush, or the spot healing brush tool (though very specific cases can be made for each of them - I'm aware of that) and the tradition now continues on with Content Aware Fill / Scale, Mini-Bridge (though I'm sure this is just a personal opinion, and a good case can be made for it in your workflow on a very fast computer), and IMO, 3D.
    So I don't necessarily see a contradiction. Students who are fairly new to the industry are hungry for the "cool factor" (not to mention the "easy way out"), and it's a constant balancing act designing curriculum that emphasizes best practices, while still covering all the bells and whistles (with the appropriate cautionary tales). If I were still teaching Advanced Photoshop to PS pros and they were clamoring for more 3D, that would be a whole other story. I'll admit that I may be out of the loop there, though, which is why I am still eager to hear from you who you think the target demographic that wants true 3D in Photoshop is.
    When I was teaching to pros, they were mostly pro Photographers (think Yuri Dojc) or Architects. I can certainly see the latter being curious about 3D in Photoshop, but those that are technical enough are now all versed in the Autodesk suite, so they would be doing texture generation and compositing in PS at most. Photographers are much less likely to be even remotely interested in 3D within Photoshop, but that's probably not the audience you were building it in for anyway.
    Do you feel your advanced experience with SoftImage, 3DS, Maya is helpful to understand Ps's 3D features or does it get in the way? IOW, what benefits and hindrances do you note when trying to apply previous learning to the Ps 3D feature set? Or is it hard to answer at this point because you've been blocked due to crashing and performance issues?
    Without a shadow of a doubt, my background was essential to being able to pick this up in PS without the manual. I think I would feel completely lost if I didn't have 10+ years of 3D modeling, texturing and animation behind me (note that I don't consider myself a pro in 3D - just an experienced amateur). Possibly even WITH the manual.
    3D is a wonderful world full of really cool technical details that merge the artistic with physics. Photoshop has bitten off only one branch of that, namely shaders, but that is in itself a vast subject. The amount of background knowledge you need to have under your belt is vast - what's the difference between diffuse and ambient colour? what's a specular highlight, and how do you control glossiness? what's a "normal"? hell - what's a "lightsource", and what are their different modes?
    I just covered the basics of 3D using repousse and height mapping the other day in a class of twenty-odd 20-30 year olds: I spent 2.5 hours with the students (we had a lot of fun mind you) and didn't even get to texturing at all. Not a single mention of maps, colour or anything. There's too much other material to cover - navigation, object-level vs mesh-level manipulations (ask me my opinion on the usability of your implementation of that feature some time, you'll have another page to read!), then TSR, then lightsources, camera views, ground planes, raytracing, merge 3D layers (you'll have to explain the logic behind having separate 3D "scenes" co-existing within the same document some time).
    Bottom line: adding 3D to Photoshop seems like you've put a tiny little door in the bottom of the vast, vast world of Photoimaging. When you open that door and look through you discover that there's this other huge huge world of 3D modeling just on the other side. In order to make ANY use of the 3D features, such as they are now (as opposed to the previous incarnations - including Vanishing Point, which had some very interesting potential) you now have to jump into that world and start to get your bearings.
    I think the GPU is causing more headaches then the 4GB RAM, but that's only a quick assessment. Have you had much luck finding newer drivers?
    You are almost certainly right. I need to get back to Chris on another thread and let him know that my drivers WERE, in fact, embarassingly out of date. Updating them didn't solve all my problems, but a few have gone away thankfully. I have yet to push the limits of 3D on my personal box again, but will certainly circle back with you if I notice some improvement.
    Thanks Steve, always a pleasure talking about this stuff. I am about as passionnate a guy about Photoshop as you'll meet, but because I spend 90% of my time in industry using Photoshop as a production and creative tool (I only teach 1 day a week these days), you'll probably find I'm quite conservative. Heck, much of our agency is still running the full CS3 - there just hasn't been enough compelling reasons to upgrade across the entire organization yet.

  • Wrapping label around cylinder

    Hi everyone,
    I came across this thread http://forums.adobe.com/message/2982117 explaining how to wrap a label around a cylinder. However when I try myself, I obtain an enormous 3D cylinder with my label glued on it and once I reduce the size of the cylinder to the desired size, my label is minuscule. Additionally, it takes me ages to rotate/scale the cylinder in the right way.
    Isn't there any easier solution ? If not, how to solve the size problem ? Why is the 3D cylinder provided by Photoshop so enormous ?

    Open the texture and resize and reposition the element as needed.

  • Strange 3D issue - all textures display as the same texture after resizing document

    Hi There,
    I've just had my first 3D experience in Photoshop mapping a bunch of different label options onto a cylinder - everything was working perfectly until I re-sized the image.
    Now each label change-out gets displayed as one of the labels - Photoshop will only display one label despite there being mutiple layers and layer comps.
    If I:
    Go to the diffuse texture for each label and choose "Edit texture"
    A new window opens showing the correct label/texture
    Has anyone else seen this?
    Any pointers in the right direction would be much appreciated.
    Cheers
    Ben

    I fixed it by going back into each diffuse texture and choosing "Edit UV Properties" and hitting OK - this seem to reset and re-render each texture.
    Seems like a bug unless you can't use Image Size on documents that contain 3D layers maybe?

  • Textures need to much ram!

    Hi guys, i'm quite new to java3D;
    At the moment I try to create a rotating menu. It consists of a circle, and depending on the rotation angle of the circle, different actions are startet. It's a bit like one of these very old telephones. I think you know what i mean.
    I create a cylinder with the height of zero, then i rotate it around the X-Axis so that I can see its top. Now i have created a flat "disc". Then i add an image with the menu text as texture to the disc.
    The problem is now that the picture needs a very high resolution (about 2500x2500 pixel), otherwise the text gets grainy; when the picture is loaded, this simple application needs about 130mb ram. Without the picture it takes about 20mb... I think this is very strange, the picture itself has only about 200kb.
    Here is the code where i add the texture:
          ZylinderAppearance.setTexture(new TextureLoader("sample.jpg", null).getTexture());
          ZylinderAppearance.setTextureAttributes(new TextureAttributes(TextureAttributes.MODULATE,new Transform3D(),new Color4f(), TextureAttributes.FASTEST));
          ZylinderAppearance.setCapability(Appearance.ALLOW_TEXTURE_WRITE);  
          Cylinder Zylinder = new Cylinder(0.8f, 0.0f , Primitive.GENERATE_NORMALS | Primitive.GENERATE_TEXTURE_COORDS, 100, 10, ZylinderAppearance);Is there a better way to load / add the texture? I also tried writing the text of the menu directly with Text2D(), but this text always looks ugly.
    Another possibility might be to create single pictures for every text-block and add them one by one, but I dont really know how to create the tex-coordinates of round shapes..
    here you can see a sample texture for the disc: http://www.bwiebertha.de/sample.jpg
    thx in advance!

    from looking online it looks as though your model can take 8Gb maximum.
    I have recently been using a site called Mr Memory, they have your model listed on their site - elitebook 2740p

  • Texturing in Java3d

    Hi All,
    I am trying to build a java 3d model of a cricket field. For this I will need to texture the strip area (a brown colour) a different texture than the rest of the field.
    At present I have tried to create a thin cylinders and a thin box. The cylinder for the overall area of the area of the field and thr box for the cricket strip. And place one inside the other, however this doesn't give the right effect.
    How can I either texture a small area of the field a different texture to represent the pitch, or make one shape take priority over the other one in terms of what is viewed if they are at the same location.
    Adam

    No I don't have to do anything with the pitch texture, just needs to sit there and look pretty.
    I am a real newbie to java 3d, so you said draw it onto the the texture. Do you mean create a massive texture that is mostly made of the grass and then a bit of it of the pitch??? I thought one was suppose to take small textures and let java3d copy them onto the much bigger surface?
    As for the shape slightly above the surface, firstly I have tried that and it didn't work very well, and secondly the pitch must be the same level as the outfield!
    An example link or a bit of example code would be much appreciated, as I know very little about all of this at the moment.
    Adam

  • Bootcamp 5.1.1 on Mac Pro Cylinder can't install Windows 8

    Hi,
    I've gone through almost every discussion regarding the common issue "Windows coud not update the computer's boot configuration" but none is related to Bootcamp version 5.1.1 and latest Mac Pro cylinder.
    I already tried the solution presented by Jarvil at this discussion: https://discussions.apple.com/message/23545780#23545780
    Based on Jarvil's solution there is a very important thing that is not happening in my case, that is that I never get the option to boot from the "Windows" partition. I only have 3 options, 1) Macintosh HD 2) Recovery 3) EFI Boot.
    By not having the option to boot from Windows partition I automatically deviate from Jarvil's solution.
    So, I proceed with EFI boot, I reach the step where I have to select the partition and I pick the 4th partition and it says that Windows can't be installed in this partition so I delete/format it and proceed with installation and it goes all well until the very end where it's finishing the install that I get the message:
    "Windows coud not update the computer's boot configuration".
    I also tried skipping the install --> login into Mac OS X --> Disk Utility --> Delete partition --> Create ExFAT partition (tried FAT also) --> Reboot --> EFI Boot (Windows partition still not available) --> Format partition --> Proceed with install --> Same error again.
    After the error, it reboots and then I get a blue screen (**** Windows blue screens) with a message:
    Recovery
    Your PC Needs to be repaired
    The Boot Configuration Data file is missing some required information.
    File: \BCD
    Error code: 0x0000034
    You'll need to use the recovery tools on your installation media. If you don't have any installation media (like a disc or USB device), contact your system administrator or PC manufacturer.
    So I reboot holding Option key and now the partition Windows appears and if I boot from it I get the same blue screen with the recovery error. So I reboot again and login into OSX, go to Disk Utility and delete the "Untitled" partition and I recreate it using ExFAT but then it gets stuck "Preparing to partition disk".
    I'm attaching snapshots.
    I really hope that someone from Apple support can provide a solution. Thank you very much in advance.
    Alejandro

    It's not an Apple response but it is something which worked for me. This is an exerpt from a post I made on another site. It's a bit involved and you may think this should not be necessary (and you'd be right) but if you want to try it you're welcome. No guarantess.
    Install Windows again just like you did before with Bootcamp (but you may have to remove any traces of it first).
    So starting again with Bootcamp Assistant and with Macintosh using the whole disc again begin the process.
    Allow Windows to be installed as normal.
    When the BCD error box opens up DO NOT click on OK - immediately do a hard shutdown of the Mac by holding the power button. This is so the changes are not rolled back.
    Start up the Mac again holding the Alt key and choose the USB EFI Boot option in the boot menu (it will be orange). At this point if you get a Windows blue screen error shutdown and take out the USB then restart the machine holding Alt and at the boot menu plug in the USB again and do the above.
    At the installer's start screen press shift + F10 to get a command prompt.
    In the command prompt type
    diskpart and hit enter
    type
    list volume  and hit enter
    Note the volume letters and numbers of all the volumes .  One should be an EFI partition of type FAT32 and it will have no drive letter.
    Now type
    list volume and hit enter (note the letters and numbers of the displayed volumes) One will be your EFI partition of FAT32 type and it will have no letter, just a number.
    type
    select volume X (where X is the number of your EFI partition) and hit enter
    type
    assign letter=B and enter
    type
    exit and enter
    type
    bcdboot C:\Windows /l en-GB /s B: /f ALL   *** note the /l en-GB is for locality and language and will default to English US if not changed. Obviously you need to change to your own locale and language code***
    press enter (after checking all spaces etc). You may also struggle to find the \ key on your keyboard, it may change position once in command prompt!.
    After a few seconds it should report that the boot files were written. If it does that you can type in
    wpeutil reboot and press enter at which point your Mac will reboot. Hold the Alt key and choose your new EFI Boot option and hopefully Windows will boot.
    Obviously all of this can be a little daunting and should not be taken on lightly. Having said that Windows is not currently installing and you've got nothing to lose. You can always go back to what you have now (with TM backups of course, and maybe even without).
    Good luck

  • Why is the "Free texture" not available to Photoshop Photography Plan subscribers?

    I have subscribed to the Adobe CC Photography Plan since August 2013.  Today I received an email from Adobe with the subject line "New Benefits Added to your Creative Cloud Photography Plan."  The email linked to a web page.  On that page, I clicked the link "Enter the Magical World of Trey Ratcliff."  On that page, there was a link "Free Adobe Photoshop CC texture" (http://inspire.adobe.com/2014/11/7/free_adobe_photoshop_cc_texture.html).  I decided to try the texture - Metal Texture 08 by Niklas K. Andersen.
    Using the Creative Cloud Desktop app on Windows, I found my way to the Market.  For you information, this was my first time using the Market feature.  When I attempted to add it to "My Library," I got the message
    "Market Assets are a Premium feature only available to 'CC Complete' and 'Single App' members"
    Two questions:
    as a subscriber to the CC Photography Plan, am I not a 'Single App' member?
    If the answer to (1) is no, then why doesn't Adobe make it clear that the "Free Texture" is only for premium subscribers?

    John T Smith
    @Jeffrey Tranberry
    Thanks for you answers (and for the link).

  • How to fill a JPanel with a texture from a image.

    Hello,
    I have a xxx.jpg file. I'd like to use this image to set the background texture of a JPanel.
    Can someone give me a piece of code to do that.
    Many thanks in advance
    Gege

    Since I haven't had no response, I have investigated more and finally solved my problem. Maybe it may help other people to have the answer.
    Here is the piece of code which works fine.
    import java.awt.*;
    import javax.swing.*;
    import java.awt.image.*;
    import javax.imageio.*; 
    public class TestTexture extends JPanel
        java.io.File filetexture    = new  java.io.File("mytexture.jpg");          
    public void paintComponent(Graphics g)
         super.paintComponent(g);
            Graphics2D g2 = (Graphics2D) g;
            if (g2==null)
                System.out.println("error");
                return;
            try
                 BufferedImage  mImage = ImageIO.read(filetexture);
                java.awt.geom.Rectangle2D tr = new   java.awt.geom.Rectangle2D.Double(0, 0, mImage.getWidth(), mImage.getHeight());
                TexturePaint tp = new TexturePaint(mImage, tr);
                     g2.setPaint(tp);
                    java.awt.geom.Rectangle2D  r =  (java.awt.geom.Rectangle2D)this.getBounds(); 
                     g2.fill(r);
       catch (java.io.IOException ex) {}
    }

  • Open gl texture error

    hi can any one help. I recently upgraded to cs4 still running my old nvidia gt8600. the open gl was working perfect for awhile, only probl. was my boris opengl plugins worn't supported. i did researched and found it was my nvidia driver so I updated it an cool all was working great. after about a week ae started crashing telling me that a texturewas to small to render, I have gone through every forum and cant fix this problem. Yes i need to get a decent video card but money is tight and this 1 was working.
    any suggestions please!!!!!!!!!!!!!!!!!!!!!!!!!! I need to finish a project
    thanks in advance

    What operating system are you on and what is it you are trying to do? "Texture too small" is more or less a transparency blending problem (see http://aeerrors.myleniumstuff.de/?p=750) or texture cropping problem, so it matters, what you are doing. comp preview res and size e.g. on text layers could be influential. The 8600 series should be just fine. While not exactly a precise comparison, the mobile version works just fien in my Macbook both under OSX and Vista, so something else must be the problem.
    Mylenium

  • How can I have users change textures in acrobat 3d and Reader question tia sal2

    I'm trying to have users in Acrobat reader change textures of a box which I made in acrobat 3d
    how can I do this?
    Example
    I made three textures for a box and I would like the user to have the ability to change the textures if they choose. How can I do this? Any examples?
    Can I have a user select the textures or the layers from a photoshop file in Acrobat 3d?
    Tia sal2

    Yo ratboy,
    You can do this. In order to map the images, they must be attached as a 3D resource. (There is a free plugin for this; search the forum for "Attach3DResource.api"). Once the images are attached, you can use the 3D Javascript API to map them to the meshes you desire.
    For one doc, I attached 25 images in this manner. I then used the script below to create a bunch of empty meshes, and then apply the images to said meshes.
    Hope this helps!
    //3D javascript ========================================
    //create 25 procedural meshes ======
    var leftEdge = -180;
    var horizontalOffset = leftEdge;
    var verticalOffset = 0;
    var myMesh = new Array();
    var myVector = new Array();
    for ( i=0; i<25; i++ ) { myMesh[i] = scene.createSquareMesh(64, 48, "myMesh" + i); myVector[i] = new Vector3( horizontalOffset, verticalOffset, 0 ); myMesh[i].transform.translateInPlace(myVector[i]); horizontalOffset += 74; if ( horizontalOffset > 180 )
    horizontalOffset = leftEdge;
    verticalOffset += 58;
    //create image array and resource objs ============
    var myImageResources = new Array();
    var myImageFiles = new Array("8d91.jpg",
    "ad2e.jpg",
    "barnpond.jpg",
    "Beach01.jpg",
    "Beach04.jpg",
    "Beach05.jpg",
    "Beach06.jpg",
    "Beach13.jpg",
    "bike trailer.jpg",
    "cobra.jpg",
    "cr80xr200.jpg",
    "craigs_place.jpg",
    "Dandrea.jpg",
    "dirtbike.jpg",
    "e027.jpg",
    "f5b5.jpg",
    "f613.jpg",
    "halfdome.jpg",
    "Iceberg.jpg",
    "island.jpg",
    "kx100_gb.jpg",
    "maui_horanhero.jpg",
    "norcal_ocean.jpg",
    "sierraLake.jpg",
    "Smokey Light.jpg",
    "test.txt");
    //create resource objs
    for ( i=0; i<25; i++ ) { myImageResources[i] = new Resource("pdf://" + myImageFiles[i]); }
    //load images on meshes with handler ============
    var myImageObjs = new Array();
    var myImageMats = new Array();
    myRenderer = new RenderEventHandler();
    myRenderer.onEvent = function(renderEvent)
    for ( i=0; i<25; i++ ) { //create image from resource myImageObjs[i] = new Image(myImageResources[i]); console.println("Image = " + i);
    //add image to model
    myImageMats[i] = myMesh[i].material;
    myImageMats[i].diffuseTexture.setImage(myImageObjs[i]);
    //remove handler
    runtime.removeEventHandler(myRenderer);
    runtime.addEventHandler(myRenderer);
    //cause a recalculation of the scenegraph.
    scene.update();
    console.println("Call scene.update()");
    console.println("Created 25 Square meshes: (64, 48, 'myMeshN')");

Maybe you are looking for

  • Pls Help. Sounds and ringtones wont open after software update

    Hi Im using BB  Bold 9700 and after I did the update to 5.0.0.862 I was unable to open the sounds and ringtones to change my SMS tonw, pls help I already rebooted my device and still unable to open that menu..

  • IOS 4.2.1 video feature removal?

    I have noticed that after upgrading to iOS 4.2.1, I am no longer able to play videos in the background (i.e. Play a video and then lock my iPhone, double tap the home button and then press play). This method had always allowed me to listen to the aud

  • How can check payment advice program

    How can check payment advice program, pls tell me the steps

  • Help, should I get xtreme audio or xtreme music?

    I want to get a sound card for my PC. Currently I am using an in built Realtek sound card. I need the sound card for the purposes of recording vocal performances using karaoke backing tracks connecting a karaoke player to a mixer (connected to a stud

  • Partial Update

    Does Toplink map to SQL for partial update? By "partial update", I mean updating a few attributes of an object. Do we have readObject first before updating? What's the performance cost of reading objects into Toplink cache? Thanks, Alex