Game Development Community

T3D Feature Request - Material->CustomMaterial Example / Guide

by Tim Dix (Raverix) · in Torque 3D Professional · 07/31/2010 (12:51 pm) · 10 replies

Right now, there seems to be absolutely no up-to-date documentation on CustomMaterials. We have several RenderExample classes in the engine, so what I'd love to have is a CustomMaterial(renderExample).I'd love to have an official example of how to emulate basic material from a CustomMaterial. IE: CustomMaterial which would support:

  • Diffuse Texture
  • Normal Map
  • Lighting
It would also be really nice to have some documentation on everything which can be passed from CustomMaterial, to the shader, and how they're mapped. If this exists anywhere, please point it out to me.

#1
07/31/2010 (2:12 pm)
Just documented it in the new Torque 3D manual (CHM format). That will be going up soon.
#2
07/31/2010 (2:15 pm)
You can find some info that already exists on TDN: Custom Materials in TGEA. Now the new docs will have things covered from a Torque 3D perspective, but you can still find some useful info in that TDN article.
#3
07/31/2010 (2:17 pm)
I'm glad that you've just documented it! The link you posted was a good start, but outdated, additionally, it only shows the CustomMaterial example, it doesn't show the shader that goes with it. It's that link between CustomMaterial->Custom Shader which I'm having the difficulty with at the moment.
#4
07/31/2010 (2:25 pm)
You'll be relieved to know the new docs in the CHM are up to date and have a better example. A nice improvement all together.

I should be posting these on Monday.
#5
07/31/2010 (2:27 pm)
Excellent, I look forward to Monday's update... for now, I'll continue to bash my head against the desk on something else :)
#6
08/04/2010 (3:35 pm)
I would like to reiterate my request for this. The documentation doesn't even mention the ability to put textures on a custom material, and there are no examples in the engine on how to do this.

Additionally, I found one reference here: http://www.torquepowered.com/community/forums/viewthread/106707 that we're now using a sampler field which hasn't been documented yet.

What I'm looking for, is simply a CustomMaterial which does the same job as Material, to use as a jumping off point. IE: Replace Gideon's Body Material, with a CustomMaterial, and have it render properly in game.
#7
08/04/2010 (7:36 pm)
I would really like to see an example for the new vertcolor flag for use in custom materials for the new beta, Ive been playing around with it and have yet to get a result i like....
#8
02/04/2011 (9:00 am)
Could someone direct me to the documentation that Michael Perry posted? I can't seem to find it anywhere, and I'm currently struggling with CustomMaterial work.
#9
02/04/2011 (9:15 am)
Shawn, the link works for me..what are you seeing when you click it ? (you need a TDN account and to log in, then come back here and click the link)

gameclay.com/documentation
liman3d.com/shaderpackvol1_overview.html
#10
02/04/2011 (9:19 am)
Ah, you know, I think I wasn't logged in before when I clicked on the link. Doh! Works now, thanks.

And thank you for the additional resources, I'll check them out as well.