oh another quick thing there is a binary file reader but it doesn’t use lwjgl but if u want it posted just say so
jME already supports DDS format textures. Unfortunately some of the normal maps are a different compression format that I don’t recognize (and which that code you posted doesn’t support) - I can’t remember it offhand.
The Doom 3 pak files contain .tga versions of all the textures as well as DDS versions - the tga versions are used in high quality mode, DDS in lower quality modes.
If you fancy contributing $110 so I can buy a better graphics card, I’ll get normal mapping for MD5 working in the next few days
i can get u a deal on a graphics card but sending you money is out of the question
so is the commented stuff in bumpShader for normal mapping?
The commented stuff is for DOT3 bump mapping - I think it needs a cube map texture adding to normalize the light vector, currently it looks really wierd.
I’m actually staying at a friend’s house for a while, and he has a GF6800, so if I can get Eclipse and the JDK downloaded I may get a chance to do normal mapping with pixel shaders in the next couple of days. Watch this space. Or this one.
can normal mapping be done without shaders?
is there such a thing as a "standard" normalmap shader? 'cause I don't know a line of glsl, java is as far as I'm able to explore programming at this time
note: not a request, just curious. ;)
Normal mapping can be done without shaders, using DOT3 bumpmapping which is supported on most vaguely modern graphics cards (at least GF3+, maybe GF2). I tried to get it working but it never turned out right, so I’m going to try with shaders.
There isn’t really any such thing as a standard normalmap shader - the pixel and vertex shaders have to implement most of the things that the fixed function pipeline usually does for you, so what works for one person may not for another. For instance, you can only cope with a certain amount of lights. My normal map shader will be a base for you to work from (or to use as-is if you’ve got simpler requirements - 1 light, no fog, no vertex colouring etc).
Hope that helps I’ve not had a chance to work on the code yet, been getting everything downloaded to start on it. Hopefully I’ll have a chance later.
it does actually, seems that I may have some thinking to do, won’t start worrying yet though.
think you could get per pixel lighting going?
IMO, the md5 loader should concentrate on loading the model format and thats it. No normal mapping, no per-pixel lighting…etc. This should be left up to the programmer to decide whether they are important and to check whether the client’s machine is capable of doing these things.
Besides, per-pixel lighting is something that is general and not restricted to md5 models. Same with bump mapping and normal mapping…
Maybe even creating a “BumpController” apply it onto the spatial. This state will decide whether to do no bumpmapping, dot3 or fragment/parallex mapping…and once it has been decided, simply set the controller to not being active. When changing the detail of things, you can change the way bump mapping works via this controller…its just a thought.
I would tend to agree with DP on solidifying the loader functionality but if there is time and space to attempt both I say go for it, just don’t burn yourself out or feel that you must cater to every request.
my model have fear amount of detail so normal mapping would be a plus for me, not a requirrement
My MD5 stuff is not just MD5-specific - it’s a general system for managing models and animating them. At some point in the future I’ll be implementing importers for all the types that jME already supports (and maybe others).
The bump mapping shader will be reasonably extensible - it won’t be tied to the MD5 format (or vice versa), at least not in the long term. I want to get normal mapping working, anyway, I just want to get my Doom3 model viewer looking more funky I’ll be getting back to the core development again when I’ve got that done.
quick thing TGA is supported by jme it’s under com.jme.util.TGALoader