Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Jonas

#31
Projects / Re: 3DCov(Java3d->jpct port)
January 01, 2008, 09:03:43 PM
We don't have a homepage, and I doub't that anything is planned. I will ask after holidays are over though.

edit: Just tried oversampling...works nicely and really looks good. Rendering is smooth. However, it kinda breaks picking(do i have to scale the x/y position im using at reprojection or something?)..didn't investigate it any further.

edit2: Yep, didn't scale. Seems to work great now. ;D


#32
Projects / Re: 3DCov(Java3d->jpct port)
January 01, 2008, 04:48:44 PM
Loop yes, as fast as possible no(that be a lot higher fps). The target fps is set to 20.

Changing to an event based rendering is something I wanted to do, but implementing all functionality was
more important and took up all our time(which wasn't that much to begin with anyway :D).

#33
Projects / 3DCov(Java3d->jpct port)
January 01, 2008, 01:03:16 PM
Hi
As part of a term project, a friend and I been working on porting a little visualisation tool from Java3d over to jpct(pure software mode) the last ~2-3 weeks.
This was done because people kept having troubles running it under Java3d. The new version runs suprisingly smooth(given
a few things are probably implemented quite inefficient ;D due to lack of time) even on low end computers.

The tool's named 3DCov and is used to visualize the relation between classes and objects(for OO beginners). Following a few screens of a loaded diagram:




2d/3d view. 2d is done using JGraph
Some classes/objects moved around
Popup menu
Labels(multiplicity, roles, ...)

Happy new year everyone :)
#34
News / Re: New version of...myself!
December 17, 2007, 11:10:03 AM
Congrats! und alles gute euch!

#35
Projects / Collada loader + and others
November 18, 2007, 08:48:14 PM
I started working on a collada loader(because..well..I had no other project idea ;D) a few weeks ago. I didn't get very far, mainly because I kinda lost interest in it and lack of time.

It currently doesen't do much more than loading basic(mesh) geometrie.

Some pictures:

http://web72.pi.ibone.ch/duck1.JPG
http://web72.pi.ibone.ch/duckW.JPG
http://web72.pi.ibone.ch/motor1.JPG
http://web72.pi.ibone.ch/motorW.JPG

Todo:

* supporting a subset of the effects librarie(correct texturing ..the one on the duck is applied after loading the model)
* light, camera and scene loading(so you get a configured world instead of object3d's)
* complex geometrie
* ...collada is huge :)

I don't think that I'll work on it again soon. If anyone is interested in the source ill upload it.
#36
Support / Re: Object space rotation
November 15, 2007, 08:26:01 AM
Hi

Thanks, that helped pin down the error. I actually built the object and reset the pivot, but had another buildAllObjects() in the scene load code, which reset the pivot again ;D.

Works now.
#37
Support / Object space rotation
November 14, 2007, 07:29:13 PM
Hi

Having trouble with what i think is pretty basic ;D. I most probably just dont understand how rotation works.. :).

Im trying to draw some axis arrows..so I made my own arrow object3d and added it to a scene(see picture..the negativ y one is the original).
Now Id like to rotate that arrow to align it with the other axis. When i do the following:

o3ds[0] = createArrow();
       
       o3ds[1] = createArrow();
       o3ds[1].rotateZ((float)Math.toRadians(-90));
       
       o3ds[2] = createArrow();
       o3ds[2].rotateX((float)Math.toRadians(90));
       


it looks like this:


Now..is there a way to rotate these arrow so I dont have to translate them back in position(sphere is 0,0,0)? I tried setting the pivot and center of the arrow inside the sphere(which is the origin of the axis arrow too) but it doesent seem to work either.
#38
hi

If you create your own object with triangles, you have to somehow tell the engine how to map a texture's picture information on to that object. This can be done by assigning UV coordiantes(UV really being x and y coordinates in % in a texture-> between 0 and 1) to the 3d geometry(vertices).

There several ways to assign UV coordiantes to your geometry:

You can do it like Kearnan, and let the engine calculate it for you(which might sometimes look a bit wierd), or by adding this information together with the vertices information of the triangle(often the case when using model loaders).

Following a simple example of a selfmade cube(probably the most awkward way of doing it heh). It only maps a texture on the two top triangles of the box. I'd go with automatic mapping though^^

/** Creates a box, which maps any given texture on to the top of the box */
   
    public static Object3D createBoxTextTop(float size, int texId)
    {
        Object3D box = new Object3D(12);
       
        SimpleVector[] sv = new SimpleVector[8];
        /* The 8 vertices of the box */
        sv[0] = new SimpleVector(0, 0, 0);
        sv[1] = new SimpleVector(size, 0, 0);
        sv[2] = new SimpleVector(size, size, 0);
        sv[3] = new SimpleVector(0, size, 0);
       
        sv[4] = new SimpleVector(0, 0, size);
        sv[5] = new SimpleVector(size, 0, size);
        sv[6] = new SimpleVector(size, size, size);
        sv[7] = new SimpleVector(0, size, size);
       
        /* Add the triangles counter-clockwise(so they face "outside") */
        box.addTriangle(sv[0],sv[2],sv[1]);
        box.addTriangle(sv[0],sv[3],sv[2]);
       
        box.addTriangle(sv[1],sv[6],sv[5]);
        box.addTriangle(sv[1],sv[2],sv[6]);
       
        box.addTriangle(sv[5],sv[7],sv[4]);
        box.addTriangle(sv[5],sv[6],sv[7]);
       
        box.addTriangle(sv[4],sv[3],sv[0]);
        box.addTriangle(sv[4],sv[7],sv[3]);

        /* These are the 2 top triangles, which have a texture assigned(texId is the texture ID returned from a texmanager).
             In this case its easy to map the texture, since the two triangles should show the whole texture
        */

        box.addTriangle(sv[4], 0f, 0f, sv[1], 1f, 1f, sv[5], 1f, 0f, texId);
        box.addTriangle(sv[4], 0f, 0f, sv[0], 0f, 1f, sv[1], 1f, 1f, texId);
       
        box.addTriangle(sv[3],sv[6],sv[2]);
        box.addTriangle(sv[3],sv[7],sv[6]);
         
        return box;
    }
#39
Support / Re: Render text onto an object3d
November 06, 2007, 04:09:12 PM
Quote from: EgonOlsen on November 03, 2007, 06:45:38 PM
For writing text into a texture, you may use an ITextureEffect that you fill with the pixels from a BufferedImage each time you write new text into that BI.

That did the trick, thank you!
#40
Support / Re: Render text onto an object3d
November 03, 2007, 07:49:25 PM
Quote from: hthth on November 03, 2007, 07:35:25 PM
You could use the Object3D.setAdditionalColor(java.awt.Color) to make the surface seem brighter. Works pretty well for me, I use it for stuff like buttons that should appear to glow in a dark environment. You can see an example in the latest screenshots in this thread -- the lights and red orb in there have additional colors.

Thanks thats what I ment.

#41
Support / Render text onto an object3d
November 03, 2007, 04:32:02 PM
Hi
I'm porting a visualisation tool from Java3d to jpct, and am currently working on a prototype.

So far everything works fine, and most functionality is alrdy ported, except one major thing which i couldn't solve yet.

1. I need to project dynamic generated text on a box(see picture). Is there a clever way of doing that in jpct?

2. The boxes need to "glow"(e.g. get brigther) once selected. Whats the proper way of doing that in software mode? Use a texture effect? Anyone did something like that befor?:)

thx

it should look like this: