Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (120)
games submitted by our members
Games in WIP (577)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2 3 ... 5
1  Java Game APIs & Engines / Xith3D Forums / Re: can't smooth a 3ds model on: 2005-05-01 03:56:24
Quote
Do you plan updating 3DS loader in xith3d-toolkit CVS base?
that is, if you managed to fix a sphere problem just mentioned..

Well, I didn't fix the problem yet (don't know if I will, again, I'm no longer actively working on this).  I just emailed him some suggestions and alternatives.  However, if anyone finds out what the problem is, they are of course more than welcome to fix it. A good place to look would be FacesDescriptionChunk. Until then I would just recommend using Xith's primitive's package to make Spheres.
2  Java Game APIs & Engines / Xith3D Forums / Re: can't smooth a 3ds model on: 2005-04-27 23:30:48
Check your mail. Smiley
3  Java Game APIs & Engines / Xith3D Forums / Re: can't smooth a 3ds model on: 2005-04-27 00:11:59
hey, I'm no longer really working on this loader, but send me an email with your model and the code you're using and I'll try to take a look and see what's wrong.  This is very strange because I've loaded many sphere's before and I never noticed this.  My email: greg -at- kinostudios -dot- com

BTW, what version of 3DS Max are you using?
4  Java Game APIs & Engines / Xith3D Forums / Re: New 3DS Loader for Xith on: 2005-02-20 21:34:33
Quote
It would be great if you used the demo framework I created as it is renderer independant and consistant with the other demos.  I can help out with this if you like.

Wait, didn't realize what you meant by this Smiley  What demo framework?
5  Java Game APIs & Engines / Xith3D Forums / Re: New 3DS Loader for Xith on: 2005-02-19 13:10:26
I already have a demo Smiley
Just check the 3DSLoader v1.2 in the documents folder in xith-tk or my website. However it uses the old package names.

Right now I'm moving onto some other projects and won't be working much on this loader, but if you have any questions feel free to PM me, or AIM me, or ICQ me Smiley
6  Java Game APIs & Engines / Xith3D Forums / Re: Community Build Release Info on: 2005-02-18 20:09:47
loader3ds added to org.xith3d package in the xith-tk. For the time being, I'm going to take a break from working on it (long break probably), so if anyone wants to pick it up and fix the animation code, I'd be grateful.
7  Java Game APIs & Engines / Xith3D Forums / Re: New 3DS Loader for Xith on: 2005-02-18 20:04:19
Ok, with my limited knowledge of CVS I think I've successfully commited the source to xith-tk/src/org/xith3d/loader3ds/

Um, and I'd like to also say that I've given up on getting the rotation and scaling animation working, if anyone else wants to give it a shot, be my guest.

Edit: If anyone currently using this loader wants to use it using the xith-tk package, you'll have to change your import statements to reflect the new package name: org.xith3d.loader3ds
8  Java Game APIs & Engines / Xith3D Forums / Re: Memory leak when using two views on: 2005-02-18 18:52:17
Start with View.java?
9  Java Game APIs & Engines / Xith3D Forums / Re: New 3DS Loader for Xith on: 2005-02-18 18:47:43
Ok, so Josh finally replied to my email and said I can release it under the BSD license.  I'll make the changes to the headers in the files soon and then upload them where?
10  Java Game APIs & Engines / Xith3D Forums / Re: NEW TO XITH 3D on: 2005-02-11 19:54:15
I don't know about other people, but I find it highly aggravating when someone types in all caps.  I can never understand why people do that, it makes you seem new to computers in general--not just xith.
11  Java Game APIs & Engines / Xith3D Forums / Re: Need help with animation in loader on: 2004-12-23 12:20:45
Sorry, I didn't mean to come off like that.  Sad
12  Java Game APIs & Engines / Xith3D Forums / Re: Need help with animation in loader on: 2004-12-22 18:32:35
Because:
1) jME is very different from Xith
2) jME has an exporter for 3DS, which then exports it to an XML file in their own jME format which is then read by a loader.
3) I know what the problem is, and I vaguely know how to solve it, but I'm just tired of trying all these different things, especially when I don't know how the matricies work.  I could be overlooking an obvious solution because of this, so I'm going to take a break and learn about Matricies and Quaternions, finish up this other thing I'm working on, and then finish this loader.
13  Java Game APIs & Engines / Xith3D Forums / Re: Need help with animation in loader on: 2004-12-22 17:20:50
Hmmm... thanks for the google link Smiley I didn't know exactly what to search for.  I found several sites that look pretty complicated mathematically, but I'm in multi-variable calculus right now so I think I should be able to handle it.

Also, it seems to me that the loader is loading the wrong pivot point.  Rather, when my animator sets the pivot point, what gets changed is the origin of the object (in AxisChunk), while the PivotChunk doesn't, and has some weird small value that's incorrect.

I have a bazillion other things to work on right now, and i'm tired of working on this loader when I have other things looming over my head.  So I'm going to put it on hold, finish my other stuff, learn about all these matricies and quaternions and what-not, and then maybe in a week finish the bloody thing. Unless someone wants to do it for me, which would be greatly appreciated Smiley
14  Java Game APIs & Engines / Xith3D Forums / Re: Need help with animation in loader on: 2004-12-21 22:58:28
Mmmm... I don't really want to spend money on this just to learn what the mul method does.  If anyone has a good tutorial on this, or could just spare some time to explain to me how the method is used (as I understand, to combine transforms), it'd be greatly appreciated, and would probably help me finish this dang loader faster.
15  Java Game APIs & Engines / Xith3D Forums / Re: Need help with animation in loader on: 2004-12-21 21:40:46
You know what would probably help, understanding the mul method on all Transform3D's.  I know I should know what this is, but I'm completely new to 3D stuff and Xith, and I've gotten this far without it... So, what's the difference between mul and add and what do they do? You might need to explain how these matricies work as well...
16  Java Game APIs & Engines / Xith3D Forums / Re: Need help with animation in loader on: 2004-12-21 16:16:49
good question Smiley
I asked my 3D artist that, and he realized he didn't set them. So now he set them for this shape I'll be testing and things should hopefully go well Smiley  The loader does read the pivot now.
17  Java Game APIs & Engines / Xith3D Forums / Re: Need help with animation in loader on: 2004-12-21 02:36:35
Mmmm yes... but the problem is that for this model all of the pivots that PivotChunk reads are <0, 0, 0> Sad
18  Java Game APIs & Engines / Xith3D Forums / Re: ui xith3d on: 2004-12-20 13:40:52
Right, and I don't think Billboards work with the foreground node, not at least not in my tests with Text2D, I had to convert it to a regular shape3d using quad geometry.
19  Java Game APIs & Engines / Xith3D Forums / Need help with animation in loader on: 2004-12-20 01:16:34
I need some help with my loader.  Position animation works fine, but scaling and rotating don't really work correctly.  The way animation works in my loader (or doesn't work Tongue), is that I have have an AnimationGroup class that contains a reference to the TransformGroup and Transform3D of an object that will be animated.  Then a setTime() function is called indirectly by the user of TDSModel (though setCurrentFrame), which calls the setTime function of all AnimationGroups:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
public void setTime(float time) {
            if (rotTransform != null)
                  rotTransform.setTime(time);
           
            if (posTransform != null)
                  posTransform.setTime(time);
           
            if (scaleTransform != null)
                  scaleTransform.setTime(time);

            objectOfTransform.setTransform(transformOfObject);
      }

This, as you can see, calls the setTime function of all the different types of animation.  Each of the classes that the setTime is called on, have a reference back to their "parent" AnimationGroup class, so that they can _directly_ manipulate the object's Transform3D.  So first the rotation is applied like so: parent.transformOfObject.setRotation(AxisAngle4f).  Then posTransform sets the postion like so: parent.transformOfObject.setTranslation(Vector3f).  Then scaleTransform sets the scale of the object like so: parent.transformOfObject.setScale(floatScale).

Then finally AnimationGroup sets the Transform3D onto the TransformGroup object: objectOfTransform.setTransform(transformOfObject);

Now, in animations from models that i'm testing, I'm getting funky results.  If I animate just the position, it works fine.  However, if I animate just the scaling, then the object scales, but it also moves in some direction (even when the position is not being animated), instead of just scaling in place.  And the rotation also does not rotate the object in place, but rather moves and rotates it (again, even with the other two animations off).

So obviously I think I'm doing something wrong here, but what is it?

If you want to look at the actual code then click my sig and download the loader (even if you already have, I just re-uploaded a "new" v1.2 with the changes in animation. It's currently set to just animate the postion--which it does correctly)

Relevant classes:
TimedTransform
PosTransform
RotTransform
ScaleTransform
AnimationGroup
RotationChunk  -- enable/disable rotation animation
PositionChunk  -- enable/disable position animation
ScaleChunk -- enable/disable scale animation
TDSModel
20  Java Game APIs & Engines / Xith3D Forums / Re: ui xith3d on: 2004-12-18 20:44:36
Um... I don't know what you mean?  Huh
Hey, could you contact me on AIM or ICQ so that we don't clutter up this forum?
21  Java Game APIs & Engines / Xith3D Forums / Re: New 3DS Loader for Xith on: 2004-12-18 20:42:16
Hmmm... the cube_set, which seem like they could be very useful, don't seem to animate.  I know translation works in other models but in cube_translation.3ds it doesn't.  I tried loading them in the Java3D loader (the one I'm using to port), and it didn't show any animation. Odd...  You sure those animate? I don't have any 3D software other than these loaders to test them.
22  Java Game APIs & Engines / Xith3D Forums / Re: ui xith3d on: 2004-12-18 18:48:26
Yeah, just like your code says.
23  Java Game APIs & Engines / Xith3D Forums / Re: ui xith3d on: 2004-12-18 16:54:43
Hmm... Nope, can't see the swing components Sad
I'm doing a renderOnce() in a loop instead of startView btw...
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
f = new JFrame("ui test");
            f.getContentPane().setLayout(new BorderLayout());
            RenderPeer rp = new RenderPeerImpl();
            cp = rp.makeCanvas(f.getContentPane(),800, 600, 32, false);
            Canvas3D canvas = new Canvas3D();
           
            f.getLayeredPane().setLayout(new BorderLayout());
            Panel pan = new Panel();
            pan.add(new JButton("click me"));
            pan.add(new JTree());
            f.getLayeredPane().add("South",pan);
            f.setSize(800, 600);
            f.setVisible(true);
24  Java Game APIs & Engines / Xith3D Forums / Re: ui xith3d on: 2004-12-18 16:10:15
I don't think copy/paste is that important at the moment.  What is really needed though are just text fields that can accept user info, text boxes that can store chat conversation with a transparent background, etc.
25  Java Game APIs & Engines / Xith3D Forums / Re: New 3DS Loader for Xith on: 2004-12-18 16:00:30
I've updated the code and javadoc some, and added it to the xith-tk documents and file folder.  From now on you should download it from there (or from CVS whenever I get around to putting it there), however,  I will still try keeping the files on my site in sync, and the javadoc is online there for you to look at.  You can try animating your stuff now, but it won't work too well Smiley It only animates position so far, implementing rotation and scaling shouldn't be too hard but I'm waiting for my 3D modeler to give me a nice test file.  Also, I think the position coords are off a bit and probably need to be converted to xith-space.  This will be done soon hopefully, but I'm really busy right now, if anyone can take a look at the code the important classes are:

AnimationGroup -- Basically finished
TimedTransform -- ignore the setTransform method, gonna get rid of it cause the Transform subclasses should manipulate the Transform3D in AnimationGroup directly (see PosTransform).
PosTransform -- Basically finished.
RotTransform -- not yet changed (kev glass's code)
ScaleTransform -- Does it work now?
PositionChunk -- needs coordinate conversion probably
ScaleChunk -- Probably finished?
RotationChunk -- not yet touched

TDSModel -- animations are controlled here by the user.

Edit: OK, I think I might have fixed the position stuff, so now hopefully it's in the right coords.  I've also added Scale animation, but I don't have any models that scale stuff so I can't test it.  It might or might not work.  Either way, that's practically finished, so the last thing to do is the RotationChunk/RotTransform.
26  Java Game APIs & Engines / Xith3D Forums / Re: ui xith3d on: 2004-12-18 14:52:14
If you get it working please post here Smiley
27  Java Game APIs & Engines / Xith3D Forums / Re: Spheric Texturing on: 2004-12-18 13:33:13
Uh, I don't know if this is what you need, but this makes a sphere with the proper texcoords:
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  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
public static Geometry getSphere(int divisions, int radius) {
            float   sign      = 1.0f;

            float[] texCoords = new float[(divisions + 1) * (2 * divisions + 1) * 2];
            float[] vertices  = new float[(divisions + 1) * (2 * divisions + 1) * 3];
            float[] normals   = new float[(divisions + 1) * (2 * divisions + 1) * 3];

            for (int i = 0;i <= divisions;i++) {
                  float rho = (float)((double)i * FastMath.PI / (double)divisions);

                  for (int j = 0;j <= 2 * divisions;j++) {
                        float theta = (float)((double)j * FastMath.PI / (double)divisions);
                        float vx = (float)(FastMath.cos(theta) * FastMath.sin(rho));
                        float vy = (float)(sign * FastMath.cos(rho));
                        float vz = (float)(FastMath.sin(theta) * FastMath.sin(rho));

                        texCoords[((i * (2 * divisions + 1)) + j) * 2 + 0] = 1f - (float)j / (2f * divisions);
                        texCoords[((i * (2 * divisions + 1)) + j) * 2 + 1] = (float)i / divisions;

                        vertices[((i * (2 * divisions + 1)) + j) * 3 + 0]  = vx * radius;
                        vertices[((i * (2 * divisions + 1)) + j) * 3 + 1]  = vy * radius;
                        vertices[((i * (2 * divisions + 1)) + j) * 3 + 2]  = vz * radius;

                        normals[((i * (2 * divisions + 1)) + j) * 3 + 0]   = vx * sign;
                        normals[((i * (2 * divisions + 1)) + j) * 3 + 1]   = vy * sign;
                        normals[((i * (2 * divisions + 1)) + j) * 3 + 2]   = vz * sign;
                  }
            }

            int[] vIdx = new int[divisions * 2 * divisions * 6];
            int   n = 0;

            for (int i = 0;i < divisions;i++) {
                  for (int j = 0;j < 2 * divisions;j++) {
                        int v00   = i * (2 * divisions + 1) + j;
                        int v01   = i * (2 * divisions + 1) + j + 1;
                        int v10   = (i + 1) * (2 * divisions + 1) + j;
                        int v11   = (i + 1) * (2 * divisions + 1) + j + 1;

                        vIdx[n++] = v11;
                        vIdx[n++] = v10;
                        vIdx[n++] = v00;
                        vIdx[n++] = v11;
                        vIdx[n++] = v00;
                        vIdx[n++] = v01;
                  }
            }

            IndexedTriangleArray shapeGeom = new IndexedTriangleArray(vertices.length / 3,
                                                                                                  GeometryArray.TEXTURE_COORDINATE_2 |
                                                                                                  TriangleArray.COORDINATES |
                                                                                                  TriangleArray.NORMALS, vIdx.length);

            shapeGeom.setTextureCoordinates(0, 0, texCoords);
            shapeGeom.setValidVertexCount(vertices.length / 3);
            shapeGeom.setValidIndexCount(vIdx.length);
            shapeGeom.setCoordinates(0, vertices);
            shapeGeom.setNormals(0, normals);
            shapeGeom.setIndex(vIdx);

            return shapeGeom;
      }
28  Java Game APIs & Engines / Xith3D Forums / Re: ui xith3d on: 2004-12-18 13:13:22
Quote
* I don't know any reason why this should decrease the framerate in any way.

Good idea, but have you tried it and do the frame rates really stay the same?
29  Java Game APIs & Engines / Xith3D Forums / Re: ui xith3d on: 2004-12-17 19:30:53
I would label an in-game UI system essential.  Xith needs this badly, come on guys, any progress?
30  Java Game APIs & Engines / Xith3D Forums / Re: Xith3d needs a formal schedule! on: 2004-12-17 17:13:28
*cough*xithui*cough*
Pages: [1] 2 3 ... 5
 

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

The first screenshot will be displayed as a thumbnail.

Longarmx (52 views)
2014-10-17 03:59:02

Norakomi (43 views)
2014-10-16 15:22:06

Norakomi (33 views)
2014-10-16 15:20:20

lcass (37 views)
2014-10-15 16:18:58

TehJavaDev (68 views)
2014-10-14 00:39:48

TehJavaDev (67 views)
2014-10-14 00:35:47

TehJavaDev (60 views)
2014-10-14 00:32:37

BurntPizza (73 views)
2014-10-11 23:24:42

BurntPizza (45 views)
2014-10-11 23:10:45

BurntPizza (86 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!