www.jpct.net

jPCT - a 3d engine for Java => Bugs => Topic started by: Wojtek on August 21, 2011, 10:47:08 pm

Title: setEnvmapped and envmap texture change problem on compiled objects
Post by: Wojtek on August 21, 2011, 10:47:08 pm
Hello,

I have found problem with envmap textures on compiled objects.
Basically if object is compiled it is not possible to change envmap texture using PolygonManager.setPolygonTexture() method.

Steps to recreate:
1. set Config.glForceEnvMapToSecondStage = true;
2. create sphere using Primitives class
3. call calcTextureWrapSpherical(), build(), setEnvmapped(true)
4. assign two textures (some texture and envmap one)
5. call compile()
6. try to change textures to different ones

Expected results:
Both textures are changed and displayed correctly

Actual results:
Only first texture has been changed. It is not possible to change envmapped texture. If shared is used, it also does not get new texture


Optional steps using ObjectsEditor:
1. Download editor from: http://www.wojtech.virthost.pl/oe/oe_envmap.zip (http://www.wojtech.virthost.pl/oe/oe_envmap.zip) and run it using run.bat or run.sh
2. Create sphere from primitives
3. select expo_bamboo.png as Texture1 and set it's TextureMode to Multiply
4. select _env.png as EnvmapTexture and set it's TextureMode to Add [Both textures are visible]
5. change EnvmapTexture to _env2.png [Texture has been updated]
6. click Compiled checkbox [Object has been compiled correctly, textures are working ok]
7. change Texture1 and EnvmapTexture to other values

Actual result:
Texture1 has been changed
EnvmapTexture has not been changed

Thanks,
Wojtek

PS. One additional update: Calling setEnvmapped() has also no effect on compiled object.
Title: Re: setEnvmapped and envmap texture change problem on compiled objects
Post by: EgonOlsen on August 22, 2011, 06:56:44 am
I'm not sure ATM if this is a bug or by design...i'll look into it.
Title: Re: setEnvmapped and envmap texture change problem on compiled objects
Post by: EgonOlsen on August 22, 2011, 09:15:21 pm
Try this jar: http://www.jpct.net/download/beta/jpct.jar (http://www.jpct.net/download/beta/jpct.jar)

It should fix the problem. Please let me know if that helps.

And i don't get the PS...
Title: Re: setEnvmapped and envmap texture change problem on compiled objects
Post by: Wojtek on August 23, 2011, 12:54:00 am
It is much better :)

Thanks,
Wojtek