Basic material properties: diffuse, specular, emissive
by Funky Diver · in Torque Game Engine · 03/03/2006 (10:24 am) · 7 replies
Greetings
I'm looking at implementing basic additional material properties into the TGE rendering pipeline: diffuse, specular, emissive. The purpose of it is to allow rendering plastic-like materials without textures (the way you can do with OpenGL examples from Red Book or NeHe), and, obviously, I dont need shaders to do that.
I guess, what should be done is:
*) Update Material Manager
*) change the way an object shape is rendered
Should be there anything else?
Is DIF/DTS formats can carry this information for object materials, or I will need to come up with a new mesh format? (I cannot find docs for DIF/DTS fortmats, sorry)
Thank you!
I'm looking at implementing basic additional material properties into the TGE rendering pipeline: diffuse, specular, emissive. The purpose of it is to allow rendering plastic-like materials without textures (the way you can do with OpenGL examples from Red Book or NeHe), and, obviously, I dont need shaders to do that.
I guess, what should be done is:
*) Update Material Manager
*) change the way an object shape is rendered
Should be there anything else?
Is DIF/DTS formats can carry this information for object materials, or I will need to come up with a new mesh format? (I cannot find docs for DIF/DTS fortmats, sorry)
Thank you!
#2
I need low-end card support, and Linux and Mac support.
03/03/2006 (7:36 pm)
The same reason why I bought a 3000 pounds car instead of a 6000 pounds one ;)I need low-end card support, and Linux and Mac support.
#3
Say my shape is called Jerry. The engine, when I added Jerry, would look in the material.cs file for a datablock called Jerry. In the datablock there would be speclevel(), diffcolour() and emmitlevel()
materialmap( Jerry )
{
speclevel='red-blue-green-strength';
diffcolour='red-blue-green-alpha';
emmitlevel='red-blue-green-intensity';
}
I have no idea how to add this to the game, but you could probably use it directly through OpenGL.
03/03/2006 (9:48 pm)
You could add a function to the engine that looks up a shapename in the Materials.cs file.Say my shape is called Jerry. The engine, when I added Jerry, would look in the material.cs file for a datablock called Jerry. In the datablock there would be speclevel(), diffcolour() and emmitlevel()
materialmap( Jerry )
{
speclevel='red-blue-green-strength';
diffcolour='red-blue-green-alpha';
emmitlevel='red-blue-green-intensity';
}
I have no idea how to add this to the game, but you could probably use it directly through OpenGL.
#4
Right, I was thinking about this as a workaround...
It seems like DTS/DIF formats do not have entries for material properties and it seems very strange to me (was it made in a hurry? Not well thought through?)
Anyway, datablocks are the way to go...
03/03/2006 (10:07 pm)
Good point, MincetroRight, I was thinking about this as a workaround...
It seems like DTS/DIF formats do not have entries for material properties and it seems very strange to me (was it made in a hurry? Not well thought through?)
Anyway, datablocks are the way to go...
#5
03/03/2006 (11:23 pm)
Well .dts objects have environment mapping booleans for their datablocks, maybe look at what that is doing?
#6
Here's a pic from my profile and a 7mb wmv of what we quickly threw together last October to show at IGC.

s93153354.onlinehome.us/Oust_s.wmv
The pic doesn't really show off shiny materials very well, but there's quite a bit in the video, rocks, metals and some plastic/grimed paint surface. I'm hoping to play around with the lighting pack soon and see what can be done with that. From what I have seen you can get some specular effect through the lighting in there, allthough probably not as much control as being able to adjust in the material. I'm mostly interested in the nicer lighting, and non DIF's casting shadows.
Lots of possibilities to be had :).
Here's Matt's resource for 3ds:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=506
and:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5502
03/03/2006 (11:25 pm)
It's quite possible. We have a custom geometry loader, you could try doing something with the 3ds loader reasource to make your own custom geometry format.Here's a pic from my profile and a 7mb wmv of what we quickly threw together last October to show at IGC.

s93153354.onlinehome.us/Oust_s.wmv
The pic doesn't really show off shiny materials very well, but there's quite a bit in the video, rocks, metals and some plastic/grimed paint surface. I'm hoping to play around with the lighting pack soon and see what can be done with that. From what I have seen you can get some specular effect through the lighting in there, allthough probably not as much control as being able to adjust in the material. I'm mostly interested in the nicer lighting, and non DIF's casting shadows.
Lots of possibilities to be had :).
Here's Matt's resource for 3ds:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=506
and:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5502
#7
@Adrian: Good looking mission! Nice job. I did notice some shiny materials while watching the video. I may look into developing a custom format as well, thanks a lot for the links!
03/04/2006 (3:06 pm)
@Paul: excellent hint, I look at it! Thank you! That way I can define material properties per object,I guess.@Adrian: Good looking mission! Nice job. I did notice some shiny materials while watching the video. I may look into developing a custom format as well, thanks a lot for the links!
Associate Anthony Rosenbaum