Need help with Torque 3D draw pipeline - Experienced Developer needed
by Leslie Solomon · in Torque Developer Network · 10/26/2010 (2:03 am) · 0 replies
Dear Developers - We are currently developing a spray painting simulation for training purposes. We have a technical question that maybe you can help us with, or you may be able to direct us to other developers who might be able to help. We have a design for the shaders and multiple render passes required, but we're uncertain how to implement this plan within the framework of the Torque 3d engine.
What we're attempting to do is to have one or more objects that, through the use of extra draw passes and custom shaders, draws itself from a different viewpoint and then uses the result of that pre-render to render into its own texture. Basically, we need to render the object into an intermediary texture, and then use that to render back on to the texture and normal maps for the object.
We decided to create our own object, descended from a "SceneObject". We based this roughly on the renderDelegate sample. However, unlike the renderDelegate sample, we're loading a model file into a TSShapeInstance and are trying to render that with our shaders.
There are three areas where we need help:
1) The immediate problem is that when we call GFX->setShader and then call render on our TSShapeInstance, our shader is not applied. We assume it's being replaced by some shader in the shape definition but can't find where or how to override it.
2) We want to verify that our design implementation makes sense. Is what we going about this the best way, or is there a better, easier, more efficient, way to draw into an object's textures?
3) We currently have specific questions in how to use the rendering system (see 1 above) and will probably have additional questions as we go. We are looking for someone to help us with the latter as they develop.
We greatly appreciate help in pointing us in the right direction and/or introducing us to anyone else who might be able to help us out.
What we're attempting to do is to have one or more objects that, through the use of extra draw passes and custom shaders, draws itself from a different viewpoint and then uses the result of that pre-render to render into its own texture. Basically, we need to render the object into an intermediary texture, and then use that to render back on to the texture and normal maps for the object.
We decided to create our own object, descended from a "SceneObject". We based this roughly on the renderDelegate sample. However, unlike the renderDelegate sample, we're loading a model file into a TSShapeInstance and are trying to render that with our shaders.
There are three areas where we need help:
1) The immediate problem is that when we call GFX->setShader and then call render on our TSShapeInstance, our shader is not applied. We assume it's being replaced by some shader in the shape definition but can't find where or how to override it.
2) We want to verify that our design implementation makes sense. Is what we going about this the best way, or is there a better, easier, more efficient, way to draw into an object's textures?
3) We currently have specific questions in how to use the rendering system (see 1 above) and will probably have additional questions as we go. We are looking for someone to help us with the latter as they develop.
We greatly appreciate help in pointing us in the right direction and/or introducing us to anyone else who might be able to help us out.