Problem loading .obj

Hi all
I am trying to load model into java 3d but it gives me the following error
exception in thread "main" java.lang.OutOfMemoryError
can some one tell me how i can increase the memory stack for me to be abler to load models with large file size
thanks in advance.

http://www.javaperformancetuning.com/tips/

Similar Messages

  • Loading .obj and .mtl in Java, how I can do this?

    Well, I'm having problem with this, I'm doing my Course Conclusion Work related with augmented reality in java (JARToolKit) and I want to import models 3D in the format .obj, but I need to import it's materials too that is in the file .mtl. Anyone that already use this or do this if can help me I will be grateful, I need this and I trying everything, any help will be very good to me.
    Thanks,
    Jairo.

    Hi,
    the Java 3D API includes a utility for loading '.obj/.mtl'-files: com.sun.j3d.loaders.objectfile.ObjectFile.
    August

  • Loading Obj file with its .mtl

    Hai guys,
    I am new to java3D. I need to load the .obj which has the .mtl and the respective pics for its texture.(The .obj file .mtl and the relevant pics are all in the same folder) The Problem is obj file is being loaded but the output we got is no where near what we see in 3DMax. What is the problem?. Where i am going wrong.
    Thanks in Advance,
    Prakash Anandaraj. C

    D'Oh!
    First post, and already posted the wrong code...
    This is the right code, where I load the OBJ-Model:
    public void UseOBJModel(String path)
            ObjectFile loader = new ObjectFile();
            Shape3D shape = new Shape3D();
            try
                Scene tmpScene = loader.load(path);
                 Enumeration children = tmpScene.getSceneGroup().getAllChildren();
                 Shape3D tmp = (Shape3D)children.nextElement();
                 shape.setGeometry(tmp.getGeometry(),0);//This for killing the leading null in the GeometryList
                //Combining all Shape3Ds from the OBJ-Model into one single shape
                while(children.hasMoreElements())
                    tmp = (Shape3D)children.nextElement();
                     shape.addGeometry(tmp.getGeometry());      
                //TODO: Hard setting of Color for OBJ-Shape.Can be improved later
                Appearance objApp = new Appearance();
                Material objMat = new Material();
                ColoringAttributes col = new ColoringAttributes();
                objMat.setAmbientColor(new Color3f(.3f,.3f,.3f));
                objMat.setDiffuseColor(new Color3f(.5f,.5f,.5f));
                objMat.setSpecularColor(new Color3f(.6f,.6f,.6f));
                objMat.setLightingEnable(true);
                objApp.setMaterial(objMat);
                objApp.setColoringAttributes(col);
                col.setColor(.6f,.6f,.6f);
                shape.setAppearance(objApp);
                SetOriginalShape(shape);
            catch(FileNotFoundException e)
                System.err.println("Something went wrong while loading OBJ-File");
        }Sorry...

  • Loading OBJ-File BY COPY ?

    Hello!
    I want to load a 3D-Model in OBJ-Format in my Scene with the standard Objectloader com.sun.j3d.loaders.objectfile. This works basically well.
    But I need to get hold of the Vertices of the Model and their colors. And this is the Problem:
    -I try to get the Coordinates from the Shape3Ds GeometryArray with getCoordinate() and receive the following error:
    GeometryArray: cannot directly access data in BY_REFERENCE mode
    This is as I assume because the loader creates the Shape3D BY REFERENCE.
    Is there another loader or a trick, so that the GeometryArrays of my loaded OBJ-Models are set up as BY COPY?
    Code where I load my Model:
    public BranchGroup UseOBJModel_Old(String path)
            ObjectFile loader = new ObjectFile();
            BranchGroup bg = new BranchGroup();
            Shape3D shape = new Shape3D();
            try
                Scene tmpScene = loader.load(path);
                 Enumeration children = tmpScene.getSceneGroup().getAllChildren();
                //Combining all Shape3Ds from the OBJ-Model into one single shape
                while(children.hasMoreElements())
                     Shape3D tmp = (Shape3D)children.nextElement();
                     shape.addGeometry(tmp.getGeometry());      
                //TODO: Hard setting of Color for OBJ-Shape.Can be improved later
                Appearance objApp = new Appearance();
                Material objMat = new Material();
                ColoringAttributes col = new ColoringAttributes();
                objMat.setAmbientColor(new Color3f(.3f,.3f,.3f));
                objMat.setDiffuseColor(new Color3f(.5f,.5f,.5f));
                objMat.setSpecularColor(new Color3f(.6f,.6f,.6f));
                objMat.setLightingEnable(true);
                objApp.setMaterial(objMat);
                objApp.setColoringAttributes(col);
                col.setColor(.6f,.6f,.6f);
                shape.setAppearance(objApp);
                bg.addChild(shape);
                return bg;
            }Code where the Error occurs:
    for(int j = 0; j < originalArray.getValidVertexCount() / divisor; j++)//Calculate Points for LOD-Models
                for(int k = 0; k < divisor; k++ )
                   // This tells me that the Array is NOT in BY REFERENCE-Mode. Funny thing
                    System.out.println("By-Reference-Status: " + originalArray.getCapability(GeometryArray.BY_REFERENCE));
                   originalArray.getColor(index,col[k]);//Here's the Error
                   originalArray.getCoordinate(index++,pos[k]);//And here,too
            }Hope I could make it clear what my Problem is, as this is my first post here...
    Bye
    Chris

    D'Oh!
    First post, and already posted the wrong code...
    This is the right code, where I load the OBJ-Model:
    public void UseOBJModel(String path)
            ObjectFile loader = new ObjectFile();
            Shape3D shape = new Shape3D();
            try
                Scene tmpScene = loader.load(path);
                 Enumeration children = tmpScene.getSceneGroup().getAllChildren();
                 Shape3D tmp = (Shape3D)children.nextElement();
                 shape.setGeometry(tmp.getGeometry(),0);//This for killing the leading null in the GeometryList
                //Combining all Shape3Ds from the OBJ-Model into one single shape
                while(children.hasMoreElements())
                    tmp = (Shape3D)children.nextElement();
                     shape.addGeometry(tmp.getGeometry());      
                //TODO: Hard setting of Color for OBJ-Shape.Can be improved later
                Appearance objApp = new Appearance();
                Material objMat = new Material();
                ColoringAttributes col = new ColoringAttributes();
                objMat.setAmbientColor(new Color3f(.3f,.3f,.3f));
                objMat.setDiffuseColor(new Color3f(.5f,.5f,.5f));
                objMat.setSpecularColor(new Color3f(.6f,.6f,.6f));
                objMat.setLightingEnable(true);
                objApp.setMaterial(objMat);
                objApp.setColoringAttributes(col);
                col.setColor(.6f,.6f,.6f);
                shape.setAppearance(objApp);
                SetOriginalShape(shape);
            catch(FileNotFoundException e)
                System.err.println("Something went wrong while loading OBJ-File");
        }Sorry...

  • When I try to open contacts from the icloud control panel on my windows 7 PC, I get an error message: can't load contacts. There was a problem loading the application.

    When I try to open contacts from the icloud control panel on my windows 7 PC, I get an error message: can't load contacts. There was a problem loading the application.

  • Cannot directly open the browser from the icon. "problem loading webpage" and "timed out" are the messages. Access was accomplished by using yahoo messenger and opening my email. if I attempt to open a new page, I recieve the aforementioned warnings.

    no link to open access to the internet. I used Yahoo Messenger, clicked on the 'mail icon' and since Firefox is my default it opened and I was able to continue from there. If I try to click File, open New Page, I get the "problem loading webpage" and "connection timed out" messages

    changed my homepage to Yahoo. Now Firrefox works but still cannot access ANYTHING 'Google"!

  • I get problem loading page (error 404) it says the page cannot be found when i try to access the game Mobsters through my mysapce account and i cannot access it no longer through firefox and i want to find out why i cant, can you guys please help?

    i cant access my mobsters account through myspace. every time i try to access it i get "problem loading page" "this page cannot be found" "404 error" and it wont let me access it. myspace works fine but as soon as i click on the mobsters app i get the 404 error, this page cannot be found, problem loading page! can you please help?
    == This happened ==
    Every time Firefox opened
    == i try to access mobsters game through myspace

    I dont understand the answer
    '''''""The problem can be solved by opening FF and choosing Tools...Add On's...select the SEARCH addon and choose UNINSTALL...restart FF browser when asked, then reload Mobsters. This worked for me. The suggestion on the 404 that says to remove Search via Add/Remove Programs is completely BS, as Search doesnt show there. ""'''''

  • A lot of tabs loads and tells me there was a problem loading the page. How can I stop all the tabs loading because ist slows down Firefox.

    When I open Firefox, a lot of tabs try to open at the same time. They all say Problem loading the page. It happened after I tried to download a owners manual for Harley Davidson motor cycles. How can I stop all but one tab from opening.

    This can be a problem with the file [http://kb.mozillazine.org/sessionstore.js sessionstore.js] and sessionstore.bak in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder]
    Delete [http://kb.mozillazine.org/sessionstore.js sessionstore.js] and sessionstore.bak in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder]
    If you see files sessionstore-##.js with a number in the left part of the name like sessionstore-1.js then delete those as well.
    See:
    * http://kb.mozillazine.org/Session_Restore

  • Problem loading Query Designer Add-in

    Hi All,
    Can anyone please help me on my below issue.
    Whenever user is trying to start a new query in Essbase , he is getting below error message. It will not allow user to build a fresh Essbase pull
    Problem loading Query Designer Add-in. Workbook Activate,open & close operations may not be fully propogated
    Thanks in advance.
    Regards
    Vishal

    Hi Vishal,
    1) Try to remove the addin and then add again.(Before doing this close all the excel process from the task Manager)
    2) Check weather essexcln.xll and essxleqd.xla are corrupted.

  • Problem loading data into write optimized dso.....

    Hi ,
    I am having problem loading the data from PSA to write optimised DSO
    I have changed the normal DSO into a Write Optimised DSO. I have 2 data sources to be loaded into the write optimized DSO. One for Demand and one for Inventory.
    The loading of Demand data from PSA to DSO happens fine with out any error.
    Now while loading the Inventory data from PSA to DSO , i get the below errors
    "Data Structures were changed. Start Transaction before hand"
    Execption CX_RS_FAILED Logged
    I have tried reactivating the DSO, Transformation, DTP and tried to load the data again to the write optimised DSO, but no luck, I get the above error message always.
    Can some one please suggest me what could be done to avoid the above error messages and load the data successfully.
    Thanks in advance.

    Hi,
    Check the transformations is there any routines written.
    Check your Data struture of cube and DS as well.
    Is there any changes in structure.
    Data will load upto PSA normally, if is there any changes in struture of DSO, then the error may occur.just check it.
    Check the below blog:
    /people/martin.mouilpadeti/blog/2007/08/24/sap-netweaver-70-bi-new-datastore-write-optimized-dso
    Let us know status.........
    Reg
    Pra

  • TS3212 Is anyone else having problems loading the newest version of iTunes (10.6.3) on Windows?

    Is anyone having problems loading the newest version of iTunes (10.6.3) using Windows Vista? My current iTunes program version 10.6.1 keeps telling me there is an update but when I try to load it the information box goes away and nothing happens.  I have tried downloading the new version from Apple web site but it brings up a warning screen of " iTunes setup.exe is not commonly downloaded and could harm your computer." I select the action of run anyway and get the next error "iTunes Setup.exe is not a valid Win32 application."  What Gives?

    I select the action of run anyway and get the next error "iTunes Setup.exe is not a valid Win32 application."
    In the course of your troubleshooting to date have you worked through the following document?
    iTunes: Windows reports that "iTunesSetup.exe is not a valid Win32 application"

  • . I am new to IPods. I have a Classic 160GB and I can't figure out how to load my music videos to it. I have had no problem loading my music CD's but no go with the music videos I have. Please HELP. Thanks maxsdad

    Hello:
    I am new to IPods. I have a Classic 160GB and I can't figure out how to load Music Videos to iTunes or the IPod. I have had no problem loading my CD's to iTunes and to the IPod, but no go on the Music Videos.
    Please Help
    maxsdad

    B-Rock:
    Ok. Here's the results. I tried all the music videos I wanted to put onto the IPod and the results were:
    I was able to get good results with 2 full length music videos and 2 video singles(only 2 videos on each disk). For a total of 4 videos.
    I was able to encode 5 full length music videos, but the results were distorted (video and audio).
    I was unable to copy 2 full length videos due to error failures. 1 was a "No Title Found" error, the other was a "NAVDAT" error.
    I guess my next question is: Do you know of any other program(s) that I might try, to see if I can get good results with the videos that didn't work with Handbrake?
    Thanks again for all your help.
    maxsdad

  • "Problem with Trial - problem loading trial period for Adobe Photoshop CS3"

    Hello,
    I installed Photoshop CS3 Trial and whenever I run it and choose to begin my trial period I get the following error message:
    "Problem with Trial - problem loading trial period for Adobe Photoshop CS3".
    I tried uninstalling and reinstalling, and even ran the Adobe CS3Clean Script but nothing seems to help.
    I should note I never installed any earlier version of Photoshop on my system (I use a fresh copy of Windows XP with only a few programs installed).
    Any suggestions will be appreciated.
    Thanks,
    David

    i had the trial of photoshop on and the trial has run out my friend has given me a disk with adobe photoshop on and i cant do it beacause of the regestry code the photoshop puts in after the trial has ended to tell my pc that i cant have photoshop on my computer again :(:( now i have herd that you can remove the codes but it is quite hard well iam willing for this challenge and if anyone could help me i would reall welcome your help or if anybody has got the link to a tutorial to tell me hoe to do it i would aprecitae that to thank you all very much and post bak soon please

  • Latest version of Firefox is having problems loading sites, it tries to load to Google Analytics. No error messages, just a page that won't load. How do I stop this?

    Latest version of Firefox is having problems loading some sites, it tries to load and then gets taken over trying to load Google Analytics. No error messages, just a page that won't load. How do I get rid of this, it is a "pain in the neck"
    == URL of affected sites ==
    http://

    I just spent 3 days with this issue as well. I finally fixed it by reluctantly adding yet another add-on called ADBLOCK
    I was able to selectively block google-analytics. Now pages that weren't loading before are now loading.
    eg vimeo.com starbucks.com & other random sites.
    This was a tough one to fix because there is NO ERROR MESSAGE..page just shows it's loading...forever..& the bottom of my browser says 'waiting for google analytics'. I finally figured out google analytics is the culprit. Ironically, some help pages in trying to find a fix wouldn't load for me due to google analytics arghhh!
    Im on a macbookpro & Safari worked fine for these same sites. It was just Firefox. I nearly switched back to Safari because of this stupid issue.
    I'm wondering if this was caused by recent firefox 'updates'...

  • Cannot open grooveshark due to a supposed problem loading flash. (I have the latest version of both (Mozilla and Flash)

    Everything with firefox works ok except Grooveshark. An error message appears saying: We had problems loading flash, you might have any blocker etc etc.
    I don´t have any blocker and as a matter of fact i have the latest versions for both mozilla and flash. Neither version of flash test nor reinstallation process nor checking add ons or firewall settings solved my problem.
    Thanks for the attention. Regards

    To double-check your Flash permissions for the site, you can click the globe or padlock icon to the left of the address, click More Information, then click the Permissions tab. The "Activate Plugins" section would be the one to check.
    I understand you have checked your add-ons, but in case there is an unexpected interaction, could you test the page in Firefox's Safe Mode just to confirm that extensions are not the problem? That's a standard diagnostic tool to deactivate extensions and some advanced features of Firefox. More info: [[Troubleshoot Firefox issues using Safe Mode]].
    You can restart Firefox in Safe Mode using either:
    * "3-bar" menu button > "?" button > Restart with Add-ons Disabled
    * Help menu > Restart with Add-ons Disabled
    ''Not all add-ons are disabled: Flash and other plugins still run''
    After Firefox shuts down, a small dialog should appear. Click "Start in Safe Mode" (''not'' Reset).
    Any difference?

Maybe you are looking for

  • Download the Report content on to a shared directory

    Dear BI experts, We do not have Open Hub with us. We are now broadcasting our reports to our users email ID. However the users wants the report data to be saved (or downloaded) regularly (no maual intervention) on to a shared directory so that they c

  • Recent file list missing from taskbar icon

    Adobe product icons on the Windows 7 task bar (along the bottom of the screen) used to reveal, with a right click, a list of recently opened files for that program. Now, since upgrading to CS5, a right click shows only the program and the option to u

  • Inane website design

    1)Trying today to manage family base...keep getting kicked out of full website back to mobile.  2) Why cant you do this from mobile? 3) Website says i am logged in....then asks me for username and pw BOTH all over again...why both if it says im logge

  • Legit email to verify Apple ID?

    Just received this email. Is it legit? I haven't tried to do anything over iTunes or purchase any apps or music for a long time, so I don't know why I have it. My Apple ID has obviously worked to allow me to post on this forum, so I don't know how le

  • Starting the integrated weblogic server instance

    When I tried to invoke a servlet I got the following message. **** Using port 7101 **** C:\Users\redmohan\AppData\Roaming\JDeveloper\system11.1.1.3.37.56.60\DefaultDomain\bin\startWebLogic.cmd *[waiting for the server to complete its initialization..