Jump to content

Highlighting an object ... but without the Visualizer?


photo

Recommended Posts

Hi,

I'd like to be able to highlight a specific object at runtime, by adding some kind of transparent overlay over it for a short duration. The object may be any StaticMesh, but it's existing material must remain untouched.

The Visualizer::renderSolidObject() would fit my need, but as it's a Visualizer call, it requires that the Visualizer is enabled. But enabling it would also render visible a lot of debug traces we don't want the customer to see.

What would be an easy solution?

Link to comment

Alas I know about this one, but the issue here is I must not modify the material in any way. To be more explicit, the material may already use Auxiliary for other purposes, or it may be a material graph that doesn't expose the auxiliary channel.

So the only way I could think off is to redraw the meshes with an alternate material, but how can I do that?

Link to comment
Quote

So the only way I could think off is to redraw the meshes with an alternate material, but how can I do that?

You could switch to a clone of the object with a different material. Then Unigine would handle rendering.
 

Link to comment
1 hour ago, devrom said:

You could switch to a clone of the object with a different material

How could I do that, without preparing in advance the cloned object. Everything must be done at runtime.

Link to comment
Quote

How could I do that, without preparing in advance the cloned object. Everything must be done at runtime.

Nothing hinders you to call clone on a node during runtime. Of course it would not be optimal for large amount of nodes but if its only one node at a time like in your case it should not be a problem.

Link to comment

Hi Stephane,

You can render objects into a separate texture that you could use as a mask. Notice that you actually want to render only the depth of selected objects.
Then just apply custom post effect / scriptable material that will use this mask to determine where to draw an outline.

Link to comment
×
×
  • Create New...