Cube Mapping Help

Blitz3D Forums/Blitz3D Programming/Cube Mapping Help

ckob(Posted 2003) [#1]
Alright ive tried to figure this out and even looked at robs demo 1 code and im doing everything right. I've had this problem since the first day of the new update when I try to do reflective water or cube mapping I get weird textures appearing. The same thing happens even if there is nothing but the water in the scene and the textures arnt always the same they kinda look like tilesets or something im not sure but heres a screenshot look in the right part of the water it should reflect tree's but instead it is reflecting something else :/




Michael Reitzenstein(Posted 2003) [#2]
When using cubic maps for reflection, they increasingly become distorted away from the place where you rendered the cubic map from. This is normal. You cannot get cubic maps to reflect perfectly like this.


ckob(Posted 2003) [#3]
maybe your misunderstanding me, The right side of the small pong is reflecting nothing there isnt anything there yet you see some sort of texture or somthing as I said before it isnt the same texture everytime. hereis another shot with the same problem...now I can run robs demo 1 and it works fine so its gotta be something im doing in code ive even copy and pasted most of robs code into mine deleting all my reflection code cause I thought that was the problem...am I missing some importent step? as far as reflecting perfect i dont care it looks fine the part that is actually reflecting




Michael Reitzenstein(Posted 2003) [#4]
It looks a *lot* like you have applied the wrong texture to the wrong face.


fredborg(Posted 2003) [#5]
Your cube map resolution, may be beyond that of the screen. Try lowering the resolution to be within the screen size.

If you are running 640x480 the maximal cube map resolution is 256x256...


Michael Reitzenstein(Posted 2003) [#6]
That screenshot is of 1024x768, and the cube map doesn't look detailed enough to be 1024x1024 - you can count the pixels easily.


Ziltch(Posted 2003) [#7]
Cube mapped texture faces do not seem to be cleared at the start of a program.

This means if you do not render to all of the cube sides, then patterns from the uncleared memory in the texture buffer appear.

I have got many strange looking results with my cube map tests so far!


ckob(Posted 2003) [#8]
any ideas on how to fix this then?


fredborg(Posted 2003) [#9]
If you showed the code, it would be a zillion times easier to tell you what is wrong.

One idea: Are you sure you are setting the right cube face before using copyrect?


jfk EO-11110(Posted 2003) [#10]
I guess from what Ziltch said you need to render all views at least one time right at program start.