View Full Version : Ways to use the new JAR loader

Mr Kidnapper
01-05-2012, 10:29 AM
I understand we probably can't rely on the Alice team for features; primarily bug fixing I suppose, but thanks to Arty's new JAR loader we have more options to choose from... input from nonconventional keys and buttons being the one that notably works.
But I ask your assistance: I'd like to add a few things—three things in fact. Those being Phong shaders, Bones and Skins, and addition of Collada .DAE import/export functions. I'm probably going to do them myself but as of now I'm simply having problems trying to relate them to Alice functions.
I have already found a solution for bones and skins at java.net (http://java.net/projects/skinandbones/) but I hate places like those because it's hard to navigate.
Why .DAE? Because it's best format in terms of functionality, it accepts almost everything new 3D design programs shove into it. Moreover, it does not have that blasted 10,000 poly limit per subobject like .ASE does, and AFAIK all 3D programs export to .DAE natively. Here's a link to someone who is already doing this: http://shinoblogbyshiva.blogspot.com/2009/01/java3d-model-loader-for-google-sketchup.html
Phong shaders is a bit harder (To find.) It's not as hard to implement as the others, but in this case there is plenty of material to go ahead and code it ourselves.

Now the reason why: My reasons for doing things are a bit different from Arty's, he helps you do things and I help you do things while making it more visually appealing. In my case the only thing that limits you is the power of your GPU, though that is now probably a nonfactor. In his case, the only thing that limits you is yourself.. and probably the complexity of his programs if any. I can't seem to figure out where to find them.

01-05-2012, 10:46 PM
Just to explain, for anybody who has no idea what this "JAR loader" thingamajig is, its a feature in my upcoming Addons hack for Alice that allows the loading of Jars and subsequently raw Java code.

This means it can load in any open source Java package from out there on the world wide web, allowing anybody who understands Jython scripting (really only me and Mr K) to use that code in Alice without having to write it all up themselves.

Importing dae files sounds awesome. Again, as I said by PM, I'm out of my depth when it comes to these graphics things, but they sound awesome too - if they ever get implemented that is. Good luck, because I'm not too sure how to help (except maybe let you at least try Addons as a beta before I release it mainstream).

Mr Kidnapper
01-06-2012, 08:16 PM
Hah. The biggest concept I have to overcome is the idea that I can't edit and overwrite some procedures in the Alice.jar. The source of this problem is that you can only add onto Alice with this .jar loader, and can't change running processes without scripting, such as phong shaders and bones in particular. I'd have to figure out a way to do this without, or figure out how to export a working edited Alice.jar. Whenever I make one it doesn't seem to work.
Oh yeah: Better resource for importing Collada .DAEs (http://java.net/projects/j3d-contrib-utils/)
I keep getting "Could not find edu/cmu/cs/stage3/alice/authoringtool/JAlice class" even though I practically cloned the old .JAR
Using Eclipse 4.2M1

Mr Kidnapper
01-10-2012, 12:11 AM
In the meantime, you know what I can think we can do? Camera effects!
Things such as blur, inversion, masking, and HUD.
The idea is to have sliders which modify the degree of blur and a location on the screen (Based on percent width and height) and modifiable variables so that these options can be changed in the middle of play, effectively making it a realtime version of Sony Vegas.
Realtime Blur: The idea is to have different types of blur (Gaussian, Threshold, etc.) that can operate with different shapes (Primarily boxes and circles), and in this way we can fool the user with a tasteful amount of blur so that the end-result looks better than Alice could possibly deliver on its own. In example, we can create motion blur so that the camera blurs in the direction it turns in, various scene transitions, and other devices.

Inversion: You all know what inversion is right? The colors on the color wheel switch places with the ones opposite of them. We can do this in the same way as blur. This is simply to have "Cool Effect." Maybe use this when the character dies after getting shot.

Masking: Masking is preventing change in certain areas of the camera. Perhaps you don't want the outline of the character to be blurred or inverted. With Masking, it'll be all right. But this could be hard.

HUD: Heads Up Display, GUI, whatever you want to call it. In other threads, you have seen me call it Scaleform, referring to Autodesk Scaleform. It's where they use Flash to create an interactive GUI (Though Scaleform is 3D.) We won't be so grandiose with it and stick with a 2D GUI. Essentially what we'll be doing is sticking images in front of the window. These images cannot be affected by any events in Alice (Other than scripting, I guess), so if you want to zoom or run into a wall, the GUI will not be affected and it won't disappear behind the wall or run offscreen. This is of primary concern for FPS makers and Air Sim makers.

01-10-2012, 02:21 PM
Sounds awesome, but how?

Mr Kidnapper
01-10-2012, 07:13 PM
It's a lot easier than the first post, since in this we can actually program it in JAVA and load a .jar. The first thing to deal with is to get the frame before the render target renders it to the window, and use various methods to edit the frame appropriately and send it back to the render target to be rendered to the window.
You think you know how to do this? I don't quite know how many .getParent()s we might need before we get the frame. Perhaps we can take a look into the Video Recorder method.
In making a GUI you can simply paste an image in front of the render target. An important thing to note is whether or not we want the image to resize with the window or not.
Is a good website for learning basics for blurring still images. Still, we want to program our blurring algorithm that we can do it at least 60 times a second for realtime blurring.

01-11-2012, 02:50 PM
If we can do it in Java then we can do it in Jython, and Jython is more efficient, but if you would like to program in Java then I can implement the Jython to run it, considering the strict hierarchical structure my Addons require to be written in is probably only understandable by me.

I'm looking into it now.

07-14-2012, 04:20 PM
Can I have a link to the jar loader tool?

07-15-2012, 04:09 AM
It exists inside another project that isn't yet ready

07-15-2012, 09:57 PM
Cool, I can't wait:)