HomePortalFAQSearchMemberlistUsergroupsRegisterLog in
Making threads to link to banned members content grants an automatic ban
Meet the new KITO admins & hear their plans here.
You can use google search to find threads and posts here now. Example

Share | 
 

 Bottom Teeth Fix

View previous topic View next topic Go down 
Go to page : 1, 2  Next
AuthorMessage
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 487
Join date : 2014-02-09
Age : 19

PostSubject: Bottom Teeth Fix   Sat Oct 25, 2014 6:06 am

Do you make presets? Have you ever made a skeleton? Those are pretty cool. So everything is goin great, but when you go to test it, you get this:

[You must be registered and logged in to see this image.]

What??? My teeth texture is transparent!! yudodis

It's ok. A simple source edit will fix that right up.

Open up MagixUnit and find

Code:
mBodyEnt->setMaterialName(tBodyMat);
 mHeadEnt->getSubEntity(0)->setMaterialName(tHeadMat);
 mHeadEnt->getSubEntity(1)->setMaterialName("TeethMat/TWOSIDE");
 mHeadEnt->getSubEntity(2)->setMaterialName("EyeModColour");

Here's the problem. In the head's mesh, it has 4 materials - the head, the top teeth, the eyes, and the bottom teeth. The source isn't recognizing the bottom teeth.

Change the lines to include a second teeth mat:

Code:
mBodyEnt->setMaterialName(tBodyMat);
 mHeadEnt->getSubEntity(0)->setMaterialName(tHeadMat);
 mHeadEnt->getSubEntity(1)->setMaterialName("TeethMat/TWOSIDE");
 mHeadEnt->getSubEntity(2)->setMaterialName("EyeModColour");
 mHeadEnt->getSubEntity(3)->setMaterialName("TeethMat/TWOSIDE");

Make sure to set the subentity right

Next, still in MagixUnit, find:

Code:
mBodyEnt->setMaterialName(tBodyMat);
 mHeadEnt->getSubEntity(0)->setMaterialName(tHeadMat);
 mHeadEnt->getSubEntity(1)->setMaterialName(tTeethMat);
 mHeadEnt->getSubEntity(2)->setMaterialName(tEyeMat);

And again, change it to include another teeth mat:

Code:
mBodyEnt->setMaterialName(tBodyMat);
 mHeadEnt->getSubEntity(0)->setMaterialName(tHeadMat);
 mHeadEnt->getSubEntity(1)->setMaterialName(tTeethMat);
 mHeadEnt->getSubEntity(2)->setMaterialName(tEyeMat);
 mHeadEnt->getSubEntity(3)->setMaterialName(tTeethMat);

Go test again:

[You must be registered and logged in to see this image.]

hot

EDIT:

If you have some heads with only a single submesh (the flat teeth) but some with two, here's a way to keep both.
Spoiler:
 

any questions feel free to message me


Last edited by Hyper on Sat Sep 26, 2015 5:27 pm; edited 1 time in total
Back to top Go down
http://azoptaos.boards.net/
RedEye
Retired
avatar

Game username : -redeye-
Server : KITO
Male Posts : 2575
Join date : 2011-07-24
Age : 30

PostSubject: Re: Bottom Teeth Fix   Sat Oct 25, 2014 6:55 am

Noted. Will be fixed for future releases

Oh, and thanks.

________________________________
Retired
Back to top Go down
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 487
Join date : 2014-02-09
Age : 19

PostSubject: Re: Bottom Teeth Fix   Sat Oct 25, 2014 10:09 pm

Seems like there's more to it than this. Released the game with the fix and people can't create characters Razz Ogrelog reports a crash right after loading the eyemat, aka where I added the teeth mat.

Lookin for a fix now

EDIT

Looks to me like the game can't read the new subentity. Is there somewhere that defines how many the head has? I've been looking but I don't see anything


Issue is with the original heads. They lack two teeth submeshes, making the game crash when it tries to read the second one

All but Head1 and Head5 can be fixed with Sly's body pack [You must be registered and logged in to see this link.]
Back to top Go down
http://azoptaos.boards.net/
Dead Account

avatar

Male Posts : 531
Join date : 2013-06-17

PostSubject: Re: Bottom Teeth Fix   Sun Oct 26, 2014 2:23 am

bless your precious face
thankyOU
Back to top Go down
ObeyTheFist

™
avatar

Game username : ObeyTheFist
Server : Dragon's Den
Female Posts : 514
Join date : 2012-09-07
Location : Australia

PostSubject: Re: Bottom Teeth Fix   Fri Sep 25, 2015 1:34 pm

Hyper wrote:
Next, still in MagixUnit, find:

Code:
mBodyEnt->setMaterialName(tBodyMat);
 mHeadEnt->getSubEntity(0)->setMaterialName(tHeadMat);
 mHeadEnt->getSubEntity(1)->setMaterialName(tTeethMat);
 mHeadEnt->getSubEntity(2)->setMaterialName(tEyeMat);

Did the first part and it built, but crashed on certain heads. Oooh, can't find this bit of code. I doth request thine help. (Using the older compile if that helps)

~Obey~
Back to top Go down
http://dragonsden.freeforums.net
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 487
Join date : 2014-02-09
Age : 19

PostSubject: Re: Bottom Teeth Fix   Sat Sep 26, 2015 4:17 am

If you have heads with only a single teeth submesh, this'll crash you

All but Head1 and Head5 can be fixed with Sly's body pack [You must be registered and logged in to see this link.]

I know DD has others too though

however I'm sure you can set it to be head-specific. If you shoot me a PM I'd be happy to help you out with that

________________________________
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
Back to top Go down
http://azoptaos.boards.net/
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Bottom Teeth Fix   Sat Sep 26, 2015 11:56 am

I'm having the same issue too, with head1 and head5. If there's a way to fix it without removing the code altogether, that'd be awesome
Back to top Go down
ObeyTheFist

™
avatar

Game username : ObeyTheFist
Server : Dragon's Den
Female Posts : 514
Join date : 2012-09-07
Location : Australia

PostSubject: Re: Bottom Teeth Fix   Sat Sep 26, 2015 12:02 pm

Cloud wrote:
I'm having the same issue too, with head1 and head5. If there's a way to fix it without removing the code altogether, that'd be awesome

Currently working it out. I'm sure once we've nailed it Hyper will post the code for everyone. :3
Back to top Go down
http://dragonsden.freeforums.net
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 487
Join date : 2014-02-09
Age : 19

PostSubject: Re: Bottom Teeth Fix   Sat Sep 26, 2015 5:28 pm

edited the first post to include a code for if you only need it on certain heads

________________________________
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
Back to top Go down
http://azoptaos.boards.net/
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Bottom Teeth Fix   Sun Sep 27, 2015 12:32 pm

Very quick question: Where do you add in this part?
Code:
String MagixUnit::getHeadID()
{
  String headMeshID = mHeadEnt->getMesh()->getName();
  headMeshID.erase(0, 4);
  headMeshID.erase(headMeshID.find_first_of("."), 5);
  return headMeshID;
}
I'm not exactly sure and I don't want to break anything.

And I don't really understand this part
Code:
if (getHeadID() == "4")mHeadEnt->getSubEntity(3)->setMaterialName("TeethMat/TWOSIDE");


Code:
if (getHeadID() == "4")mHeadEnt->getSubEntity(3)->setMaterialName(tTeethMat);

Quote :
"4" is a head that HAS both submeshes. If you want to set it to assign the submesh to all heads EXCEPT 4, use the != operator

I'm sorry, I make simple things complicated >.> thank you!
Back to top Go down
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 487
Join date : 2014-02-09
Age : 19

PostSubject: Re: Bottom Teeth Fix   Sun Sep 27, 2015 4:52 pm

you can add the function in anywhere - mine's just at the end of the file

what are you confused about? you put those lines in place instead of the ones mentioned earlier in the post. Then the head IDs you put there are ones that HAVE the double submesh

________________________________
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
Back to top Go down
http://azoptaos.boards.net/
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Bottom Teeth Fix   Sun Sep 27, 2015 6:28 pm

Quote :
If you want to set it to assign the submesh to all heads EXCEPT 4, use the != operator

This is the part I'm mostly confused about. The single submesh heads I have (1, 5, and 7, my flat-teeth heads) are the ones I don't want to assign the code to. I'm not sure if I need to repaste that code for all of the heads except 1, 5, and 7 or not. I found a good spot for the function, so that I got.
Back to top Go down
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 487
Join date : 2014-02-09
Age : 19

PostSubject: Re: Bottom Teeth Fix   Sun Sep 27, 2015 6:36 pm

in that case, do

Code:
if (getHeadID() != "1" || getHeadID() != "5" || getHeadID() != "7")

________________________________
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
Back to top Go down
http://azoptaos.boards.net/
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Bottom Teeth Fix   Sun Sep 27, 2015 7:11 pm

Replaced that code with the original one that had head 4 and it failed the build
This is what the two lines look like:

Code:
if (getHeadID() != "1" || getHeadID() != "5" || getHeadID() != "7")mHeadEnt->getSubEntity(3)->setMaterialName("TeethMat/TWOSIDE");

Code:
if (getHeadID() != "1" || getHeadID() != "5" || getHeadID() != "7")mHeadEnt->getSubEntity(3)->setMaterialName(tTeethMat);

And wasn't 4 the head that had both submeshes, so I'd have to add in every head except 1, 5, and 7?
Back to top Go down
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 487
Join date : 2014-02-09
Age : 19

PostSubject: Re: Bottom Teeth Fix   Sun Sep 27, 2015 7:18 pm

what's the error? and no. the code is saying for all heads except 1, 5 and 7, assign the submesh

________________________________
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
Back to top Go down
http://azoptaos.boards.net/
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Bottom Teeth Fix   Sun Sep 27, 2015 7:23 pm

I misunderstood it then. My bad

Here are the errors:
Quote :
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixUnit.h(357): error C2227: left of '->getName' must point to class/struct/union/generic type

Quote :
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixUnit.h(357): error C2227: left of '->getMesh' must point to class/struct/union/generic type
1> type is ''unknown-type''

Quote :
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixUnit.h(357): error C2065: 'mHeadEnt' : undeclared identifier

Quote :
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixUnit.h(407): error C3861: 'getHeadID': identifier not found

Quote :
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixUnit.h(356): error C2601: 'getHeadID' : local function definitions are illegal

Quote :
1>c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixUnit.h(355): error C2039: 'getHeadID' : is not a member of 'MagixUnit'
1> c:\users\owner\desktop\kito-5.5\kito-5.5\src\client\include\MagixUnit.h(43) : see declaration of 'MagixUnit'

Those are the errors I found in the log.
Back to top Go down
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 487
Join date : 2014-02-09
Age : 19

PostSubject: Re: Bottom Teeth Fix   Sun Sep 27, 2015 7:26 pm

err

looks like you pasted the function inside another? or some part of it is messed up

if you dont have 6.0 you shouldn't have MagixUnit:: in front of the function

________________________________
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
Back to top Go down
http://azoptaos.boards.net/
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Bottom Teeth Fix   Sun Sep 27, 2015 7:32 pm

Okay, I removed the MagixUnit:: from the function (which I forgot about) and when recompiled didn't do anything.

My lines look like this, I just replaced the original if with the one you posted with 1, 5, and 7, so I'm sort of confused as to why it's erroring

Quote :
if (getHeadID() != "1" || getHeadID() != "5" || getHeadID() != "7")mHeadEnt->getSubEntity(3)->setMaterialName("TeethMat/TWOSIDE");

Quote :
if (getHeadID() != "1" || getHeadID() != "5" || getHeadID() != "7")mHeadEnt->getSubEntity(3)->setMaterialName(tTeethMat);

Maybe in the beginning, the ! needs to be an = like in the original code? I'm not sure
Back to top Go down
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 487
Join date : 2014-02-09
Age : 19

PostSubject: Re: Bottom Teeth Fix   Sun Sep 27, 2015 7:52 pm

lesson time:

x == y means x and y are equal
x != y means x and y are not equal

therefore getHeadID() == "4" means "if the head ID returned is 4, assign the submesh"
getHeadID() != "4" means "if the head ID returned is 4, do NOT assign the submesh"

so, no. that's not it.

show your whole setMaterial and setColours functions

________________________________
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
Back to top Go down
http://azoptaos.boards.net/
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Bottom Teeth Fix   Sun Sep 27, 2015 8:36 pm

Okay, here they are:

Code:
mBodyEnt->setMaterialName(tBodyMat);
      mHeadEnt->getSubEntity(0)->setMaterialName(tHeadMat);
      mHeadEnt->getSubEntity(1)->setMaterialName("TeethMat/TWOSIDE");
      mHeadEnt->getSubEntity(2)->setMaterialName("EyeModColour");
      if (getHeadID() != "1" || getHeadID() != "5" || getHeadID() != "7")mHeadEnt->getSubEntity(3)->setMaterialName("TeethMat/TWOSIDE");
      if(mManeEnt)mManeEnt->setMaterialName("ManeModColour");
      mTailEnt->setMaterialName(tTailMat);
      if(mWingEnt)mWingEnt->setMaterialName(tWingMat);
      if(mTuftEnt)mTuftEnt->setMaterialName("ManeModColour");

Code:
mBodyEnt->setMaterialName(tBodyMat);
      mHeadEnt->getSubEntity(0)->setMaterialName(tHeadMat);
      mHeadEnt->getSubEntity(1)->setMaterialName(tTeethMat);
      mHeadEnt->getSubEntity(2)->setMaterialName(tEyeMat);
      if (getHeadID() != "1" || getHeadID() != "5" || getHeadID() != "7")mHeadEnt->getSubEntity(3)->setMaterialName(tTeethMat);
      if(mManeEnt)mManeEnt->setMaterialName(tManeMat);
      mTailEnt->setMaterialName(tTailMat);
      if(mWingEnt)mWingEnt->setMaterialName(tWingMat);
      if(mTuftEnt)mTuftEnt->setMaterialName(tManeMat);
      String getHeadID()
    {
      String headMeshID = mHeadEnt->getMesh()->getName();
      headMeshID.erase(0, 4);
      headMeshID.erase(headMeshID.find_first_of("."), 5);
      return headMeshID;
    }

The function 'String getHeadID()' etc the one you posted last, is shown here because that's where I put it

The setColours? I didn't touch those, but I did use them for dual eyes, which was eventually fixed.
Here are all the setColours via ctrl+f: (in MagixUnit.h)

Code:
void setColours(const ColourValue &pelt, const ColourValue &underfur, const ColourValue &mane, const ColourValue &nose, const ColourValue &eyeTop, const ColourValue &eyeBot, const ColourValue &ears, const ColourValue &tailtip, const ColourValue &eyeL, const ColourValue &eyeR, const ColourValue &wing, const ColourValue &marking)

Code:
void setColours(const String &colourString)

Code:
setColours(StringConverter::parseColourValue(tParam[0]),
            StringConverter::parseColourValue(tParam[1]),
            StringConverter::parseColourValue(tParam[2]),
            StringConverter::parseColourValue(tParam[3]),
            StringConverter::parseColourValue(tParam[4]),
            StringConverter::parseColourValue(tParam[5]),
            StringConverter::parseColourValue(tParam[6]),
            StringConverter::parseColourValue(tParam[7]),
            StringConverter::parseColourValue(tParam[8]),
            StringConverter::parseColourValue(tParam[9]),
            StringConverter::parseColourValue(tParam[10]),
            (tParam.size()==12?StringConverter::parseColourValue(tParam[11]):ColourValue(0,0,0)));
Back to top Go down
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 487
Join date : 2014-02-09
Age : 19

PostSubject: Re: Bottom Teeth Fix   Sun Sep 27, 2015 8:42 pm

you put getHeadID inside another function. that's why it's not working

put it at the end of the file.

________________________________
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
Back to top Go down
http://azoptaos.boards.net/
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Bottom Teeth Fix   Sun Sep 27, 2015 9:05 pm

Code:
}
   virtual bool isIndexedUnit()
   {
      String getHeadID()
    {
      String headMeshID = mHeadEnt->getMesh()->getName();
      headMeshID.erase(0, 4);
      headMeshID.erase(headMeshID.find_first_of("."), 5);
      return headMeshID;
    }
      return false;
   }
};

#endif

That's where it's now placed (I'm not exactly sure that's correct, but I don't want to try moving it again in case I mess it up somehow)

it's erroring with getHeadID identifier not found, getHeadID local function definitions are illegal, mHeadEnt has an undeclared identifier, left of ->getMesh must point to class/struct/union/generic type, type is ''unknown-type'' aaaaaand left of ->getName must point to class/struct/union/generic type

It's probably the placement of the function, because I double checked and it's not in the old place anymore.
Back to top Go down
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 487
Join date : 2014-02-09
Age : 19

PostSubject: Re: Bottom Teeth Fix   Sun Sep 27, 2015 9:21 pm

you keep putting it inside functions. put it at the end of the file.

Code:
String getHeadID()
    {
      String headMeshID = mHeadEnt->getMesh()->getName();
      headMeshID.erase(0, 4);
      headMeshID.erase(headMeshID.find_first_of("."), 5);
      return headMeshID;
    }
      return false;
   }
};

#endif

________________________________
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
Back to top Go down
http://azoptaos.boards.net/
Cloud
Texture Artist
Texture Artist
avatar

Game username : Cloud, Daydream
Server : None
Female Posts : 614
Join date : 2014-07-22
Location : Under your bed

PostSubject: Re: Bottom Teeth Fix   Sun Sep 27, 2015 9:41 pm

That code you just posted is exactly what I did though..? Right above return false; which would put it between virtual bool isIndexedUnit()

Code:
String getHeadID()
    {
      String headMeshID = mHeadEnt->getMesh()->getName();
      headMeshID.erase(0, 4);
      headMeshID.erase(headMeshID.find_first_of("."), 5);
      return headMeshID;
    }
      return false;
   }
};

#endif

That's exactly what my code looks like, with the { and virtual bool above it
Back to top Go down
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 487
Join date : 2014-02-09
Age : 19

PostSubject: Re: Bottom Teeth Fix   Sun Sep 27, 2015 9:48 pm

i don't know how to explain it any simpler. you have it pasted inside the isIndexedUnit function. that's why its failing.

________________________________
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
Back to top Go down
http://azoptaos.boards.net/
 
Bottom Teeth Fix
View previous topic View next topic Back to top 
Page 1 of 2Go to page : 1, 2  Next

Permissions in this forum:You cannot reply to topics in this forum
Keeping I.T. Open :: START HERE :: KITO's IT Source Code :: Bugs & Patches-
Jump to: