View Full Version : In-Cube 3D Animations via Blender files...
vikinghax
January 10th, 2008, 04:20 PM
I know you can run the gears screensaver inside the cube already, but what I was wondering is if anyone is working on a plugin that would allow you to use different 3D graphic files so you could put your own 3D animation in the cube. I would love nothing more than to replace those gears with a 3D logo of my own... the possibilities of what you could put in there as long as the addon supported files such as blender files, would be endless.
Just a thought.
If you know if someone is working on this already, please let me know and direct me to it.
Keywords for searching.
3D Cube Gears replacement.
Gears animation replacement.
Blender 3D animation for Compiz-Fusion.
some-guy
January 10th, 2008, 06:01 PM
you already can with cubeDBUS http://forum.compiz-fusion.org/showthread.php?t=5683
:D
b0le
January 11th, 2008, 01:14 AM
It only has support for .obj model files, and there is no support for animation. There is also no 0.6 port (yet). But it does support textured models.
Also, like everything that cubedbus does, you can apply translations, scaling and rotations (and even have it rotating around at a constant speed)
EDIT: I might also add, that I am thinking of adding a particle effect ability to cubedbus, so you could have a particle fountain (as Curs0r put it on IRC) inside the cube. However, I am not sure when I will get around to it as I am gone next week, and I don't want to do too much until object-framework is merged (as I will likely be rewriting cubedbus once it is)
Monster_user
January 11th, 2008, 01:42 AM
Your poll options don't quite seem to fit my point of view.
Very useful and add a nice unique customization.
Kinda cool and unique, but not good enough to pursue.
Well, 3D effects in the Cube would probably not be very usefull. It may not be useful, but it would be worth pursuing, simply because its the effects that get peoples attention.
Now, what useful thing can you do with those effects?
You could put a day planner in their, or a Weather Globe, with localized weather reports, Similar to the Wii console?
A Media Player, with visualizations? That would be cool, especially as a screensaver.
A 3D Drive/RAM usage meter? A 3D Watch/Clock?
b0le
January 11th, 2008, 08:11 AM
Well, what I am trying to do with cubedbus is expose the functionality to other applications. So rather than compiz drawing this or that, compiz would allow other apps to draw this or that. At the moment you can't do much (draw coloured trianges, textured quads and load models (using a little hack you can also use textures from windows to do things like playing movies inside cube))
But I am also now working a particle effect system, which would very easily allow for things like visualizations for media players to be done inside cube.
Oasisgames
January 11th, 2008, 10:49 PM
If there was some proper depth rendering, then 3d objects inside the cube that were more than just models but useful tools would be extremely useful for me and anyone who ends up using my headtracking plugin...
Monster_user
January 12th, 2008, 06:00 AM
But I am also now working a particle effect system, which would very easily allow for things like visualizations for media players to be done inside cube.
That would be a cool use for a Particle system. Unfortunately, I am not a coder yet, so I can't offer any assistance.
I don't think we need to use any hacks, such as for Video. Who is going to be playing a video inside a cube anyway???
b0le
January 19th, 2008, 08:27 AM
If there was some proper depth rendering, then 3d objects inside the cube that were more than just models but useful tools would be extremely useful for me and anyone who ends up using my headtracking plugin...
What do you mean by proper depth rendering? It should already do that (assuming you mean draw things which are infront actually infront (so you can't see things behind)
Or do you mean interact with the head tracking plugin, in which case you should just be able to get another transformation matrix to apply over top (which you would get from the wiitrack plugin) to account for the movement of your head?
Oasisgames
January 19th, 2008, 04:07 PM
I was referring to depth rendering between windows and the contents of the cube. My plugin pushes windows back into the cube based on their z-level, but they're still rendered in front of everything else. It has to do with the render order being such that windows are rendered last for the current viewport.
I don't mess with the transformation matrix, and as I've been told, I'm the first person to actually change the projection matrix in Compiz (Even Zoom changes the transform matrix). This affects everything, so that's not what I'm worried about. (I've even looked at Atlantis 2, it's quite cool to enable mouse tracking and look around in it)
metastability
January 22nd, 2008, 02:51 AM
...I am ... now working a particle effect system, which would very easily allow for things like visualizations for media players to be done inside cube.
+1.
I think it would be entertaining to see particle effects inside the cube moving to music with transparent wallpaper.
My plugin pushes windows back into the cube based on their z-level, but they're still rendered in front of everything else. It has to do with the render order being such that windows are rendered last for the current viewport.
glEnable(GL_DEPTH_TEST);
I think that's all you need: unless you want to preserve transparency effects. Then you need to order your drawings (or use opengl version 3 if it is out).
As for actual animation. This could be done by exporting as multiple obj files. Before I thought this wasn't possible, but I have fixed a problem matching normals to vertices that was plaguing me before. I should now be able to do this reasonably easily with some modifications to a script I've been working on for rendering atlantis2 animations (which are all from Blender).
This is a different approach from cubedbus which can render stuff on-the-fly. The same concept should be able to be adapted for cubedbus though.
I'll have a go at this and post some example stuff here if I get anywhere.
metastability
January 22nd, 2008, 11:09 AM
I have attached a test plugin that performs linear interpolation on a series of obj files for animation.
What I have done is reorder the normals and copy them so that each vertex is in 1-1 correspondence with a normal for each frame and use the face drawing order from the first frame.
The animation is the default cube from Blender being warped (you can probably tell I'm not an artist from the animation all too easily).
The actual animation files are in the models folder and you can add your own animations if you like. Just export them from Blender as test000001.obj, etc. and then run the Java file to create the c code necessary in this test plugin.
b0le, if my Java file actually helps you add this feature to cubedbus (assuming you want to) I'd be pleased (and amazed given the state of my code).
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.