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.

Messages - efaj

Pages: [1] 2 3
Bones / Re: Multiple meshes with the same skeleton
« on: January 08, 2012, 11:34:08 pm »
Because I'm making an online game that will allow character customization. So if I added all clothes and parts in one single file, it would grow in size a lot. And we all know that would make parsing eternal.

I'll just stick to handling them separately... I already got that done, I was just looking if there was a more efficient way.

Bones / Re: Multiple meshes with the same skeleton
« on: January 08, 2012, 11:20:53 pm »
But ninja has 1 single file. I need to have them in separate files and merge them only during execution, for example, to make a ninja wield different swords.
I tried for example loading them all, and then merge them with the AnimatedGroup method, but it sent an error:
Code: [Select]
Number of vertices differ!So, that's not the way to do it, if any.

Bones / Multiple meshes with the same skeleton
« on: January 08, 2012, 06:41:12 pm »
Do I just handle them separately, or is there a way that would be more optimized?

Bones / Re: [SOLVED]exporting Blender>Ogre>Bones
« on: January 06, 2012, 02:55:16 pm »
Maybe you hadn't applied the transformations? Ctrl+A on the armature too. If they are not applied, the animation sequence may be what finishes making that look so weird: Without them applied, the armature would be in a position different to the one the keyframes expect.

But yeah, redoing the armature may be the best since I have no further idea of what's going on there.

Support / Re: How to clean after changing Rooms/Scenes? [Solved]
« on: January 05, 2012, 10:21:10 pm »
It's a mix of removeAndUnload and my attempt at cleaning the resources raft's GLFont uses. With what you've told me, I should be able to fix it now (since I already did some changes to texturePack for disposal) -or since it's a font, I might as well leave it-
All the rest remove and unload their textures correctly without triggering that error.

Keep in mind that if you remove a texture and add the same texture with the same name, an old object using this texture will still refer to the old one. Maybe that causes the problem?
And yes, this was the case... I hadn't seen GLFont kept a cache.

Bones / Re: [SOLVED]exporting Blender>Ogre>Bones
« on: January 05, 2012, 09:38:10 pm »
Take one with just the skeleton (in that same animation)
All the weights already must be fine, it must be related to the bones and their position. Maybe your skeleton is not the same size of your object?

Support / Re: How to clean after changing Rooms/Scenes? [Solved]
« on: January 05, 2012, 09:13:54 pm »
As far as I know, I'm not using concurrency (at least not explicitly), so I guess I'm in the render thread. And damn, didn't know I was leaving those textures like that.... thanks.
And for this project, leaving the textures I don't think is an option, because I want the game to run in any video card from Pentium 4 integrated and up, and I'm making a Pokemon-like MMO... which means there will be around 100 different creatures with different textures in different fights, so if the client were to be left open for extended gameplay, those and the player (which will be customizable, increasing the amount of textures) and terrain textures will build up.

removeAndUnload can only cause that if you are still rendering objects that use these textures.
What do I have to do then? Inside my loop I have:

Code: [Select]

private void changeRoom(){
switch (nextRoom) {
case TITLE:
room=new Title(this);
case GAME:
room=new Game(this);

private void removeTextures(){
for (String name : texturesForRemoval) {
TextureManager.getInstance().removeTexture(name); //This is the line that will become removeAndUnload()

So, I thought since the objects are removed before the textures unloaded they should have already be "Not rendered".

Bones / Re: [SOLVED]exporting Blender>Ogre>Bones
« on: January 05, 2012, 09:02:58 pm »
Ok... i didn't understood the last one... first, you should have painted from Yellow to Red. Blue means removing them from the bone. Red = belongs to bone. So if all is Blue, I guess all your model is missing or at least not animating?

But, if you did got it to work, why the  :-\ face?

Just to clear things: Do you still have a problem or not?

Bones / Re: [SOLVED]exporting Blender>Ogre>Bones
« on: January 05, 2012, 08:10:16 pm »
Yes, as you can see, the weights for that bone are not Red, but yellow. That's like a 0.5 weight. Blue is 0, vertices not affected by that bone will be blue. And Red is 1, the max weight, where they will be completely affected by the bone.

Also, there's nothing wrong with vertices being part of 2 groups... the problem is if they are part of groups that are too apart: The vertices of the knee can be part of both the thigh and leg. But, I'd recommend to keep them to a minimum... in the preview image it looked as though some vertices were part of both the hand and head for example.

And, I'd recommend NOT to use blender's automatic weights as they won't be 1.0 (Red) and may even be badly done. Doing them yourself gives you more control and makes them right. And with weight paint, it doesn't take too long.

And last, I don't like video tutorials P: but here's the one I had used to learn about weight paint:
It's pretty complete. Go to the middle, to the Rigging section

Bones / Re: [SOLVED]exporting Blender>Ogre>Bones
« on: January 05, 2012, 07:26:40 pm »
If you have all your vertices as part of a vertex group, and with weights that look Red in weight paint mode, the only other thing that I can think of that would also make sense considering some vertices seem to be moved towards another bone would be that some of your vertices are part of 2 groups at once:
For example it looks like some of your arm vertices are part of the head bone or leg bone...

But, that looks just like the issue I had when not all vertices were weight painted. I'd recommend you to double check on that.

On the exporter, try unchecking all the Optimize options too.

Bones / Re: [SOLVED]exporting Blender>Ogre>Bones
« on: January 05, 2012, 06:14:16 pm »
add a picture of your original model too.

Bones / Re: [SOLVED]exporting Blender>Ogre>Bones
« on: January 05, 2012, 04:56:08 pm »
Alright, I changed the wiki link to point at just the Bones webpage (Since I was already linking to something, might as well link to the site just in case someone would read it without Bones).

And the wiki page was no prob, just giving back for the help and awesome engine that is jpct+Bones  :P
I had been analyzing several java 3d engines, and the software mode was exactly what I wanted... Skeletal animations and software mode were all the things I needed on an engine.

I'll try to contribute some more in the future. And while I'm on it, your glFont and texturePack are also great

Support / Re: How to clean after changing Rooms/Scenes?
« on: January 05, 2012, 04:44:43 pm »
Alright, thanks!
I changed my code accordingly using just world.removeAll(). Also, found out that the error was being caused by textureManager.removeandUnload(), so I'll just use remove() when there are textures I'll have to remove (because yes, there will be some rooms that have objects with very unique textures, and several of those)

Bones / Re: exporting Blender>Ogre>Bones
« on: January 05, 2012, 11:11:31 am »
  • Select the object
  • Go to Edit mode
  • On the Properties panel (change one into Properties if you don't have it while keeping a 3D view panel), on the Object Data tab, go to "Vertex Groups".
  • Be sure you have NO vertex selected by pressing A_key to select all, and pressing it again to unselect all.
  • Now, for each vertex group:
  • Select it and press "Select", and then hover over the 3D view panel, and press H_key. This will hide all vertices from that group. (The Outline "has" even a "hide" option, but it doesn't work for me, maybe it does for you and saves you work... if not, you'll have to use what I just said)
Every vertex that remains has no bone assigned. So either you do what I did and remember their positions and go to weight paint mode... OR you do the smart way and add them to a vertex group from there:
With those missing vertices still selected, on the Properties panel, click the Vertex Group you want to add them to, and click "Assign".

After you are done, use Alt+H_key to make all the hidden vertices visible again.

The following may just be me, or may be because I haven't experimented enough but here goes in case after all that you are still missing vertices:
HOWEVER, I noticed that maybe because of how Blender has different weights, that it seems only those on max weight (red on weight paint mode) are counted, so after this you may want to test your model on from Bones's examples. Then, whatever is missing from there, you go to vertex paint mode to paint it for the corresponding bone.

Support / How to clean after changing Rooms/Scenes? [Solved]
« on: January 05, 2012, 10:54:36 am »
So, on my original attempt to do so, I got
Code: [Select]
[ Thu Jan 05 03:46:05 CST 2012 ] - WARNING: There's a problem with the object list not being consistent during rendering. This is often caused by concurrent modification of jPCT objects on a thread different from the rendering thread!
[ Thu Jan 05 03:46:05 CST 2012 ] - ERROR: null
But, only with the OpenGL renderer and if it's the second time I go into the Game room. (the only other room is a title screen that only blits 2d stuff with raft's openglFont and texturePack)

I guess it's related to the way cleaning must be done in between rooms. Is there any example on it?

So far what I do is call world.dispose(); and textureManager.removeandUnload() for every texture I can keep track of after rendering and before creating a new Room object over the previous.

Pages: [1] 2 3