How to optimize Java3D stuff when there is huge amount of objects

I am trying to make the visualization of thousands of objects in the 3D space. Each of them is dynamically added to the space when the data for it comes. And I need to manipulate each node by using mouse translate.
In practice, I found that the computer will be very slow when there are more than 2000 nodes(quadarray shapes with small texture). Is there any way to accelerate the speed and reduce the memory consumption?
Thanks a lot.

Have you looked at using LOD to minimize the amount of information that needs to be displayed? This came from the Java 3D example in the SDK:
*     @(#)LOD.java 1.13 02/10/21 13:44:04
* Copyright (c) 1996-2002 Sun Microsystems, Inc. All Rights Reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* - Redistributions of source code must retain the above copyright
*   notice, this list of conditions and the following disclaimer.
* - Redistribution in binary form must reproduce the above copyright
*   notice, this list of conditions and the following disclaimer in
*   the documentation and/or other materials provided with the
*   distribution.
* Neither the name of Sun Microsystems, Inc. or the names of
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* This software is provided "AS IS," without a warranty of any
* kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
* WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
* EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES
* SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN
* OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR
* FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* You acknowledge that Software is not designed,licensed or intended
* for use in the design, construction, operation or maintenance of
* any nuclear facility.
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
import com.sun.j3d.utils.applet.MainFrame;
import com.sun.j3d.utils.geometry.*;
import com.sun.j3d.utils.behaviors.vp.*;
import com.sun.j3d.utils.universe.*;
import javax.media.j3d.*;
import javax.vecmath.*;
public class LOD extends Applet {
    private SimpleUniverse u = null;
    public BranchGroup createSceneGraph() {
     // Create the root of the branch graph
     BranchGroup objRoot = new BranchGroup();
     createLights(objRoot);
     // Create the transform group node and initialize it to the
     // identity.  Enable the TRANSFORM_WRITE capability so that
     // our behavior code can modify it at runtime.  Add it to the
     // root of the subgraph.
     TransformGroup objTrans = new TransformGroup();
     objTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
     objTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
     objRoot.addChild(objTrans);
     // Create a switch to hold the different levels of detail
     Switch sw = new Switch(0);
     sw.setCapability(javax.media.j3d.Switch.ALLOW_SWITCH_READ);
     sw.setCapability(javax.media.j3d.Switch.ALLOW_SWITCH_WRITE);
     // Create several levels for the switch, with less detailed
     // spheres for the ones which will be used when the sphere is
     // further away
     sw.addChild(new Sphere(0.4f, Sphere.GENERATE_NORMALS, 40));
     sw.addChild(new Sphere(0.4f, Sphere.GENERATE_NORMALS, 20));
     sw.addChild(new Sphere(0.4f, Sphere.GENERATE_NORMALS, 10));
     sw.addChild(new Sphere(0.4f, Sphere.GENERATE_NORMALS, 3));
     // Add the switch to the main group
     objTrans.addChild(sw);
     BoundingSphere bounds =
         new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);
     // set up the DistanceLOD behavior
     float[] distances = new float[3];
     distances[0] = 5.0f;
     distances[1] = 10.0f;
     distances[2] = 25.0f;
     DistanceLOD lod = new DistanceLOD(distances);
     lod.addSwitch(sw);
     lod.setSchedulingBounds(bounds);
     objTrans.addChild(lod);
        // Have Java 3D perform optimizations on this scene graph.
        objRoot.compile();
     return objRoot;
    private void createLights(BranchGroup graphRoot) {
        // Create a bounds for the light source influence
        BoundingSphere bounds =
            new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);
        // Set up the global, ambient light
        Color3f alColor = new Color3f(0.2f, 0.2f, 0.2f);
        AmbientLight aLgt = new AmbientLight(alColor);
        aLgt.setInfluencingBounds(bounds);
        graphRoot.addChild(aLgt);
        // Set up the directional (infinite) light source
        Color3f lColor1 = new Color3f(0.9f, 0.9f, 0.9f);
        Vector3f lDir1  = new Vector3f(1.0f, 1.0f, -1.0f);
        DirectionalLight lgt1 = new DirectionalLight(lColor1, lDir1);
        lgt1.setInfluencingBounds(bounds);
        graphRoot.addChild(lgt1);
    public LOD() {
    public void init() {
     setLayout(new BorderLayout());
        GraphicsConfiguration config =
           SimpleUniverse.getPreferredConfiguration();
        Canvas3D c = new Canvas3D(config);
     add("Center", c);
     // Create a simple scene and attach it to the virtual universe
     BranchGroup scene = createSceneGraph();
     u = new SimpleUniverse(c);
     // only add zoom mouse behavior to viewingPlatform
     ViewingPlatform viewingPlatform = u.getViewingPlatform();
        // This will move the ViewPlatform back a bit so the
        // objects in the scene can be viewed.
     viewingPlatform.setNominalViewingTransform();
     // add orbit behavior to the ViewingPlatform, but disable rotate
     // and translate
     OrbitBehavior orbit = new OrbitBehavior(c,
                              OrbitBehavior.REVERSE_ZOOM |
                              OrbitBehavior.DISABLE_ROTATE |
                              OrbitBehavior.DISABLE_TRANSLATE);
     BoundingSphere bounds =
         new BoundingSphere(new Point3d(0.0, 0.0, 0.0), 100.0);
     orbit.setSchedulingBounds(bounds);
     viewingPlatform.setViewPlatformBehavior(orbit);
     u.addBranchGraph(scene);
    public void destroy() {
     u.cleanup();
    // The following allows LOD to be run as an application
    // as well as an applet
    public static void main(String[] args) {
     new MainFrame(new LOD(), 512, 512);
}

Similar Messages

  • How to find port number , when there will be different instance number ?

    In case of portal url,
    port number is 50000 for default instance number 00.
    how to find port number , when there will be different instance number , instead of 00?
    Thanks

    Hi
    You can find the port number by your instance number as follows:
    There is a general format for the port number like you have mentioned.
    For 00 instance the port number is 50000.
    The general format for the port number goes like this:
        <b>5<instance_no>00</b>
    If your <b>instance number is 01</b> then the port number would be <b>50100</b>.
    It depends on the installation type which you perform.
    You can also change the instance number during the installation but normally you dont do this.
    If you have many components or units installed on your system you may have more than one instance in that case it may go like this 00, 01, 02....accordingly port number will be 50000, 50100, 50200...resp.
    Hope this solves your doubt.
    If you need some more clarification please lemme know.
    Regards
      Sumit Jain
    **Rewrd with points if useful.

  • HT4009 I made a in app purchase on a game and it never took, when I went back and tried it again a window popped up that said I have already purchased this item but has not been downloaded yet? How do I download it when there is not a option to download?

    I made a in app purchase on a game and it never took, when I went back and tried it again a window popped up that said I have already purchased this item but has not been downloaded yet? How do I download it when there is not a option to download?

    Hi Dave_warr,
    I would suggest restarting the iPad and see if the download resumes.
    iTunes: How to resume interrupted iTunes Store downloads
    Resuming downloads from an iOS device
    From the Home screen, tap the iTunes icon.
    For iPhone/iPod touch, tap More > Downloads. For iPad, tap Downloads.
    Enter your account name and password.
    Click the "OK" button.
    Click the Resume or Resume All button to start the download.
    If you don't see the application to download it, then follow these troubleshooting steps:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    If the app does not appear in your list of purchases, then contact the iTunes Store for help:
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase
    I hope this information helps ....
    Have a great day!
    - Judy

  • How to block planned order when there is a credit block in sales order

    Hi Experts,
    Planned order should not be created when there is a credit block at sales order level. Can someone help me in solving this?
    Expecting for your valuable comments.
    Regards,
    JANA

    Go to t.code OVB8 and add routine 101 under routine column and routine 1 under system routine column and then create new document and test.
    Regards,

  • How to avoid InfoPackage hang when there is no data

    Hi,
    My infoPackage hang which block the process chain when there is no data.  I have set the Timeout time to a small value.  But, it did not work.
    Thanks,
    Frank

    Hi Frank,
    In the data load monitor > Menu Settings > Evaluation of requests (traffic lights) > what option is selected for "If no data is available in the system"...

  • How to backup a rootenv when there are subfolders with DBs?

    Hello,
    Is there any way to hotbackup a rootenv with databases when there are subfolders with databases?
    When I run a hotbackup (with db_hotbackup) on my rootenv, it only backups databases from the root of my rootenv. But, in that root directory, I have some subdirectories with databases too.
    Thank you.

    Hi,
    If you have root directory as : */your/root/dir*
    and within that you have folders like : */your/root/dir/sub1* and */your/root/dir/sub2* and would want to backup the db files in */your/backup/dir* then, you should invoke db_hotbackup as
    db_hotbackup -cv -b /your/backup/dir -h /your/root/dir -d ../dir/sub1 -d ../dir/sub2
    Regards,
    Debsubhra Roy

  • Why is there more then one of the same icon in launchpad? And how can i remove it when there is no "X"?

    In my launchpad there is:
    2 iDVD icons
    3 iMovie icons
    2 iPhoto icons
    2 Garageband icons
    When i press and hold one icon the start to "jiggle" but theres no "X" on them.
    How can i get all of them down to one???

    I can also confirm this issue with iDVD anyway.  I did a clean install of Lion and reinstalled iDVD from a retail iLife '08 DVD, then updated via software update.  I have two iDVD icons in launch pad but only 1 iDVD app in the applications folder.  Note that the version of iDVD I have is the latest, the same version that shipped with iLife '09 and later boxes of '11. 

  • How do I delete photos when there is no delete option?

    I accidentally synced another users iPhone to my computer.  Then when I next synced MY iPhone, all thier photos downloaded to my iPhone.The problem is there is no delete (trash can) icon on any of the other users photos.
    How do I delete these photos?

    Photos sync via iTunes can only be removed via iTunes sync.
    iTunes: Syncing photos
    Scroll down to the To delete synced photos and videos from your device section

  • How to call a BAPI when there are structure tables as Input.

    Environment: Data Services 3.1  SAP ECC 6.
    I can run simple BAPI's where I just populate the Input Parameters.
    My question is around more complex BAPI's.
    I created a data flow that looks like:
    Row Generation > Query > Unnest Query > Template table.
    Inside of the query I created a new Function and called the BAPI_PROJECT_MAINTAIN.
    This BAPI requires adding data as part of the Structure Tables in the BAPI.  I see these tables in the SAP Data Store and I also see a single input field in the Data Services Function Wizard that desribes the Structure.
    My question is - how do I populate the fields when it comes from a Structure Table in the BAPI?

    A table parameter is a schema, so you need an upfront query where you create that schema with the nested data. The schema is then mapped to the table parameter, the columns of the schema have to match by name.
    https://wiki.sdn.sap.com:443/wiki/display/BOBJ/Calling+RFCs-BAPIs

  • How do I combine libraries when there are 3 accounts?...

    Hi, I need help. I have an XP computer at home, and it has several accounts on it. 2 of them, however, are the ones that we use for itunes. one is an administrator account and one is for the kids. We want to move all of the songs into one library (particularly into the kid's account). How do we do that?
    PC   Windows XP  

    Hi, mandapanda5514.
    Have a look at this article in the Apple Knowledge Base.
    Scroll down to the Windows section when following the instructions, look to C:\Documents and Settings\All Users\Documents\My Music as "a publicly accessible location" for the Shared Music folder.

  • How to decrease timeout value when there is no response from BOE server?

    We are using BOE XI R2 .NET SDK to logon BOE XI R2 Server as below as well as using Infoview/CMC logon BOE:
    set boSessionManager = Server.CreateObject("CrystalEnterprise.SessionMgr")
    set boEnterpriseSession = boSessionManager.Logon(boUserID, boPassword, boCMS, boAuthType)
    There is no response for long time from BOE server after I excuting log on BOE using .NET SDK or Infoview/CMC App for more than one minute.
    So I want to timeout the logon atction after a certain time such as one minute if there is no response from BOE server.
    My question comes:
    1. What is the default timeout value for this operation?
        Where can I find it and how to modify it?
    2. I found ther are some registry keys on .NET APP Server:
        HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\Report Application Server\InprocServer\EnterpriseRequestTimeout
        HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\Report Application Server\Client SDK\CorbaAdapter\WaitReplyTimeout
    Are they for the action timeout I mentioned above? If not, what do they work for?
    It seems that WaitReplyTimeout is for report data retrieval timeout according to Kbase article 1199286 and which registry setting to change for long running reports, is it correct?
    Thanks for any response.
    Thanks,
    Sunny

    I don't think there is a setting available for this.  The timeouts you are looking at are essentially how long to wait for a report to process.
    My concern about trying to find a setting like this is that if you do get the client (aka SDK) to timeout after one minute, the CMS may still recieve this request shortly after and logon, creating a session that no longer has a handle to it and will then have to wait for it to timeout because of inactivity which would tie up a license.

  • How do I reset wifi when there is no renew lease dchp showing

    How do I renew lease dhcp when that tab is not showing in wifi settings. Wifi won't accept correct password

    You restore your iPad by plugging it into iTunes, letting it sync, and then clicking "Restore" on the right side of the iPad's summary pane.

  • How To Uninstall V-bates when there is no uninstall file?

    I have an annoying ad program called "V-bates", that when I try to uninstall the usual way, I get an error message that says there is no uninstall file, and that it can't be uninstalled. Please help.

    Can you supply a list of your installed Firefox extensions? (try using CTRL-SHIFT-A to view) 
    Is v-bates in the list? If so does it have a remove option?
    There is a very good chance that one of your other Firefox extensions has installed v-Bates. Just saw similar cases where both the Fasterfox and Calculator extensions install the Superfish Window Shopper add-on. Extension authors are paid to include these
    things.
    Sometimes the other extension will provide a setting in it's options to disable or remove things like Superfish or v-bates - although it will not explicitly mention either. Instead it will be a setting like "Compare prices and find similar products"
    If we can search through the list of your extensions we might be able to find the culprit.
    Alternatively, an anti-malware program has a higher chance of success in removing this than an anti-virus program. Try downloading, installing and scanning with free version of Malwarebytes Antimalware program :
    https://www.malwarebytes.org/

  • TS4268 Facetime...no icon in Settings, Contacts or anywhere else...how to I initiate Facetime when there is no icon?

    I got a new iPhone 4S...my wife got an iPhone 4S at the same time.  I set up one phone...no problem.  When I set up the second there is no Facetime icon anywhere...in settings, contacts, home...anywhere.  I have searched every place I can think on the phone.  I have read on line posts that all tell me to go to settings and enable facetime...NO FACETIME ICON!
    Help.
    Cheers.

    Settings > General > Restrictions
    Make sure that FaceTime is not blocked.
    Otherwise, restore the device as new.

  • How do you update software when there are multiple users with different (unknown) apple ID's?

    We are a college with different users borrowing 'loaner' Macbooks.
    several users with different ID's have installed software that is now tied to that Machines serial number, and cannot be updated or removed apparently. We are trying to update iPhoto for use with iBook author, but it was installed by an unknown user and cannot be removed.

    The only practical solution is to wipe and re-provision the units when they're returned.

Maybe you are looking for