How to create a textured background

Hi,
I am very new to Java3D and I need help on how to create a textured background instead of using plain colors. I want to use a jpeg file for the background. Could anyone tell me a sample algorithm that will load this jpeg file and then set it up as the Scene's background?
Thank you,
Rubydium.

What you want to do is create a background node and add an object textured on the inside. Here is a bit of sample code:
BranchGroup bgGeometry = new BranchGroup();
Appearance App = new Appearance();
try {
   Texture tex = new TextureLoader(new java.net.URL(filePath+"yourTexture.jpg"), this).getTexture();
   App.setTexture(tex);
catch (Exception e)
    e.printStackTrace();
Sphere outerWorld = new Sphere( 1.0f, Primitive.GENERATE_TEXTURE_COORDS | Primitive.GENERATE_NORMALS_INWARD, App);
bgGeometry.addChild(outerWorld); As you can probably tell, this is just creating a new BranchGroup and appearance and populating it with a sphere that displays it's appearance inwards.
Background bg = new Background();
bg.setApplicationBounds(bounds);
bg.setGeometry(bgGeometry);
objRoot.addChild(bg);

Similar Messages

  • How To Create A Website Background Video In Adobe Edge ?

    Hello,
    I have video file in my computer SSD drive and i want it to play as background on my web page (page that i am creating).I did try to follow this video:
    How To Create A Website Background Video In Adobe Edge Animate Using Edgehero - YouTube
    but i cant follow 100% what he is doing.
    Guide that i did try to follow is at this link: How To Create A Website Background Video In Adobe Edge Animate Using Edgehero - YouTube
    Steps i do in Adobe Edge Animate CC
    1.) Create New
    2.) i click + sign under section Library >> Scripts >> Add JS File from URL...
    URL that i am adding is: http://www.edgehero.com/edgehero.js/1.2/edgehero_1.2_min.js  (URL is taken from site: Edgehero.js )
    I add this link: http://www.edgehero.com/edgehero.js/1.2/edgehero_1.2_min.js to box that occures after i click on Add JS File from URL
    3.) I go to Edgehero.js and from there i scrol down to section named as Media - Html5 video / Html5 audio
    and i select from there this:
    there is a code:
      // this will set the video as background of the div/rectangle
    backgroundvideo_1 ='movie.mp4';
      // put new edgehero.js variables here
    4.) I go to Adobe Edge Animate CC 2014 and right click on project and select Open Actions for "Stage"
    and then i click on + sign and select creationComplete
    This will open Stage window
    there i will copy this code:
      // this will set the video as background of the div/rectangle
    backgroundvideo_1 ='movie.mp4';
      // put new edgehero.js variables here
    5.) Then i click on ++ sign under library >> Video
    and i add video from my computer SSD drive.
    Video is named as video3.mp4
    Now i eddit the code in Stage window (See above)
    code will look after editing like this:
    Then i change under left side px to %
    6.) Then i copy backgroundvideo_1 from Stage Code:
    Then i select Rectangle Tool and mark the area  (white box) and i click on small C icon
    And the box that occures i type there backgroundvideo_1_mp4 autoplay
    now when i use ctrl and enter i only get gray box that does not play video.
    What am i doing wrong?

    Here is the html file.
    Note video file that i try to add is random training video from youtube, And file format is saved using this site:
    How do I download and save a YouTube video to my computer?
    this is only for testing as i am not gonna put that video on background to my web page. I am only trying to understand how to add video as background.
    http://www.filedropper.com/test3_5
    http://www.filedropper.com/test3_6
    http://www.filedropper.com/test3edge
    http://www.filedropper.com/test3edgeactions
    http://www.filedropper.com/test3edgepreload
    Goal is to create background video like u can see here:
    Adobe Muse Tutorial - Responsive Design Hack! by MuseThemes.com - YouTube
    Similar possibility is available also in Edge as i understand?

  • How to create a transport background for an applet ?

    HI can any one tell me the solution for this ...
    How to create a transport background for an applet ?
    please help
    -seenu_ch

    what does it mean to have a transparent background to an applet? transparent means you can "look through" it.
    What do you want to "look thorough" an applet.
    Sorry, I am still not understanding :(
    Please let me know what this means.
    regards,
    Sangeetha

  • How to create grid texture in Photoshop?

    How to create grid texture in Photoshop?

    Christoph points out a very good method for creating your own grid pattern.
    There is one already provided that may be sufficient.  Choose Edit - Fill - Pattern, load the standard Patterns set, and choosing the grid pattern Tiles-Smooth from the provided Patterns...
    -Noel

  • How to create Tortoise texture - Sunglasses style

    Hello guys,
    this is my first post
    I am getting crazy figuring out how to create with photoshop a texture like these sunglasses:
    http://aqquim.com/collections/retrosuperfuture/products/super-ciccio-vintage-havana
    http://aqquim.com/collections/retrosuperfuture/products/super-classic-puma
    I need it in order to print on  plexiglass pannel for my room.
    Can you guys recommend me a tutorial? I would like to learn.
    Thank you advance.

    Thanks a lot for the tutorials
    In the specific i am looking for something like this... this so cool?

  • How to create noise texture - Illustrator Tips

    Hello. I saw this piece of art on one of the Illustrator tips & techniques section, and was wondering if someone knew how to create this "noise" texture in Illustrator?
    What I've had to do in the past to get a similar effect was to complete my illustration in Illustrator, then bring that artwork into Photoshop and paint over the desired areas... but this looks a lot nicer than the results I've gotten. If this can be done in vector, that would be another plus!
    Does anyone have any insight they could share on this?
    Thank you!

    You are welcome.
    The site of which that tutorial is a part (HERE) has a lot of good tutorials, including a few more about adding texture in Illustrator.
    --OB

  • How to create a Faded background

    I'm using Fireworks CS3.
    I have created a new canvas and saved it as a .png. I now want to create a faded background. So I select the gradient tool and define the details of the color, etc BUT when I mouseover the canvas I get a circle with a slash through it pointer and I'm unable to apply the gradient.
    What do I need to do with a new canvas before i can start applying the gradient tool to it?
    Thank you kindly!

    The canvas is just that - a canvas. You need to draw a rectangle shape on the canvas using the vector tools, and use the gradient on the rectangle.
    Jim Babbage

  • How to create this texture in photoshop? See image.

    I'm trying to replicate this background texture in Adobe Photoshop CS5. Can anyone give me a few pointers as to how this will work? I'll give you an update with any suggestions provided. Thanks

    alohaDees wrote:
    When I tried getting help the first time, I uploaded the image via URL instead of Desktop, thus creating a link that pointed towards the picture. Instead of accusing new users of spamming, you should try welcoming them instead.
    I posted a comment in the thread saying it looked to me like spam, but I didn't report it, so a forum admin must have spotted it and thought the same.  Since you are posting under a new user name I assume they disabled your first user account as well.  Even if unintentionally, you posted a linked advertisement (= spam), so you needn't be surprised or offended at the reaction. The thing is to avoid doing that in the future. Welcome and good luck! 

  • How to Create a Texture in Muse

    Is there a way to create or get a texture for a solid color in muse?  My goal is to fill a box with a texture similar to the ones below. Thanks in advance.

    I was hoping someone would reply with an answer, as I would really like to have this functionality. My guess is that it is not possible at this time.
    In the past, I've used Fireworks to design the components of my websites, and you could fill shapes with textures. But I have to remember that Muse is not an image editor like Fireworks or Photoshop and if I want something more complex than a solid color fill or gradient, I have to build it outside of Muse and import it.
    - Bob

  • How to create this texture?

    this is a common texute I've seen around, but I am not very familar with the filters in photoshop/illustrator, can any boday help me to finally figure this out?
    Thanks in advance!

    Gary, if you look closely, you can see a fine dot pattern overlaying the image, and that would probably be better described as a texture than the cartoon like reduced colour bit depth.
    You can add the fine dots using Filter > Sketch > Half tone.  Add a new layer above the graphic, and fill with 50% grey.  Apply the Halftone filter to it, and set its blend mode to Overlay.  It's the same method as non destructive dodge and burn, or course, but it works very nicely for adding noise, or texture non-destructively.  You can edit the texture layer directly, or do a non-destructive edit to your non-destructive texture, by clipping a levels or curves adjustment layer to it. 

  • How can I create a single background image for a BorderLayout?

    I can create a background with an image file for the individual panel (North, West, Center, East and South) in a BorderLayout, but I've been spinning my wheel for a long while now trying to figure out how to create just one background with a single image file for all of these panels?
    In my application, a panel may contain various buttons, a listbox, a group of checkboxes, a combo box, or a canvas. Even if I used the same image file, when the panels are finally put together, one can clearly see that the end product is the result of a lot of patch works.
    Hope someone has an answer for this. BTW, I'm using AWT because it works with existing browsers without the need for a separate Java plug-in.
    Regards,
    V.V.

    Look at this :
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.awt.image.BufferedImage;
    public class PanI extends Frame
         Image map;
         Panel pan;
         myPan p8,p4,p6,p2,p5;
         BufferedImage I;
    public PanI() 
         addWindowListener(new WindowAdapter()
        {     public void windowClosing(WindowEvent ev)
              {     dispose();
                   System.exit(0);}});
         map = getToolkit().getImage("map2.gif");
         MediaTracker tracker = new MediaTracker(this);
         tracker.addImage(map,0);
         try   {tracker.waitForID(0);}
         catch (InterruptedException e){}
         I = new BufferedImage(1,1,BufferedImage.TYPE_INT_ARGB);
         setBounds(10,10,map.getWidth(null)+8,map.getHeight(null)+27);
         setLayout(new BorderLayout());
         pan = new Panel();
         add(pan,BorderLayout.CENTER);
         pan.setLayout(new BorderLayout());
         pan.setSize(map.getWidth(null),map.getHeight(null));
         p5 = new myPan(5);
         p5.setBackground(Color.red);
         pan.add(p5,BorderLayout.CENTER);
         p8 = new myPan(8);
         p8.setBackground(Color.orange);
         pan.add(p8,BorderLayout.NORTH);
         p4 = new myPan(4);
         p4.setBackground(Color.blue);
         pan.add(p4,BorderLayout.WEST);
         p6 = new myPan(6);
         p6.setBackground(Color.green);
         pan.add(p6,BorderLayout.EAST);
         p2 = new myPan(2);
         p2.setBackground(Color.pink);
         pan.add(p2,BorderLayout.SOUTH);
         setVisible(true);
    public class myPan extends Panel
         int where;
    public myPan(int i)
         super();
         where = i;
    public void paint(Graphics g)
         if (I.getWidth(null) != pan.getWidth() || I.getHeight(null) != pan.getHeight())
              I = new BufferedImage(pan.getWidth(),pan.getHeight(),BufferedImage.TYPE_INT_ARGB);
              Graphics      G = I.getGraphics();
              G.drawImage(map,0,0,pan.getWidth(),pan.getHeight(),null);     
              G.dispose();
         int x1=0;
         int x2=getWidth();
         int y1=0;
         int y2=getHeight();
         if (where == 8)
         if (where == 2)
              y1 =  p8.getHeight()+p5.getHeight();
              y2 =  getHeight()+y1;
         if (where == 4)
              y1 =  p8.getHeight();
              y2 =  y1+getHeight();
         if (where == 5)
              x1 =  p4.getWidth();
              x2 =  x1+getWidth();
              y1 =  p8.getHeight();
              y2 =  y1+getHeight();
         if (where == 6)
              x1 =  p4.getWidth()+p5.getWidth();;
              x2 =  x1+getWidth();
              y1 =  p8.getHeight();
              y2 =  y1+getHeight();
         g.drawImage(I,0,0,getWidth(),getHeight(),x1,y1,x2,y2,null);
    public void update(Graphics g)
         paint(g);
    public static void main (String[] args) 
         new PanI();
    Noah

  • How to create the perfect gradient in motion

    Hi does anyone know how to create a gradient background in motion without it banding in the final movie ?
    Paul

    Hillster wrote:
    What is Floating Point?
    Floating point math. Open your project properties (CMD+J) and change the bit depth to 16 or 32 bit float. It'll cause a tremendous slowdown of playback, but presumably you should just be able to leave it off until you're ready to export.
    Also, use the best compression you can afford to. Uncompressed, Animation (maybe), or even a TIFF sequence. The less you're compressing the file, the better it'll look.
    Andy

  • Create a unique background?

    Hi there,
    I'm working with RoboHelp HTML 8 and I'm trying to create a unique background for the first page that opens in my help file. I was hoping to include a watermark of our company logo. But I don't want this logo to display for the rest of the pages of the help file. After looking through Adobe' help, it looks like you can maybe do this by creating master pages. The steps seems kind of confusing or maybe I'm just misunderstanding the purpose of master pages. Either way, is someone aware of how to create a unique background that can be linked to one topic only?
    Thanks!

    Hi all
    Just to expound on Willam's comments a tad.
    W. van Weelden wrote:
    A masterpage is a template. You add a style sheet, certain standard text, a header and a footer. You control the headers and footers for all pages related to the masterpage from that masterpage. A new page based on the masterpage also uses the same style sheet as the masterpage and has the standard text.
    With RoboHelp 8 (this version introduces Master Pages that replace Topic Templates) you also have other capabilities that you may not realize. You are also able to insert PlaceHolders. Mini-TOC and Breadcrumbs. The placeholders don't necessarily have to be restricted to the Body, Header or Footer.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • How to create a background textures

    Hello,
    Are there classes in any package to create colored textures for background swing components ?
    If so, thanks to point me to URLs or samples.

    The basic packages for drawing 2D graphics are found in "java.awt.*", and for your specific needs you need the various implementations of the Paint interface, ie GradientPaint, TexturePaint, etc.
    See: http://java.sun.com/javase/6/docs/api/java/awt/Paint.html
    To paint various graphics you need a JPanel and then you need to override the "paintComponent(Graphics g)" method and do your own custom painting.
    More reading: http://www.apl.jhu.edu/~hall/java/Java2D-Tutorial.html#Java2D-Tutorial-Shapes
    ICE

  • How to create a blank theme with no embedded textures?

    Hi,
    I have created a custom theme based on the "White" theme thinking that it was truly blank. But when I save my new theme, I see that it weighs a hefty 11Mb.
    After looking in the package contents, I see that there are marble textures remaining from the White theme. These are used on the default charts.
    I tried creating new default charts that contain none of the textures but they are still saved with the template. I cannot delete these files directly in the package because I get a "Missing File" error when using the theme. Unchecking "Copy theme images into document" in the preferences doesn't change anything.
    My question is: how do you create a truly empty theme with no textures nor images embedded in the package?
    Many thanks for any ideas.
    e)
    Dual 1 Ghz Power Mac G4   Mac OS X (10.4.6)  

    egoes, if you haven't already, you might consult the Keynote User Guide, page 181. The guide talks about how to create new themes, and how to define default chart styles for those themes. The instructions are unfortunately not terribly clear, but it appears that you have to create default charts for each chart type. (I would imagine that the new theme would use old defaults for any charts that aren't newly defined, which would leave in the textures you want to eliminate.)
    If you have no luck following the User Guide directions, and size is important, you might instead start with a smaller theme as your base (e.g., Pinstripe is only 3.1MB, and the default graph fill is a colour fill, not a texture). From this you can strip out the background and other graphics you don't want. With just a blank Master with the background removed, this theme is only 612KB. This is likely the easiest way to produce what you want.
    PowerMac G5   Mac OS X (10.4.4)  

Maybe you are looking for

  • How many times can I install Logic Pro?

    I need to re-install Logic Pro 8 on my computer but I hear there is a limit to how many times you can do so. Anybody know what the limit is?

  • Error while installing Oracle 9.0.1 on Linux Red Hat.

    I am trying to install Oracle 9.0.1 on Linux Red Hat (Enterprise Edt), and getting this long error--- "Initializing Java Virtual Machine From /tmp/OraInstall0/jre/bin/jre. Please wait... :symbol errno. version GLIBC-2.0 not defined in gile libc.so.6

  • HP LaserJet Pro MFP M521dn - won't install scanner

    When I install the HP LaserJet Pro MFP M521dn, it installs to my mac desktop running Yosemite only as a printer.  None of the scanning functions are accessible and it doesn't show up when HP Scan or Image capture are opened.  In system preferences, i

  • Virtual Domain Controllers in 2012 Failover Cluster. Time Skew

    Hi All, Not sure if this is the correct space for this topic, however i'll give it a go anyway. We have a 2 Hosts (HP DL385) Windows Server 2012 Failover Cluster. Storage is provided by a 12 Bay NAS with iSCSI connections (This is catering for CSV's

  • Error: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request

    Hi Gurus, i am hardly fighting with this error in Communication Channel Monitoring: Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/HTML;