Yes, put it into the Background() object.  Load up your geometry in one or
more PointArray objects, then add it to the tree as a Background object.

Here's a snippit of code.  You also might be interested in how I changed the
brightness of the stars with color.


  private BranchGroup createContent()
  {
    BranchGroup objRoot = new BranchGroup();
    Background background = new Background();
    background.setApplicationBounds(bounds);
    background.setGeometry(createBackGraph());
    objRoot.addChild(background);

    return objRoot;
  }

  public BranchGroup createBackGraph()
  {
    // Create the root of the branch graph
    BranchGroup objBack = new BranchGroup();

    PointArray orion = new PointArray(10, PointArray.COORDINATES |
PointArray.COLOR_3);
    orion.setCoordinate( 0, new Point3f(0.978330f, -0.033900f, 0.204426f));
    orion.setCoordinate( 1, new Point3f(0.968007f, -0.167860f, 0.186506f));
    orion.setCoordinate( 2, new Point3f(0.981477f, -0.142660f, 0.127873f));
    orion.setCoordinate( 3, new Point3f(0.983764f, -0.005220f, 0.179391f));
    orion.setCoordinate( 4, new Point3f(0.981112f,  0.110597f, 0.158705f));
    orion.setCoordinate( 5, new Point3f(0.967377f,  0.172516f, 0.185523f));
    orion.setCoordinate( 6, new Point3f(0.961385f,  0.128845f, 0.243183f));
    orion.setCoordinate( 7, new Point3f(0.978330f, -0.033900f, 0.204426f));
    orion.setCoordinate( 8, new Point3f(0.981293f, -0.020980f, 0.191375f));
    orion.setCoordinate( 9, new Point3f(0.983764f, -0.005220f, 0.179391f));
    orion.setColor(0, new Color3f(1.0f, 1.0f, 1.0f));
    orion.setColor(1, new Color3f(0.9f, 0.9f, 0.9f));
    orion.setColor(2, new Color3f(0.8f, 0.8f, 0.8f));
    orion.setColor(3, new Color3f(0.7f, 0.7f, 0.7f));
    orion.setColor(4, new Color3f(0.6f, 0.6f, 0.6f));
    orion.setColor(5, new Color3f(0.5f, 0.5f, 0.5f));
    orion.setColor(6, new Color3f(0.4f, 0.4f, 0.4f));
    orion.setColor(7, new Color3f(0.3f, 0.3f, 0.3f));
    orion.setColor(8, new Color3f(0.2f, 0.2f, 0.2f));
    orion.setColor(9, new Color3f(0.1f, 0.1f, 0.1f));
    objRoot.addChild(new Shape3D(orion));

    objBack.compile();
    return objBack;
  }


----- Original Message -----
From: "Christian Bartel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 25, 2001 2:05 AM
Subject: Re: [JAVA3D] Rand / Stars dissappear in the distance


> Hi Artur!
>
> > There is something called far clipping plane. You do not see objects
> > behind this. I think that you should put everything into
> > background node
> > and stay with small coordinates.
>
> How exactly "put in background node"? You mean, I should realize the
> star-background via an image on background geometry? This was what I tried
> first, but this was way to slow... Did I get you right?
>
> Christian
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff JAVA3D-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to