Game Development Community

Detail, bump & reflection maps via max2dts

by Cisor · in Torque Game Engine · 04/11/2004 (2:30 am) · 13 replies

I'm a little confused by the statement that max2dts can't do detailmaps. See thread by Sven www.garagegames.com/mg/forums/result.thread.php?qt=16800

From a logical point of view, it doesn't make sense. If the engine intrinsically does cater for dts detail maps, then it was put there for use from 3dsmax by the Tribes folk. And hence, max2dts either has the code, or it was ripped from Tribes to torque. (Or so I'm thinking).

So I looked at the max2dts addMaterial function and all the detailmap, bumpmap and reflection map stuff seem to be there. (addMaterial is in shapeMimic.cc).

Firstly: You need a diffuse map.
It appears as if you have to assign both a diffuse map and a detail map in 3dsmax to get to use detail map or bump maps. (I don't think a diffuse color - rather than map - would trigger the detailmap et al, but it is seems easy enough to test).

Secondly: You put detail map in ambient color.

So, emulating Sven's example on a cube, I used a red map on the diffuse channel and a smoky detailmap on the ambient channel and got details on the red cube in the show tool. (No transparency, but that could just be a red diffuse map alpha-channel issue).

I haven't tried the bump or reflection maps, but they are used after detail maps, so the constraint requiring a diffuse map would apply.

Anyone else tried this?

#1
04/11/2004 (4:07 am)
As far as I know, bump maps on dts or dif shapes are not supported by the engine, at least not yet. However, TSE will probably add this feature. Reflection maps should work, although I haven't tried that myself, but there are a few threads about that.
#2
04/11/2004 (4:09 am)
If you borrow a model from Tribes II and put it in your game, you will see that reflection mapping is working.
#3
04/11/2004 (6:27 am)
Ok, so if reflection mapping is working, and I'm getting detail maps to work in the show tool, what's the problem with bump maps? (I seem to remember bump map code in materiallist and tsshape, so perhaps the problem is that it just hasn't been included tsShapeInstance?)

I'll check the code when I have some time.
#4
04/11/2004 (9:56 am)
There isn't any code to render bumpmaps in the engine. It was never implemented for Tribes 2. I'd guess it's presence in the materials code indicates it was on the schedule but was dropped.
#5
04/11/2004 (11:28 am)
Well, we have some emboss bump mapping for the terrain. But yeah, in general bump mapping isn't in the engine.

You could always add it.
#6
04/12/2004 (5:13 pm)
TSE does normal mapping quite handily, though. Yum.
#7
04/12/2004 (8:59 pm)
Heheh. Quite so. ;)
#8
04/14/2004 (1:30 am)
@Matthew, sorry that I confused you. Like I wrote this was as fas as I know ;-)
We don't have and don't use 3D Max (hope our little indie company get's some day that big, that we can use such tools ;-))
I thought this, because no one know about this. I don't find any tutorial for this.

So, maybe you can make a tutorial for the max exporter ?
#9
04/15/2004 (12:24 am)
Sven, no problem. You just raised the question (a good thing) so I looked into it. The max exporter exports detail maps if you use the steps I outlined above.
#10
04/17/2004 (6:57 pm)
To get around the bumpmapping issue for now I know in Maya you can bake the mutiple texture down to a single flat texture. this give the appearance of bump mapping. There is a plugin for doing this in 3ds max called "Flatten" that does the same thing.
Hope this helps
#11
04/18/2004 (4:11 am)
Thanks, James. Our modeller is a long-time baker, but since our project timeline allows for TSE we'll likely delay the more complex texturing until then.
Basically we're thinking there's very little point in enhancing the rendering pipeline until we see exactly what TSE does and how it does it.

Also, thanks to everyone contributing to this thread, and to Sven for instigating it.
#12
04/21/2004 (12:18 am)
Any clear date for TSE release, anyone? A month? half a year? Quite anxious yet nervous about the date. Hope it won't be too far away.
#13
04/21/2004 (12:19 pm)
It will be sometime very soon. Definitely less than half a year ;)