Mipmapping + render to texture = nope?

don't seem to get any mipmapping at all when rendering to texture…anyone knows why?

I don

hehe i know…that's not what i meant…i don't get any mipmapping on the scene rendered into the rtt texture…

I seem to have the same problem, I'm rendering a scene to a texture, but can't figure out how to turn on mip mapping for the scene. 



Using texture.setMipmapState( Texture.MM_NEAREST_LINEAR ); just results in a solid white texture.



I'm going to use a vertex shader later for rendering the texture (it's part of a landscape engine) so it shouldn't be a problem for me, was just curious if I was doing something wrong with mip mapping or if it doesn't work for scenes rendered to textures.



– zzorn

Mr Coder, did we ever solve your problem?  I don't see any particular reason why mipmaps wouldn't work in the pbuffer.

hehe not sure…i need to go back and do some tests similar to those i did back then(looong time ago) :slight_smile:

I have the same problem !

(I use a DDS image with a color by mipmap and it's still the same color !)  :?



So, just to be sure, could someone give the steps to use Mipmaps ?

Thanks

I just wrote a mip map test (jmetest.renderer.TestMipMaps) that includes RTT.  It seems to work fine, as long as you use the right texture filter options for MM.  Should be in CVS later today.

Once again, a noob question :

Where can I find the last CVS version of JME since I can't find the Class you talked about ?  :roll:



Thanks

OK, I think it's my fault if mipmaps don't work :frowning:

I tried to used them with a TriMesh I've programaticaly created and not with the Terrain objects given by JME.



By the way, is JMe capable of unsing Mipmaps for rendering TriMesh or should I do it by myself ?  :expressionless:

Of course… terrain is just another TriMesh. All you have to do is set the right mode for your Texture with setMipmapState.



The DDS loader is also supposed to support loading mipmaps, though this might be a less well tested feature. I think most people just let jME generate the mipmaps.



For your CVS question: http://www.jmonkeyengine.com/wiki/doku.php?id=getting_started



But I don't think renanse checked in the test yet.

dds loading with mipmaps included works…

llama said:

But I don't think renanse checked in the test yet.


I'll dbl check with Mark to see if that was put into cvs.

It seems to work except with DDS files  :?



When I use this code :

TextureManager.loadTexture(
"media/mipmap.dds",
Texture.MM_LINEAR_LINEAR,
Texture.FM_LINEAR,
1,
true)


, I get a white texture.

But when I use another file format, it seems to work !

Coult it come from my DDS file ?

Are you using any compression for your DDS files, and does your videocard support it?



Also check the console and see if there's any debug output from the DDS loader.

are you sure you have the mipmaps baked into the dds files?

Yeah, check your console output and make sure it isn't saying something like "got 5 mipmaps, expected 10!"

llama said:

Are you using any compression for your DDS files, and does your videocard support it?

Also check the console and see if there's any debug output from the DDS loader.


I don't know if it's compressed. I made the file with the DDS Photoshop exporter from NVidia.
My videocard works well with mipmaps but perhaps not with DDS files. It's a GeForce4 so I think it's OK.
There is nothing special in the logs.

MrCoder said:

are you sure you have the mipmaps baked into the dds files?


Yes because, when I open the file with the NVidia importer, I got them.

renanse said:

Yeah, check your console output and make sure it isn't saying something like "got 5 mipmaps, expected 10!"


You're right : I got "2" with "defaultTex.getMipmap()" when I should get "7".
Perhaps it's due to compression.

So, which file format do you think I must use for Mipmaps ?

I don't think it's due to compression, I'm guessing it's because the mipmaps aren't there. When you open them with the importer how many mipmaps do you get?



Check if there's a setting in the exporter to make sure all possible mipmaps are saved, not just a few.

It's fixed !