Layered Depth Image…?

@rhavin said: Look at the code, it doesnt matter if u use parallax map or normal-map with alpha. the result is the same: you dont offset the pixel, you offset the pixels tex-coordinate. i want to offset the pixel.

You can’t. The pixel location has been decided before the .frag is ever run. You can’t move it. You can’t even change its screen Z value. It’s fundamental to the graphics pipeline.

If it does not change when you change the files, certainly it does not load the right files.
Have you renamed them ? Beware, you have to change the JM3D file to point to your versions.
If you did not, it certainly loads those from the JME jar files.

@pspeed said: You can't. The pixel location has been decided before the .frag is ever run. You can't move it. You can't even change its screen Z value. It's fundamental to the graphics pipeline.

Ok, that gives me something to chew:

so we’re at a stage, where have a triange in 3d-Space and we have one value determining its height. that cant work, of course. But if we had a 3d (RGB) heighmap encoding for every pixel of the planar triangle its resulting depth vector – we would have some kind of hologram and could have render real 3d texture, isnt it?

The visual result of parallax mapping + normal mapping is that the surface is moved in the z-plane, if thats not what you want it sounds more like its geometry shaders you’re looking for but they won’t allow you deformations beyond the vertex level either, as @pspeed hinted this is kind of inherent with how OpenGL works. I guess thats why they call it “fragments” and don’t re-use some name like “pixel” or anything.
The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless there’s emotes that hint otherwise or there’s an increased use of exclamation marks and all-capital words.

@rhavin said:
Ok, that gives me something to chew:

so we’re at a stage, where have a triange in 3d-Space and we have one value determining its height. that cant work, of course. But if we had a 3d (RGB) heighmap encoding for every pixel of the planar triangle its resulting depth vector – we would have some kind of hologram and could have render real 3d texture, isnt it? It would not work for something that is heigher that the triangles surface, but is should work for something that is deeper… It would be the same effect like looking into a hologramm, just that this one would be color-correct :wink:

sorry for reposting, something went wrong…

@norman: you dont need, you stay in the plane, you just offset the displayed content. all it should take is a RGB-heighmap (3D) and a couple of math.

Like so? Still parallax mapping techniques. Did you try steep parallax mapping? And I guess you don’t have an actual use case to really be able to say what a good solution would be?

http://hub.jmonkeyengine.org/forum/topic/steep-parallax-mapping/

The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless there’s emotes that hint otherwise or there’s an increased use of exclamation marks and all-capital words.

@normen said: Like so? Still parallax mapping techniques.

Kind-of, But what i’m talking about, would – minus the sphere – just need 2 Triangles.

This is just one quad with a parallax map too. I think you try to invent something thats already invented.
The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless there’s emotes that hint otherwise or there’s an increased use of exclamation marks and all-capital words.

@normen said: This is just one quad with a parallax map too. I think you try to invent something thats already invented

What happens if u look at it at 8°?

You don’t see most of the “content”. See, I am not here to advertise something or to prove you wrong, just to present a solution if you actually seek one. If this is educational, just go ahead and code it and compare with whats there. Do your own image format and editor if needed, I won’t keep you from it. I just say you should extend your research to parallax mapping before you try to reinvent some wheel. You see any map is just an array of floats in the end, theres no need to have some data in a special buffer, so theres also no need to forcefully use the depth buffer for that, a height map is fine.

The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless there’s emotes that hint otherwise or there’s an increased use of exclamation marks and all-capital words.

You can’t move the pixel on screen. You can only move what it points to in the texture. Period. Your graphics card cannot do otherwise because it is blasting N number of pixels simultaneously and could not possibly deal with the collision of having all of its pipelines potentially writing to the same pixel.

So the triangle will always be flat. ALWAYS. (I capitalize for stress not anger.)

You can make it look unflat by changing which part of the texture is picked… but the bumpy surface will never appear to be outside the bounds of the original flat shape. If you look at it directly on end it will look flat from the surface up. You can make it look like their are bumps below the surface (as in Normen’s example) but this is an optical illusion. The triangle is still flat, it’s still flat in the z-buffer, etc… So even if it looks bumpy, an intersecting object will be intersected as if it is flat.

This is a fundamental law of the universe.