My CubeMapping Doesn't look right

Blitz3D Forums/Blitz3D Programming/My CubeMapping Doesn't look right

FBEpyon(Posted 2008) [#1]


I have been trying to get the cube mapping to reflect the terrain, but I can't seem to figure it out why its not workin...


Ross C(Posted 2008) [#2]
You need to give slightly more information about what your doing. Are you using a seperate render to render the reflection? Are you positioning your camera at the reflection point? Whats your code? etc :o)


FBEpyon(Posted 2008) [#3]
The camera is positioned just about the water plain..

as for the cubemapping code its just excately the same copy/pasted from the example on the blitz3d..

Also the cubemap is updated using a delta timer..


_33(Posted 2008) [#4]
cubemapping for water is a big waste of processing. Because, in cube mapping, you are sampling 6 camera angles. But, your water is only one place... Why not just do a mirror for the water? There is a mirror code example in the code archive. If you want to use a bump mapped water with reflection, then it is another case.

http://www.blitzbasic.com/codearcs/codearcs.php?code=1524


FBEpyon(Posted 2008) [#5]
Yeh im trying to get bump mapping in later, but I thought I had to get the cubemapping working first..

EDIT:::

I tried the mirror code, but it doesn't make any difference.. I get 300-400fps with both with flip false.. so I will stay with cubemapping, I just can't seem to get it to work the right way.. :(

Also My water will be thru out the whole level.. once I get the zoning in the engine.. But I won't run the cubemapping until Im in that zone..


Doggie(Posted 2008) [#6]
ok...


FBEpyon(Posted 2008) [#7]
Once again..

I forgot to say Im trying to do this with out any dlls..

Is there anyway or is there something wrong..?


Ross C(Posted 2008) [#8]
What to do is hide your main camera and enable your cubemapping camera. That way you can see exactly what the camera is rendering.


Naughty Alien(Posted 2008) [#9]
..what about posting some code so we can dig into it?


FBEpyon(Posted 2008) [#10]
k.. just so u know I switched this over to minib3d, same code, but its still not workin in either..

Cube Map Code..



I found this code in the code arcs, but I have tried like 4 different versions!!



Sorry for the lack of comments, most of this is coding on the fly type stuff.. Im basicly testing myself so I can make this into a fully functional engine for a few games im planning..

:EDIT:

I got it working sorta, but its not lining up right, I noticed that I forgot to update the normals of the water.. :) but I don't understand why its off..

Okay I just figured out Cubemapping sucks for when you have a camera that moves.. :( because it makes the cube mapping all messed up, but if I was at one height it works fine.. very strange!!


_33(Posted 2008) [#11]
With regular blitz3d, I don't do water, but I use instead libs such as AShadow, DevilShadow System (free), or FastExt. I suggest anyone of those, but the one that have best result so far is AShadow's water, which looks really good if you can use it properly. But, if you run minib3d, then ignore all of those...


Ross C(Posted 2008) [#12]
No offense here, but could you post Blitz3D code. It's not much use if i can't compile it in blitz and see what the trouble is. Plus, i don't quite understand the differences in bmax, so mistakes are harder to spot.

If you want help on that code, post it in the blitzmax forum.

Thanks you :o)


FBEpyon(Posted 2008) [#13]
there isn't much difference in the code..

but I have decided to switch this project fully over to B3d. minib3d has a few things i Have seen that need to be fixed, and b3d has alot more to offer when it comes to libs like you said...

I tryed Devilshadow and its great.. so that was what made me switch back.