- Home /
Multi-layer character rendering
Hello everyone,
I have quite a problem and I have ran out of ideas how to solve it. For artistic reasons I have characters in my game composed of several meshes and I need to draw them over each other regardless of their position in the space, or more like I have one partially inside other and I need to draw it not obscured by the other.
For the first try I have used multiple cameras and layers but this approach works only for one character right in front of camera (components also draw on top of anything on top of the character).
I am thinking about about picking each object in the scene and feeding it it's position in the render queue according to it's distance from camera (and in case of an character the order of objects) but this seems to me a bit of a overkill and I wonder if there is another more elegant solution.
Thanks for any answer
Edit:
For greater clarity, like this:
I need to render the sphere whole on top of the cylinder, but not on top of anything else.
Is there some reason that you can just make them child meshes of a single object?
They are child meshes, don't see how that solves my problem (which can be easily attributed to the lack of imagination)
Solved, adding offset to Toon shader was a bit tricky (because of Fallbacks and Usepasses and none experience with shaders whatsoever) but this is the way to go. You should put it down as an Answer.
Answer by whydoidoit · Jul 01, 2012 at 05:47 PM
Yeah I've got it now. Looks like you either need a shader for the overlaid items with a large negative Z Offset or you should actually always pull the model towards the camera enough to overlay it. I could probably help you with the latter
Your answer
Follow this Question
Related Questions
Camera with background hides game 1 Answer
Multiple post processing profiles? 2 Answers
Camera layering with post processing? 0 Answers
Green Creep? Any idea what might be causing this visual glitch? 0 Answers
What's going on with rendering? 1 Answer