Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (487)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (553)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  "Correct" texture mapping switches and filter for environment mapping  (Read 1221 times)
0 Members and 1 Guest are viewing this topic.
Offline ElNormeo

Senior Newbie





« Posted 2009-06-15 19:34:31 »

Hi there,
Due to lack of of a proper code for a ksybox, i built myself a 'manual' skybox, by positioning 6 quads around a sphere.
The code is working fine, no prob there, but i got some troubles with the 'right' texture mapping filters for my 'walls'
For my center shining sphere i use:
1  
2  
3  
4  
5  
6  
7  
8  
texSphere.setTexParameteri(GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT);
            texSphere.setTexParameteri(GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT);
            gl.glTexGeni(GL.GL_S, GL.GL_TEXTURE_GEN_MODE, GL.GL_REFLECTION_MAP);
            gl.glTexGeni(GL.GL_T, GL.GL_TEXTURE_GEN_MODE, GL.GL_REFLECTION_MAP);
            gl.glTexGeni(GL.GL_R, GL.GL_TEXTURE_GEN_MODE, GL.GL_REFLECTION_MAP);
            gl.glEnable(GL.GL_TEXTURE_GEN_S);
            gl.glEnable(GL.GL_TEXTURE_GEN_T);
            gl.glEnable(GL.GL_TEXTURE_GEN_R);


For my walls i use the same...

Now during the rotation of the sourounding cube, my 'wall' textures moving and bending around too. I mean that looks fancy, but i want to have static textures for the walls.

Does any of you have an idea, how to use these texture filters properly to create an 'correct' environment mapping?

Thanks,

Regards,
normen
Offline PeterB

Junior Member





« Reply #1 - Posted 2009-06-15 23:43:10 »

You shouldn't be using any kind of environment map when rendering your skybox.
You want the skybox to look like sky, not like walls that are reflecting sky.

That's what your sphere should do (with GL_TEXTURE_CUBE_MAP - google it for examples)

Just draw the skybox with normal calls.

Want some help making skies? try this: http://www.3dna.net/community/staticskies.htm

Vault101 / Mace The Game
There are 10 kinds of people in the world. Those who understand binary and those who don't.
Offline ElNormeo

Senior Newbie





« Reply #2 - Posted 2009-06-16 11:08:09 »

Aaahh...
Googleing for GL_TEXTURE_CUE_MAP + examples showed some very promising stuff. Will test that tonight at home. Thanks very much;-)
PS: I'm using Ubunto, so no Terragen for me unless i get that with Wine working, which i will try too.
Thanks;)
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

TehJavaDev (16 views)
2014-08-28 09:26:30

CopyableCougar4 (25 views)
2014-08-22 10:31:30

atombrot (38 views)
2014-08-19 00:29:53

Tekkerue (34 views)
2014-08-15 21:45:27

Tekkerue (32 views)
2014-08-15 21:22:17

Tekkerue (20 views)
2014-08-15 21:20:21

Tekkerue (30 views)
2014-08-15 21:12:11

Rayexar (66 views)
2014-08-10 17:49:23

BurntPizza (43 views)
2014-08-09 12:09:32

BurntPizza (34 views)
2014-08-07 17:01:56
List of Learning Resources
by Longor1996
2014-08-16 01:40:00

List of Learning Resources
by SilverTiger
2014-08-05 10:33:27

Resources for WIP games
by CogWheelz
2014-08-01 07:20:17

Resources for WIP games
by CogWheelz
2014-08-01 07:19:50

List of Learning Resources
by SilverTiger
2014-07-31 07:29:50

List of Learning Resources
by SilverTiger
2014-07-31 07:26:06

List of Learning Resources
by SilverTiger
2014-07-31 02:54:12

HotSpot Options
by dleskov
2014-07-07 16:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!