Jump to content

Force order of drawing?


JCPalmer
 Share

Recommended Posts

I have eyes which move randomly.  Some positions cause them to break the skin in places.  Was thinking if the eyes painted first, before the body, then this would not occur.  Two questions:

Will order affect outcome?

Is there some kind of simple way to do this?  Maybe a method like :

scene.prioritize(eye_L, body);
scene.prioritize(eye_R, body);

This could maybe sort stuff, so it will just work out perfect, without any render loop overhead.  Any thoughts?

Link to comment
Share on other sites

Not looking good.  Eyes are instanced after body, since they are child. I think I cause the order to change with this later:

var scene = body.getScene();
scene.removeMesh(body);
scene.addMesh   (body);

Might help with ties, but with float 32 that would be rare.  Think setting back very slightly will be the next thing I try.  When combining facial expressions, eye rotation, & blinking, things are just too tight.  Let me know, if I have missed something.

Link to comment
Share on other sites

Backing in relative terms, since make human can be measured in inches, decimeters, & meters worked.  May need to allow customization of the multiplier, but this was the minimum back off that worked. hardly noticeable, unless you knew it was done. shhh.

var boundingBox = this._leftEye.getBoundingInfo().boundingBox;
this._leftEye .movePOV(0 , 0, boundingBox.maximum.z * -0.15);
this._rightEye.movePOV(0 , 0, boundingBox.maximum.z * -0.15);

 

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.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...