OpenGL Renderer bug 2 in 1

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Silbermünze
Posts: 34
Joined: Thu Sep 15, 2005 12:27 pm
Location: Stuttgart, Germany

OpenGL Renderer bug 2 in 1

Post by Silbermünze »

I am running a small test program derived from example 10.
All I do is loading a sphere from a 3ds file. This sphere should then be rendered using a v2 vertex-pixel-shader combo. Unfortunately I had to face really strongly diverging results using the OpenGL renderer.

Running my code on a laptop with a NVIDIA Quadro FX1400 GO (shader support v3), OpenGL 2.1.1. I got the following result.

Image

The rendering is basically correct, however you might notice the terrible triangulation.

The following result is taken from my desktop machine with a NVIDIA GeForce 8600GTS (shader v4 support), OpenGL 2.1.1.


Image

You might notice the good tesselation and the basically correct rendering
of the shader (dayside, terminator, night-side) however textures are missing. This stays the same if rendering with EMT_SOLID, until I add a light source an enable Lighting(which souldn't be necessary for shader lighting).

Finally an image from Rendermonkey where I test my shaders and which shows how the shader shoudl actually work:

Image

I wnat to mention that all screens (except the rendermonkey one) are taken with exactly the same code with Irrlicht 1.3.1. A switch to Irr.1.4b didn't improve the situation.

I assume this to be a bug in OpenGL. However I can't explain the differences in tesselation of the 3s (I wonder why there is tesselation, shouldn't it be displayed as specified in the file).

Hope some one can help and this post is not just vanishing in the forum like with so many posts I did before.

Thoran
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

It would probably be helpful if you could also post your example code, the 3ds and maybe also the texture somewhere.

Also it might help to know if you did run it on Linux or Windows and if you got other results with DirectX.

I don't know what is causing this. But I could run the test on my system if it where available to compare the results. You think of it probably only as trivial files, but I could not produce a sphere in 3ds format without finding some tool for that first, learning to use it, etc. And then even same formats often look different when exported from different tools (even if they shouldn't).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Silbermünze
Posts: 34
Joined: Thu Sep 15, 2005 12:27 pm
Location: Stuttgart, Germany

Post by Silbermünze »

I put up the code on my webspace.

The 3ds and textures are included. If you place it in examples of your Irrlicht dir it should compile out of the box.( replaces evt. existing 10.Shaders example).

I only run the code on Windows XP.

Your help would be greatly appreciated.

Thoran
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

On my tests on OpenGL/Linux I only got whitescreens. I will try to test it on windows when I find some time.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Silbermünze
Posts: 34
Joined: Thu Sep 15, 2005 12:27 pm
Location: Stuttgart, Germany

Post by Silbermünze »

CuteAlien wrote:On my tests on OpenGL/Linux I only got whitescreens. I will try to test it on windows when I find some time.
This is most likely due to a wrong media directory.


Edit:
Sorry, realized it too late that the following sentence is crap:

"When all is white it means that the bounding sphere is not loaded."

It should read:
When allis white it means that the skysphere texture is not loaded.
/Edit

Btw. The selection when prompted should be c, y, b for each of the 3 queries.

Thoran
Last edited by Silbermünze on Tue Nov 06, 2007 10:04 am, edited 1 time in total.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Don't use 3ds, the smoothing normals are not loaded. Use obj. I am not sure about the other error however. Are there any error messages in the console whilst running the app?

PS: Does your shader require tangents?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Silbermünze
Posts: 34
Joined: Thu Sep 15, 2005 12:27 pm
Location: Stuttgart, Germany

Post by Silbermünze »

BlindSide wrote:Don't use 3ds, the smoothing normals are not loaded. Use obj. I am not sure about the other error however. Are there any error messages in the console whilst running the app?

PS: Does your shader require tangents?
No I don't use tangents just normals.

If it has to do with smoothing normals, why are there different results on different hardware? Shouldn't it look the same on all machines?

Thoran
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, should give the same results. I also got the smoother, but white sphere. Will have to check on different platforms.
lester
Posts: 86
Joined: Mon Jan 29, 2007 3:33 pm

Post by lester »

hybrid, same for me. Just white sphere

Ubuntu linux 7.10, fglrx 8.42.3
Silbermünze
Posts: 34
Joined: Thu Sep 15, 2005 12:27 pm
Location: Stuttgart, Germany

Post by Silbermünze »

I want to mention that the uploaded code, currently doesn't use the shader, due to the follwoing code in line 494:

Code: Select all

if (vsFileName && psFileName && 0)
{
if you remove th " & 0" it should again use the shaders and not the EMT_SOLID anymore.

Sorry for the inconvenience.

In the meanwhile I have disabled loading of the textures for testing and I recognized the sphere being rendered completely black when the getTexture() methods are commented out. If I disable setting of the PixelShader constants for the texture samplers, the shade of the white is changing, while the sphere still stays visible. So at least the textures seem to have an influence in one way or another.

Thoran
Post Reply