Game Development Community

MS 3.5 and Cubemaps

by Jeremiah Fulbright · in Torque Game Engine Advanced · 08/08/2006 (9:17 pm) · 5 replies

I was doing some experimentation with cubemaps and I noticed that it seems dynamic Cubemaps aren't properly working....

I have a dts object (ShapeBase derived) with a texture that has an alpha for the reflective parts. I set the dynamicReflection variable in the datablock, and I also set dynamicCubemap for the material definition...

I am not seeing anything that even remotely looks right, and just some general logging from the Engine makes it seem like it doesn't even create the cubemap properly..

Any help would be appreciated

#1
08/08/2006 (9:28 pm)
I did some changing in C++ and got it working.. sort-of.

img291.imageshack.us/img291/6970/base00000004nh4.png


That is "dynamic", yet it is showing a cubemap from I don't know what.. I am assuming that is a backbuffer or something from other stuff, but seems like an issue. I removed my Console logging and recompiled my exe and now the reflection broke again...


Edit:

I thought I might have found what it was, since I changed the Texture/Material loading to only be done as-needed, but with some logging that didn't seem to be case. I loaded 5 times and 2 out of 5 times the cubemap worked properly on one of the Shapes, but not on the other.


Any information or insight would be welcome
#2
08/12/2006 (1:34 am)
Based on your edit, sounds like maybe your change to material loading has broken it?

Does it work on a stock compile of CVS head?
#3
08/12/2006 (12:52 pm)
I will do some more testing, but I can re-instate the material loading properly with ease and it was still causing it... Of course, I'm more wondering what the Reflection was in that first screenshot, since I don't recognize it

If it was based on material changes, I would expect it to not be sporadic and instead happen consistently, but I will revisit it when it is trully needed. Especially since I do setup the cubemap information on material load, I just don't specifically load the actual Textures from disk until needed, so it shouldn't necessarily apply.

Plus I logged in alot of the places dealing with reflective sets and such and it was all coming thru okay (so it seemed)
#4
08/12/2006 (2:22 pm)
@jeremiah: Hmm... well it looks like you're drawing an empty but valid cubemap, ie, whatever was in memory where it was allocated is coming through nice and clear.

@everyone else: If anyone does find this doesn't work properly on CVS head, let us know. :)
#5
08/12/2006 (5:27 pm)
Yeh, it came thru clear, although I have no idea where that Image was... as I hadn't been in anything where I saw the image lol.. Though that was supposed to be a Dynamic Cubemap, but it wasn't "changing"... but that mightve been due to some of our codebase which I since changed after testing