|
Zta
|
 |
« on: September 02, 2007, 03:09:06 pm » |
|
Hi, I'm following the instructions in http://www.jmonkeyengine.com/wiki/doku.php?id=exporting_animated_.md5_models_from_blender and have checkout both kproject-md5 from "Option 1" and md5reader from "Option 2", and imported everything properly into Eclipse together with a CVS version of jME. However, I get compiler errors from both projects: kproject-md5, class gr.kproject.md5loader.jme.MD5JmeAnimation line 71 appears to be using an outdated jME API function: Code: amesh.setVertexBuffer(rm.getVertexBuffer());API: http://www.jmonkeyengine.com/doc/com/jme/scene/Geometry.html#setVertexBuffer(int,%20java.nio.FloatBuffer)md5reader, class mdxreader.MDXTest line 17 uses an inappropriate way of logging: LoggingSystem.getLogger().setLevel( Level.OFF );So does class MD5WebStart line 81 but differently: Logger.getLogger().setLevel(Level.OFF);Am I the only person using the MD5 readers? Am I the only one using the CVS version of jME together with the MD5 readers? Any help is appreciated, Thanks! =)
|
|
|
|
« Last Edit: September 02, 2007, 03:17:26 pm by Zta »
|
Logged
|
|
|
|
llama
Champion
Hero Member
Offline
Posts: 2260
A llama like no llama before
|
 |
« Reply #1 on: September 02, 2007, 03:34:44 pm » |
|
Remove the logging calls (or port them to the new logging system), and replace amesh.setVertexBuffer(rm.getVertexBuffer()) with amesh.setVertexBuffer(0,rm.getVertexBuffer(0))
|
|
|
|
|
Logged
|
|
|
|
|
Zta
|
 |
« Reply #2 on: September 02, 2007, 03:49:59 pm » |
|
Thanks =)
I did infact try the solution with adding 0 as the int parameter, but the result looked weird as the screen flicked a lot, so I though I'd broken something, and didn't want to bother you with this =)
Now I've also removed the logging code from the other MD5 reader's tests, and now it runs, but with the same type of flickering.
I'm sure this is a completely different issue belonging in a different thread.
|
|
|
|
|
Logged
|
|
|
|
hevee
Project Advocate
Sr. Member
Offline
Posts: 945
|
 |
« Reply #3 on: September 02, 2007, 04:26:27 pm » |
|
I'm sure this is a completely different issue belonging in a different thread.
Correct, and there has been some discussion about it, eventually leading to Ender fixing the issue. A forum search for "md5 flickering" or "md5 twitching" should eventually lead you here: http://www.jmonkeyengine.com/jmeforum/index.php?topic=4858.msg44807#msg44807
|
|
|
|
|
Logged
|
|
|
|
|
Zta
|
 |
« Reply #4 on: September 02, 2007, 05:13:37 pm » |
|
Splendid.
But it seems my X has lost its hardware acceleration in mysterious ways, and glxgears (OpenGL test app) is flicking too. I'll fix this first =)
Thanks so far.
|
|
|
|
|
Logged
|
|
|
|
|
Ender
|
 |
« Reply #5 on: September 02, 2007, 07:59:45 pm » |
|
Infact, I think that if your problem is screen tearing (sometimes also called screen flickering) it is caused by 3D acceleration drivers. If, after you reactivated your 3D acceleration, you still see the same problem, try reading this thread: jME display tearing under Mac OS X.
|
|
|
|
|
Logged
|
|
|
|
|
Zta
|
 |
« Reply #6 on: September 05, 2007, 09:08:09 pm » |
|
Hardware rendering helped =)
Now, which one of the MD5 importers should I choose?
|
|
|
|
|
Logged
|
|
|
|
|
Ender
|
 |
« Reply #7 on: September 06, 2007, 02:44:09 am » |
|
Try them. And please post feedback. The MD5 Reader 2 shoul still have a little trouble with textures. I still have not tested if the latest fix I made about model twitching also resolved texture flickering cause of a lucky coincidence, as often happens fixing code  . About kman's loader, I cannot help you and is a lot of time that I do not test it.
|
|
|
|
|
Logged
|
|
|
|
|
Gathers
|
 |
« Reply #8 on: September 18, 2007, 11:04:38 am » |
|
A quick workaround for the flickering with MD5 Reader 2 might be to set the NormalsMode yourself. For example, if your model only has one mesh then you could do bodyInstance.getMeshes()[0].setNormalsMode(SceneElement.NM_GL_NORMALIZE_IF_SCALED);Now if I could only get my models smoothed as well as lighted! But that I think has something to do with them having "discontinuous uv" perhaps?  They are smoothed if I uv-wrap them myself, but I can't figure out how to wrap them correctly with their provided textures..
|
|
|
|
|
Logged
|
Every time you extend StandardGame you make a frog cry.
|
|
|
|
mud2005
|
 |
« Reply #9 on: September 19, 2007, 02:52:01 am » |
|
Now if I could only get my models smoothed as well as lighted! Try hitting 'SetSmooth' button , models are not smoothed by default.
|
|
|
|
|
Logged
|
Clarence Oveur: Roger, Roger, what's our vector, victor?
|
|
|
|
Gathers
|
 |
« Reply #10 on: September 19, 2007, 02:35:26 pm » |
|
I have tried setting them to smooth, removing all duplicate vertices, and even subdividing them. I even tried feeding the meshes into duenez Normal generator but so far no luck. They still look ugly and blocky when lighted.
|
|
|
|
|
Logged
|
Every time you extend StandardGame you make a frog cry.
|
|
|
mojomonk
Champion
Hero Member
Offline
Posts: 4019
|
 |
« Reply #11 on: September 19, 2007, 04:35:22 pm » |
|
If your model has a MaterialState applied, check the specular level. It might be so high that it is "blowing out" any transition. That is, it's so high that a triangle is either lit or unlit.
|
|
|
|
|
Logged
|
Never send a Man to do a Monkey's work.
|
|
|
|
Gathers
|
 |
« Reply #12 on: September 19, 2007, 05:43:37 pm » |
|
I just checked and there is no MaterialState. It also doesn't help to create one.
I could post some screenshots, but you might as well take a look at the ones duenez posted for his Normal Generator. I have the same situation with 3-4 normals pointing in slightly different directions from every vertice.
BUT if I wrap a new texture around the same model in blender, for example just Project From View some image, then the same model with no other changes appear smoothed in jME and all vertices seem to have just one shared normal..
|
|
|
|
|
Logged
|
Every time you extend StandardGame you make a frog cry.
|
|
|
|
Ender
|
 |
« Reply #13 on: September 20, 2007, 05:59:54 pm » |
|
Thanks for the feedback, Gathers, and for the suggested code. I will try to implement it someway automatically as soon as possible. bodyInstance.getMeshes()[0].setNormalsMode(SceneElement.NM_GL_NORMALIZE_IF_SCALED); The smoothing problem could be a MD5 Reader 2 problem, once again. There should be no reason to implement a separate Textures and Materials code for MD5, but I do not know if ChaosDeathFish did it. I will investigate the code to know if he did either if some obsolete line of code could be fixed to resolve this problem. Currently I am more concentrated in Animation/Model and Migration. Moreover, I have few time to work on it because I am busy with other projects, currently. Furthermore, from the update of the CVS code, I haven't had almost any news from the other developers. So I am basically alone. If this is not enough  , in the lates 3-4 days, I have been fixing my Gentoo broken update. Still working on it. For this I should thanks some missing libraries, that some new packages decided to delete.  So any feedback or help (patches, code, ...) is really wellcome.
|
|
|
|
|
Logged
|
|
|
|
duenez
Project Advocate
Hero Member
Offline
Posts: 1279
|
 |
« Reply #14 on: September 21, 2007, 03:28:53 am » |
|
For what it might be worth, I apologize for not having worked on the normal generator for quite a while  . I have been extremely busy with school (I had not expected it to be this bad  ) The NormalGenerator is not finished yet (there has been some unposted progress, however), and it is very possible it just ignored the model because it didn't understand the model  . If you have not been able to solve this in a while, I might have a new and more general version of the generator soon. 
|
|
|
|
|
Logged
|
Edgar --------------------- "...the horror of Armageddon was seen as a deterrent no sane society would risk. But the nations were not sane..." -Eon
|
|
|
|