Game Development Community

possible? material with bump map but without diffuse map?

by deepscratch · in Torque 3D Professional · 07/07/2009 (11:32 pm) · 11 replies

hi all,
is it possible to have a material with bump map but without diffuse map?
I'm working on vehicle and tank tracks, footprint also, but only want the bump map to show, not the diffuse map.
why?
well, go driving or walking in soft ground, on grass, or on sand, you will leave indented marks on the surface (bump map),
but you aint gonna leave a colored mark (diffuse map)
a touch of realism is wha I'm after.
ideas? possible?
thanks

#1
07/08/2009 (2:06 am)
Hey there! Its been absolutley AGES since I roamed these parts as such, I just have NO time anymore :( Im quite possibly the worst contributor in history...

But anyways, I will try to reply to this as I had this same issue a year or three back when I was working with TSE. I was after an effect almost exactly what you seem to be after. But the process I went through might have been a bit too tedious. Anyways, by memory, I will try to run through what I did to get a decent result.

Firstly, I was trying to work with an alpha channel of my diffuse map, but that didnt quite work, because at the time, I didnt realise that the generated normal map was basing its calcs of the actual pixels from the diffuse...

so what I did was thus...

I had an original copy of the diffuse map.

I then made a greyscale copy of the image.

Then, I think it was with GIMP, I edited out all non-essential references on the image.
Anything I could make transparent, I did.

Then when it came to highlighting the grooves of the track, or footprint, I darkened and lightend the respective regions.

The finsihed product was an almost totally transparent image, yet with all the right indentations highlighted.

I then SAVED this image, Say, as Foot_Diffuse1.png

Then from THIS image, since it was already grey, I made it my heightmap.
Saved as Foot_HeightMap1.png

Then from my heightmap, I converted the image into a normal map.
saved as Foot_Normal.png.

Then, with gimp, I merged the Foot_HeightMap and Foot_Normal into a single .DDS image.

I then was able to apply the dds to my diffuse file as a custom material.

Now, Technically, I KNOW you were after a diffuse-less based solution, yet when I was trying this, I didnt realise that it DOES need a diffuse of somesort to base its height/depth calcs.

The diffuse I made was almost totally transparent, so you could lay it down as a decal or whatever, and ONLY the grooves of the shoe or tire tread would be showing... so it was in no way looking overly dominant in any way... then applying the custom material to this, I must admit, that the reults were MOST satisfying...

I HOPE this was SOME help to you. I hope to come back here a bit more often.

Im in a bit of a rush now as we speak :( ... Perhaps someone who is much more dedicated than I can be of much better service to you.

Anyways, best of luck in whatever you "discover". :)

All the best,

Daniel.


#2
07/08/2009 (2:31 am)
wow Daniel,
some people dont say much, but when they do, you should listen.
excellent, just what I was after, thanks a ton,
and I hope to see you around more!
cheers, and thanks!
#3
07/08/2009 (7:45 am)
Deepscratch, remember a normal won't display outside of direct light. So if you tire/tread track is in a shadow, nothing is going to be visible.

How about a fully transparent diffuse, a normal, and a detail map set to scale 1? Or a semi transparent diffuse? Something to make the tracks visible in shadow.
#4
07/08/2009 (9:26 am)
tell me more Steve, sounds good.
Ive been trying to get a semi transparent diffuse to work, not much luck, its like either on or off,
are transparent/semi-transparent decals even possible with T3D?
#5
07/08/2009 (10:08 am)
here is a screen shot, showing the problem

img210.imageshack.us/img210/6022/tiredecals.jpg
the texture is 50% opaque, with a bump map, but the transparency wont show,

ideas?
#6
07/08/2009 (11:14 am)
The devs did say that there are currently a few issues with transparency still, but that they're sorting it all out.

I've got a transparent window with a normal map. The alpha channel of the diffuse texture is 50% grey (RGB 128 128 128).

new Material(glass_amber)
{
   mapTo = "glass_amber";
   pixelSpecular[0] = true;
   specular[0] = "0.76 0.5 0.01 0.5";
   specularPower[0] = 16;
   diffuseMap[0] = "art/shapes/afb/glass_amber";
   normalMap[0] = "art/shapes/afb/window1_afb_nm";
   materialCategory = "Uncategorized";
   translucent = 1;
   translucentBlendOp = Add;//I want it a bit lighter
   translucentZWrite = 0;
   alphaRef = 0;  // anything below this number is not visible and is not written to zbuffer
   alphaTest = "0";
   emissive[0] = "1";//this will be off eventually
};

I'm using emissive just until alpha gets fixed - just to force it to show the texture at all times. Currently there's a lighting/sun direction rendering issue.

I'm using DDS.

I've not tried this with decals ... or messed with decals at all ... so have no idea whether it's hugely different from normal materials and meshes.
#7
07/08/2009 (11:34 am)
Quote:
are transparent/semi-transparent decals even possible with T3D
Projectile decals come to mind...
i167.photobucket.com/albums/u143/heretek/screenshot_001-00000-1.png
...or did I change those after Beta3?

Footprints are semi-transparent too. You should be able to setup any and all material effects for decals as you can any other "object", but yeah beware of not having any diffuse for shadowed or non-lit materials -- especially if you want to see them..
#8
07/08/2009 (12:00 pm)
...or did I change those after Beta3?

dont know, we still on beta 3


its strange, cause I did in fact set the material up after the footprint material.
#9
07/08/2009 (12:14 pm)
With the constant changes, I loose track... I didn't even install Beta1 or 2 until someone reported a multiplayer problem with Beta2. I only had Beta3 installed for a few days so I don't really remember what I've changed before or after it's release.

What are you using to produce your transparent/translucent image files? Some apps do seem to have problems in that area.

Here's the current decal materials that I'm using
singleton Material(DECAL_RocketEXP)
{
   translucent = true;
   translucentBlendOp = Sub;
   translucentZWrite = true;
   mapTo = "rExplosion.png";
   diffuseMap[0] = "art/decals/rExplosion.png";
};

singleton Material(DECAL_scorch_green)
{
   translucent = true;
   translucentBlendOp = AddAlpha;
   translucentZWrite = true;
   emissive[0] = "1";
   mapTo = "greenSplash.png";
   diffuseMap[0] = "art/decals/greenSplash.png";
};

I almost started to include normals for those decals but ended up not doing so -- even though the green (whatever that thing is) did look pretty cool with specularity making it sparkle.
#10
07/08/2009 (12:20 pm)
oohhh,
its getting better,
Michael, you are on the right track,
no pun intended.
#11
07/08/2009 (12:48 pm)
ok, now that the decal materials are sorted,
time to fix the crash,
yay, new thread coming.
and if I can get it sorted, I'll release a "tire decals" resource.