Jump to content

Entity->FindChild->Hide doesn't hide


martyj
 Share

Recommended Posts

The resulting auto-created MDL from that FBX does not have a child mesh named "Top". But when I open the FBX in UU3D and save as FBX, then the resulting auto-created MDL model has a child named "Top". But if you perform GetClassName() on the entity:FindChild() result, then you see it is listed as a 'Bone'.

 

I can only get actual child meshes in the resulting MDL if I remove the bones/animations, save as FBX (with export groups as meshes option checked), and auto-create to MDL via the Editor. Doesn't appear that the current FBX to MDL converter allows for multiple children meshes with animation. It will allow multiple surfaces with animations though, so you may be able to just apply an invisible material to that surface you wish to hide?

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Since you are using the same material for both meshes/surfaces, I had to import the FBX in UU3D with the 'Merge similar materials' option unchecked. I was able to essentially create two separate surface materials when I resaved as FBX. Attaching the resulting FBX:

oak_02.fbx

 

You could also just use two different materials/textures as well on the original model before exporting to FBX to get the same results.

 

As for making the top part of the tree invisible, one of the ways it can be done is like this:

tree = Model:Load("Models/tree/oak_02.mdl")

topmat0 = tree:GetSurface(0):GetMaterial()

topmat1 = tolua.cast(topmat0:Copy(), "Material")

topmat1:SetBlendMode(Blend.Invisible)

tree:GetSurface(0):SetMaterial(topmat1)

 

I did the Copy since it was the same material being applied by default to both parts of the tree.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...