Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (497)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  problem with Xith to Collada XML  (Read 2690 times)
0 Members and 1 Guest are viewing this topic.
Offline khangharoth

Junior Member




There is more to life than JAVA...But Java Rocks


« Posted 2006-07-18 08:35:49 »

Hi i am using  Collada  DaeSaver class
       
1  
DaeSaver.save(CurrentContext.sceneBase,"C:\\scene.xml");

   but am getting exception which am not able to deciper
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
 java.io.IOException
     at org.xith3d.loaders.dae.whoola.misc.JaxbCoder.encode(JaxbCoder.java:85)
     at org.xith3d.loaders.dae.whoola.collada.ColladaSaver.toString(ColladaSaver.java:98)
     at org.xith3d.loaders.dae.whoola.DaeSaver.toString(DaeSaver.java:116)
     at org.xith3d.loaders.dae.whoola.DaeSaver.println(DaeSaver.java:82)
     at org.xith3d.loaders.dae.whoola.DaeSaver.println(DaeSaver.java:66)
     at com.ayaam.applicationFramework.gui.controller.toolBarControllers.StandToolBarController.dispatchMethodCalls(Unknown Source)
     at com.ayaam.applicationFramework.gui.controller.toolBarControllers.ToolBarsController.dispToRespBarContr(Unknown Source)
     at com.ayaam.applicationFramework.gui.stateMgmt.UiStateManager.run(Unknown Source)
     at java.lang.Thread.run(Thread.java:595)
 Caused by: javax.xml.bind.ValidationException
  - with linked exception:
 [com.sun.xml.bind.serializer.AbortSerializationException: a required field "InstanceEffect" is missing an object]
     at org.collada._2005._11.colladaschema.impl.runtime.ValidatorImpl.validate(Unknown Source)
     at org.collada._2005._11.colladaschema.impl.runtime.ValidatorImpl.validateRoot(Unknown Source)
     at org.xith3d.loaders.dae.whoola.misc.JaxbCoder.encode(JaxbCoder.java:74)
     ... 8 more
 java.io.IOException
     at org.xith3d.loaders.dae.whoola.misc.JaxbCoder.encode(JaxbCoder.java:85)
     at org.xith3d.loaders.dae.whoola.collada.ColladaSaver.toString(ColladaSaver.java:98)
     at org.xith3d.loaders.dae.whoola.DaeSaver.toString(DaeSaver.java:116)
     at org.xith3d.loaders.dae.whoola.DaeSaver.println(DaeSaver.java:82)
     at org.xith3d.loaders.dae.whoola.DaeSaver.println(DaeSaver.java:66)
     at com.ayaam.applicationFramework.gui.controller.toolBarControllers.StandToolBarController.dispatchMethodCalls(Unknown Source)
     at com.ayaam.applicationFramework.gui.controller.toolBarControllers.ToolBarsController.dispToRespBarContr(Unknown Source)
     at com.ayaam.applicationFramework.gui.stateMgmt.UiStateManager.run(Unknown Source)
     at java.lang.Thread.run(Thread.java:595)
 Caused by: javax.xml.bind.ValidationException
  - with linked exception:
 [com.sun.xml.bind.serializer.AbortSerializationException: a required field "InstanceEffect" is missing an object]
     at org.collada._2005._11.colladaschema.impl.runtime.ValidatorImpl.validate(Unknown Source)
     at org.collada._2005._11.colladaschema.impl.runtime.ValidatorImpl.validateRoot(Unknown Source)
     at org.xith3d.loaders.dae.whoola.misc.JaxbCoder.encode(JaxbCoder.java:74)
     ... 8 more
 java.io.IOException
     at org.xith3d.loaders.dae.whoola.misc.JaxbCoder.encode(JaxbCoder.java:85)
     at org.xith3d.loaders.dae.whoola.collada.ColladaSaver.toString(ColladaSaver.java:98)
     at org.xith3d.loaders.dae.whoola.DaeSaver.toString(DaeSaver.java:116)


Croft you have any idea about this ..what am i doing wrong

Offline croft

Junior Member




Java, Java, Java


« Reply #1 - Posted 2006-07-18 11:03:11 »

Croft you have any idea about this ..what am i doing wrong

Yes, the key line is this:
 [com.sun.xml.bind.serializer.AbortSerializationException: a required field "InstanceEffect" is missing an object]

Look for a missing "instance_effect" element, probably in one of your "material" elements.

I figured out how to make the XML validator tell which line the error is on.  If enough people keep having this problem, I will implement as part of the error reporting.

David Wallace Croft / www.CroftSoft.com / (214) 636-3790 m / Advanced Java Game Programming
Offline khangharoth

Junior Member




There is more to life than JAVA...But Java Rocks


« Reply #2 - Posted 2006-07-18 11:46:07 »

hmmm..ok will look into it ....thanks for the help  Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline khangharoth

Junior Member




There is more to life than JAVA...But Java Rocks


« Reply #3 - Posted 2006-07-18 15:22:59 »

Hi Croft
  from where can i get  whoola_collada_jaxb.jar code   Undecided 
      baiscally i want code for   org.collada._2005._11.colladaschema  package to debug ,
     as i am not getting whats the problem for  required field "InstanceEffect" is missing an object]

Offline croft

Junior Member




Java, Java, Java


« Reply #4 - Posted 2006-07-19 06:27:22 »

Hi Croft
  from where can i get  whoola_collada_jaxb.jar code   Undecided 
      baiscally i want code for   org.collada._2005._11.colladaschema  package to debug ,
     as i am not getting whats the problem for  required field "InstanceEffect" is missing an object]

It is created by the JAXB compiler based on the XML schema.  You probably want to look at the COLLADA XML schema instead.  You can get to it from www.COLLADA.org.

David Wallace Croft / www.CroftSoft.com / (214) 636-3790 m / Advanced Java Game Programming
Offline khangharoth

Junior Member




There is more to life than JAVA...But Java Rocks


« Reply #5 - Posted 2006-07-19 08:27:07 »

Yaa ..you are right , I have managed it to get working but not convincingly , have to look at source code properly.
                            Its ignoring many classes like Background and also Groups , will look on that too.
               Thanks for the help and it was really very easy to use  Smiley
 

Offline croft

Junior Member




Java, Java, Java


« Reply #6 - Posted 2006-07-19 10:11:17 »

Yaa ..you are right , I have managed it to get working but not convincingly , have to look at source code properly.
                            Its ignoring many classes like Background and also Groups , will look on that too.

COLLADA does not have a background node so I convert it into an "extra" node:
http://earth.whoola.com:8080/javadoc/xith-tk/src-html/org/xith3d/loaders/dae/whoola/DaeExporter.html#line.1260

BranchGroup and TransformGroup should be supported but other types of Group such as OrderedGroup are not yet implemented.  If you need it, let me know.

David Wallace Croft / www.CroftSoft.com / (214) 636-3790 m / Advanced Java Game Programming
Offline croft

Junior Member




Java, Java, Java


« Reply #7 - Posted 2006-07-19 10:23:35 »

COLLADA does not have a background node so I convert it into an "extra" node:
http://earth.whoola.com:8080/javadoc/xith-tk/src-html/org/xith3d/loaders/dae/whoola/DaeExporter.html#line.1260

Oops.  I see it might be disabled:
http://earth.whoola.com:8080/javadoc/xith-tk/src-html/org/xith3d/loaders/dae/whoola/DaeExporter.html#line.1296

I think I was planning to fix it when I upgraded to JAXB 2.

David Wallace Croft / www.CroftSoft.com / (214) 636-3790 m / Advanced Java Game Programming
Offline khangharoth

Junior Member




There is more to life than JAVA...But Java Rocks


« Reply #8 - Posted 2006-07-20 09:35:13 »

Hi Croft ,
               How is the scalablity of collada , i mean if my Scene is very big than i think writing it to XML file can be very time consuming ,havent tried it though but i feel that this approach may not scale .have you tried with big scene where number of Vertices being rendered are very high .

Offline croft

Junior Member




Java, Java, Java


« Reply #9 - Posted 2006-07-20 18:07:23 »

               How is the scalablity of collada , i mean if my Scene is very big than i think writing it to XML file can be very time consuming ,havent tried it though but i feel that this approach may not scale .have you tried with big scene where number of Vertices being rendered are very high .

I'm not sure about exporting, but for importing I have one high polygon count model that I use as a test.  Load this URL into Whoola Cyberspace (F1 key):
http://earth.whoola.com:8080/space/cyber/examples/swim/swimmer_woman.dae

It seems to work OK.

I have started reading the JAXB 2 spec.

David Wallace Croft / www.CroftSoft.com / (214) 636-3790 m / Advanced Java Game Programming
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline khangharoth

Junior Member




There is more to life than JAVA...But Java Rocks


« Reply #10 - Posted 2006-07-21 08:40:43 »

yup...when i saw the wireframe model ..its indeed rendering lots of vertices....... Grin

Offline croft

Junior Member




Java, Java, Java


« Reply #11 - Posted 2006-07-28 02:12:00 »

Oops.  I see it might be disabled:
http://earth.whoola.com:8080/javadoc/xith-tk/src-html/org/xith3d/loaders/dae/whoola/DaeExporter.html#line.1296

I think I was planning to fix it when I upgraded to JAXB 2.

I finished the JAXB 2 upgrade:
https://collada.org/public_forum/viewtopic.php?p=1640&sid=0c993c43b94c9a78958ac7533e6e9752#1640

This should permit me to fix the export of the background node.

David Wallace Croft / www.CroftSoft.com / (214) 636-3790 m / Advanced Java Game Programming
Offline khangharoth

Junior Member




There is more to life than JAVA...But Java Rocks


« Reply #12 - Posted 2006-07-28 04:36:40 »

Cool   Smiley , so we just have to take the new whoola_collada_jaxb.jar  , anyway right now i am busy with implementing Zoom at a point rather than centre , have done it but am thinking that their can be genral utility methods for visualisation  purposes in  Xith-tk .
              Like :
              1)  Zoom at  point so method should be like 
1  
 zoom(Point3f pointOfZoom ,float scale )

              2) Rotation about an arbitary axis passing through a given point .
1  
 rotateAboutPoint (Point3f point ,Vector3f axis,float angle )

              3) 3-4 classes dedicated for conversion of mouse-To-World cordinates.
                                                            Aim here should be that  :: if a point click gives me some world-cordinates than even after Pan,Zoom,Rotate ,changing the view direction that point still should give the same co-ordinate, its still the same point in the world cordinate .
                      I have done some work on it , and it would be great if we can come up with something like this in Xith
                                     
             

Offline croft

Junior Member




Java, Java, Java


« Reply #13 - Posted 2006-08-12 02:38:53 »

Cool   Smiley , so we just have to take the new whoola_collada_jaxb.jar 

The export of background nodes might work now.

You can get it here:
http://sourceforge.net/project/showfiles.php?group_id=114095&package_id=154144


David Wallace Croft / www.CroftSoft.com / (214) 636-3790 m / Advanced Java Game Programming
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

BurntPizza (26 views)
2014-09-19 03:14:18

Dwinin (40 views)
2014-09-12 09:08:26

Norakomi (70 views)
2014-09-10 13:57:51

TehJavaDev (95 views)
2014-09-10 06:39:09

Tekkerue (49 views)
2014-09-09 02:24:56

mitcheeb (70 views)
2014-09-08 06:06:29

BurntPizza (52 views)
2014-09-07 01:13:42

Longarmx (39 views)
2014-09-07 01:12:14

Longarmx (45 views)
2014-09-07 01:11:22

Longarmx (41 views)
2014-09-07 01:10:19
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!