![]() |
|
|||||||
| Development Help Help for building applications or diagnosing problems with WWJ |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#41 |
|
Member
Join Date: May 2009
Posts: 58
![]() |
Hi,
I've faced interesting problem with jaxb-collada/ardor3d in my application. My application is Eclipse-based and WWJ is intergrated with SWT GLCanvas (not SWT_AWT bridge). I've taken jaxb-collada and ardor3d-0.7. Standalone Test3D example works as expected, but as soon as I put Movable3DModel in my application it is broken: ![]() After some debugging I've located some code in ardor3d JoglTextureStateUtil. They enumerate texture units of GPU and store loaded texture ID for each of them. WWJ in turn uses GL_TEXTURE0 and GL_TEXTURE1 texture units (and maybe other). This leads to inconsistent state in both Ardor3D and WWJ. My first workaround was to force Ardor3D using texture units starting from GL_TEXTURE0+8. Anybody have some ideas what would be better solution and why simple example works? |
|
|
|
|
|
#42 |
|
Member
Join Date: May 2009
Posts: 58
![]() |
I also wonder why ArdorModelRenderer is singleton and it keeps single Node. Once model is loaded application won't be able to render other model.
Isn't it better to implement new class Ardor3DModel that keeps one Node inside. I'll attach my code later. |
|
|
|
|
|
#43 |
|
Code Monkey
Join Date: May 2008
Posts: 37
![]() |
brujito, your model corruption looks similar to what I ran into. I added GL_CLIENT_VERTEX_ARRAY_BIT to the list of things to push before/pop after rendering the model. It could be you're missing that or another of the states.
These threads may be useful: http://ardor3d.com/forums/viewtopic.php?f=10&t=1091 http://forum.worldwindcentral.com/sh...ighlight=ardor Regarding storing the node in an ArdorModelRenderer: Our ArdorModel class contains the node as you mention. If you used the example code at the start of this thread as a starting point- keep in mind it was very early proof of concept code and not really suitable for general consumption. |
|
|
|
|
|
#44 |
|
Worldwind Developer
Join Date: Jan 2006
Location: Hobart, Australia
Posts: 754
![]() |
Hi Mike,
I used the sample code in my model loader proof of concept. This is what brujito is using. The singleton is indeed not necessary/appropriate. Please submit a patch against the mercurial repository with your non-singleton suggestion. Make your clone and work from there: http://code.google.com/p/jaxb-collada/source/clones I will start taking pushes from people as soon as someone does one Be brave and PUSH.Cheers, whatnick.
__________________
Coding This and That in World Wind and helping new people out, as long as they don't pester too much. Currently blogging at: http://whatnicklife.blogspot.com Working at: Aerometrex - http://aerometrex.com.au/blog/ Impact so far: ![]() |
|
|
|
|
|
#45 |
|
Member
Join Date: May 2009
Posts: 58
![]() |
mike.emery, unfortunately that was not my case, pushing GL_CLIENT_VERTEX_ARRAY_BIT didn't help.
I also suggest one more imporvement: loading model in World Wind task service so WWJ won't freeze. My version is here: Code:
hg clone https://drykovanov-collada.googlecode.com/hg/ drykovanov-collada Last edited by brujito; 03-21-2011 at 01:51 PM. |
|
|
|
|
|
#46 |
|
Member
Join Date: May 2009
Posts: 58
![]() |
I've made test model in Google Sketchup. It has two rectangles, one with different textures on sides, other with different colors. I can't get it rendered correctly. I either get "hedghog" picture or wrong textures and colors.
I'd like to ask you to load this model and attach results in this thread. Please observe that first rectangle is with single texture on both sides and second is without color applied. |
|
|
|
|
|
#47 |
|
Worldwind Developer
Join Date: Jan 2006
Location: Hobart, Australia
Posts: 754
![]() |
Thanks for the help Brujito. Shouldn't the model class extend the existing model abstraction to reuse all the yaw,pitch etc. I will pull in your changes and add the extension. The Model base class possible needs to be refactored.
Cheers, whatnick.
__________________
Coding This and That in World Wind and helping new people out, as long as they don't pester too much. Currently blogging at: http://whatnicklife.blogspot.com Working at: Aerometrex - http://aerometrex.com.au/blog/ Impact so far: ![]() |
|
|
|
|
|
#48 |
|
Worldwind Developer
Join Date: Jan 2006
Location: Hobart, Australia
Posts: 754
![]() |
You are also missing the apache commons logging in extlib (my very non-standard dependency management setup). I have added it there for consistency.
Cheers, whatnick.
__________________
Coding This and That in World Wind and helping new people out, as long as they don't pester too much. Currently blogging at: http://whatnicklife.blogspot.com Working at: Aerometrex - http://aerometrex.com.au/blog/ Impact so far: ![]() |
|
|
|
|
|
#49 |
|
Worldwind Developer
Join Date: Jan 2006
Location: Hobart, Australia
Posts: 754
![]() |
I have tested your model and I have the same result as you. Can you attach the results of the expected render output. Does it render correctly in the standalone Ardor3D renderer ? Please attach a screenshot of what you expect to see. Ardor and WorldWind may be fighting over the texture units.
I have also added your model to the repo as a test case. Cheers, whatnick.
__________________
Coding This and That in World Wind and helping new people out, as long as they don't pester too much. Currently blogging at: http://whatnicklife.blogspot.com Working at: Aerometrex - http://aerometrex.com.au/blog/ Impact so far: ![]() |
|
|
|
|
|
#50 |
|
Member
Join Date: May 2009
Posts: 58
![]() |
what_nick,
I'm not very good with Maven and I work in Eclipse. Just forgot to add dependency. Stand-alone Ardor3D ColladaViewer has the same problem. Here is attached screenshot from Google Earth: |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| WorldWind Compiling Guide Without Visual Studio | rnielsen | Developers' Corner | 30 | 06-06-2011 02:55 PM |
| How to integrate Worldwind into a B/S system | javen | Development Help | 4 | 11-08-2010 01:51 PM |
| WorldWind rendering | mchristyuk | Development Help | 6 | 01-28-2009 08:28 PM |
| Reg compiling the source code | Raj | Developers' Corner | 10 | 08-26-2008 06:58 PM |
| Newbies guide to worldwind | Llynix | WorldWind General | 14 | 12-25-2004 01:55 PM |