0

How to change texture/draw on certain areas of an imported obejct with Helixtool?

Georgiana Manolache 9 years ago updated by Lucas Silva 9 years ago 1

I would like to only change material in certain parts of my imported object. I want to simulate brain activity. I am using an imported .obj and I would like to draw/change texture of the object only on the right side. Is that possible within Helixtoolkit?

+1

Yes, its possible.


If you work with a complex material, you need to create a MaterialGroup and Add all materials that will make your final material.


To apply the material in your model, you need to do this (Vb.net)


TryCast(mObj.Content, GeometryModel3D).Material = MaterialGroup

TryCast(mObj.Content, GeometryModel3D).BackMaterial = MaterialGroup


If you don't need back, just does not use them.


Example Basic Material with Image:


Dim b As New ImageBrush(TryCast(myImage, BitmapImage))

b.TileMode = 1
b.Viewport = New Rect(0, 0, b.TileMode, b.TileMode)
b.Opacity = 1
vMat = New DiffuseMaterial(b)
TryCast(vMat, DiffuseMaterial).Color = Colors.White