Page 1 of 1

How to unhide object's especially part?

Posted: Fri Nov 21, 2008 2:11 pm
by go
Hi, I'm now making anlyzing application.


I know ISceneNode itself can unhide for using setVisible function. But I don't know how to unhide Object's especialy part.

I tried getJointNode but can't unhide object.

Is there any way to unhide especially parts?

Thanks

Posted: Fri Nov 21, 2008 2:59 pm
by hybrid
No, that's not possible. Except if you want to override the material to complete transparency... Better split up your mesh into several nodes.

Re: How to unhide object's especially part?

Posted: Fri Nov 21, 2008 3:13 pm
by Acki
go wrote:Is there any way to unhide especially parts?
no, there isn't...
if you want to hide parts of a node then you'll have to create this parts as single objects/nodes... ;)

Re: How to unhide object's especially part?

Posted: Fri Nov 21, 2008 9:06 pm
by Lambda
Acki wrote:
go wrote:Is there any way to unhide especially parts?
no, there isn't...
if you want to hide parts of a node then you'll have to create this parts as single objects/nodes... ;)
You can hide a meshbuffer, i have done it on my custom irrlicht engine build.

Irrlicht splits the mesh into meshbuffer's, each material = different meshbuffer

Posted: Sat Nov 22, 2008 4:56 am
by go
Thanks for reply's

And I want to know the sample source to hide specially part. maybe it is also helpful for some people who want to know this way too.

Thanks

Posted: Sat Nov 22, 2008 5:45 am
by go
I am not willing to get complete transparency,

so i think it can be done to use CMeshbuffer's getMaterial function to get Material info and set Material's value.

But I don't know what parameter is important or not.

Is there anyone who knows these settings?

Thanks.

Posted: Sat Nov 22, 2008 6:45 am
by go
This is not Transparent sample, but I found MeshMaterial can set for specific part

Not good part for this sample is I can't get MeshBuffer name specific like
getMeshBuffer("chestR");

Thanks

Code: Select all

  scene::IAnimatedMesh* pinMesh = smgr->getMesh(chest.c_str());
  if (pinMesh == NULL)
    return 1;

  // MeshBuffer
  scene::IMeshBuffer *mb[2];

  std::cout << "mesh cout is " << pinMesh->getMeshBufferCount() << std::endl;
  mb[0] = pinMesh->getMeshBuffer(0); 
  mb[1] = pinMesh->getMeshBuffer(1);

  video::SMaterial & sm = mb[0]->getMaterial(); 
  video::SMaterial & sm2 = mb[1]->getMaterial();
  
  sm.Wireframe = true;
  sm2.PointCloud = true;

Posted: Sat Nov 22, 2008 7:42 am
by go
I think when "PointCloud = true;" property's settings, Only Vertex is drawned. in draw function.

So It is not so much difficult to implement in irrlicht itself to not draw specified parts...(not to draw itself)

But not realzed how to do it..(maybe easy way is implement draw function to add some property to not draw everything, but I don't want to change irrlicht source code itself)

Posted: Sat Nov 22, 2008 12:33 pm
by Lambda
go wrote:I think when "PointCloud = true;" property's settings, Only Vertex is drawned. in draw function.

So It is not so much difficult to implement in irrlicht itself to not draw specified parts...(not to draw itself)

But not realzed how to do it..(maybe easy way is implement draw function to add some property to not draw everything, but I don't want to change irrlicht source code itself)

i have it done on the CAnimatedMeshSceneNode class, you need to learn how this class renders the node and then skip the selected meshbuffers.