Game Development Community

Cubemap Mip Maps

by Felix Willebrand Westin · in Torque 3D Professional · 07/22/2014 (6:18 pm) · 7 replies

Hello boys and girls!

I am currently reworking how shaderGen works a little bit and adding stuff like normal mapped cubemap reflections, rim lighting and vertex alpha blending. Here's some progress shots (materials courtesy of Quixel):

puu.sh/an8lL.jpg

puu.sh/ancTv.jpg

(click for bigger images)


Some vertex alpha blending (normal map blending has yet to be implemented for cubemap and rim light passes):

puu.sh/an9DP.jpg

Right now I am looking into how gloss maps are handled, and I just noticed that cube maps created in Torque do not have mip maps. If they did, I could add code for blending these using the gloss map which would result in some really nice material definition, like this:

puu.sh/an3K3.jpg

I noticed that the HLSL code for this works (texCUBElod and texCUBEgrad), it's just that the cube maps don't seem to have working mips. Adding mip maps to the individual cube faces didn't yield any results, and I had a look around the code for handling cube maps, however I was unable to find anything.
Was just wondering if anyone has had a look into this or might know what's up?

About the author

Hobbyist turned game dev. Worked at DICE for a short while, now working on personal stuff and Dota 2 things.


#1
07/22/2014 (8:33 pm)
stab in the dark?
#2
07/22/2014 (8:37 pm)
Oh, that looks very relevant! Going to look into this...
#3
07/22/2014 (8:43 pm)
Could be. failing that, I'd crosscheck the code, see if you're running afoul of anything that might be hitting a GFX_ImplementTextureProfile with an GFXTextureProfile::NoMipmap entry.
#4
07/22/2014 (10:14 pm)
You owe me a new keyboard, Felix, because these awesome screenshots made me drool all over my keyboard.
#5
07/23/2014 (6:52 am)
Had a go at that code and also looked into where GFXTextureProfile::NoMipmap is used, but no luck. Going to keep trying but I suspect this stuff is a bit too low level for me to wrap my head around...
#6
07/23/2014 (6:57 am)
impressive/10.
Technically, don't we already have access to alpha blending due to Sahara being open sourced?

www.garagegames.com/community/resources/view/22781
www.garagegames.com/community/forums/viewthread/138296/
And it's acululation feature:


#7
07/23/2014 (12:45 pm)
Impressive, yet again. What exactly did you do for Dice again? :-). I would be VERY interested in the rim-lighting WIP. As for your question, well, it would totally be a matter of programming the cube maps to use mip-maps.

(This is what you get when 15 programmers are given tasks to accomplish. A direct reference to the Instant Action Days/T3D dev days of GG.) They did some really good work but, it is another example of inconsistent coding and behavior practices across the board. I can't foresee this being a 'major' hurdle to overcome. However, this is exactly why some settings take values of 1 to 100 or more and others take settings of .01 to 1.... standards were not maintained across development. So, no it is not surprise that 90% of textures and maps use and function well with mip-maps and the reflect/sky domes do not.

Ron