How to unhide object's especially part?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
go
Posts: 28
Joined: Mon Oct 20, 2008 7:53 am

How to unhide object's especially part?

Post 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
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Re: How to unhide object's especially part?

Post 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... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Lambda
Posts: 126
Joined: Wed Feb 27, 2008 3:00 pm
Location: Spain, Huelva
Contact:

Re: How to unhide object's especially part?

Post 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
Image
go
Posts: 28
Joined: Mon Oct 20, 2008 7:53 am

Post 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
go
Posts: 28
Joined: Mon Oct 20, 2008 7:53 am

Post 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.
go
Posts: 28
Joined: Mon Oct 20, 2008 7:53 am

Post 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;
go
Posts: 28
Joined: Mon Oct 20, 2008 7:53 am

Post 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)
Lambda
Posts: 126
Joined: Wed Feb 27, 2008 3:00 pm
Location: Spain, Huelva
Contact:

Post 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.
Image
Post Reply