Different mesh/material displays for different players
by David Stocker · in Torque 3D Professional · 10/22/2009 (5:19 am) · 1 replies
I'm working on a way to have players in an RPG experience the world differently based on race/skill combinations. E.g. A reptilian race that can see in the UV could see the tatoo that a human could not while another with infared B&W vision could see a bloom effect on warm objects, but see a strictly B&W world.
To do this, I�m trying to come up with a generalized way of displaying different mesh/material combinations of the same object for different players. I want to be able to have different players see different materials on the same shape and I want to be able to display different meshes, or hide them entirely. setCloaked and setHidden don�t work on players and anyway they work across the board. setSkin only works across the board.
Does anyone have any pointers as to where I should look to start working on this problem?
To do this, I�m trying to come up with a generalized way of displaying different mesh/material combinations of the same object for different players. I want to be able to have different players see different materials on the same shape and I want to be able to display different meshes, or hide them entirely. setCloaked and setHidden don�t work on players and anyway they work across the board. setSkin only works across the board.
Does anyone have any pointers as to where I should look to start working on this problem?
Associate Manoel Neto
Default Studio Name
A sorta streamlined way would be creating a MaterialSwitcher class, derived from BaseMaterialDefinition, where you specify multiple material fields (material[0], material[1], etc) and have a field that controls which material should be used (you'll also need a MaterialSwitcherInstance class for instances), then map this instead of using normal Materials.