Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Inventor
Original Poster
#1 Old 11th Nov 2014 at 8:00 PM Last edited by Arsil : 14th Nov 2014 at 9:04 PM.
Default [SOLVED] Custom food issues
I'm working on a custom food, one of those similar to the driedfood from WA.

I have 2 problems:
- I can't map correctly the texture to the mesh (is it normal that after using the
UV mapper the number of vertices increases?), but I guess this is a question
for another section of the forum;
- during the eating animation, the food in the hand of the sim has the wrong
position and orientation. I think this depends by the object rig, but no matter
how I play with its values with the rig editor of S3PE, nothing changes.
Hell, even if I delete the _RIG resource nothing changes.

Any advice?
Advertisement
Lab Assistant
#2 Old 11th Nov 2014 at 8:41 PM
Quote: Originally posted by Arsil
I'm working on a custom food, one of those similar to the driedfood from WA.

I have 2 problems:
- I can't map correctly the texture to the mesh (is it normal that after using the
UV mapper the number of vertices increases?), but I guess this is a question
for another section of the forum;
- during the eating animation, the food in the hand of the sim has the wrong
position and orientation. I think this depends by the object rig, but no matter
how I play with its values with the rig editor of S3PE, nothing changes.
Hell, even if I delete the _RIG resource nothing changes.

Any advice?


How you get this - , the food in the hand of the sim has the wrong
position and orientation
? In the past I had some question in the me post http://modthesims.info/showthread.php?t=538056 .
For example, how to get in left hand, for example, book, and in right - bottle?
Inventor
Original Poster
#3 Old 12th Nov 2014 at 8:17 AM Last edited by Arsil : 12th Nov 2014 at 1:01 PM.
Hey, you are adding questions, not answering them :P

Well, my object at the moment uses an existing "food class", so all the code
to handle its picking and eating was already done. If you want/need to write
the code yourself you can try to study how existing interactions work.

EDIT:
I made some progress. Maybe in MilkShape I didn't assign correctly the joint
to the vertices. Now with the rig editor of S3PE I can change the position and
orientation of the food in the sim hand changing the values of the offsetBone,
but it's a long process of trial and error, I wonder if there's an easier way to
get the right values...
Also, is 500 vertices and almost 1k polygons too much for a food model?
I got permission to use a wonderful mesh but now I'm afraid it's too complex
for such a small object.
Inventor
Original Poster
#4 Old 13th Nov 2014 at 7:32 PM Last edited by Arsil : 14th Nov 2014 at 10:48 AM.
After hours of work I finally got a perfect position and orientation for the food in the
sim's hand during the animation, then I found out that if a child sim pick or eat the
food the position is wrong again. Why are mods so mean to me?
Lab Assistant
#5 Old 14th Nov 2014 at 9:38 AM
Aww, that's a shame. Congrats on getting the adult version working though!

I don't know much about these things, but could you copy the values from an existing edible object? Like the dried food from world adventures?
Inventor
Original Poster
#6 Old 14th Nov 2014 at 10:38 AM Last edited by Arsil : 14th Nov 2014 at 11:28 AM.
I wish I could. The dried food from WA and all the custom food I've seen
seems to use default setttings for the rig (no offset and no rotation) and
they all look good in the animations. My food doesn't, maybe it's because
of its shape or maybe I'm doing something wrong. I don't know much about
this stuff either, I try to learn things as I try to do them (not the best method, I know).

One thing I find odd is that in MilkShape I assign the mesh to the 0xCD68F001
joint which corresponds to the transformBone of the _RIG resource of the food,
but in order to tune the position and orientation of the mesh in the animation I
have to change the values of its offsetBone with the rig editor of S3PE.

In a few days I might release a prototype, but in what section of the forum I should
ask help for this kind of things?
Inventor
Original Poster
#7 Old 14th Nov 2014 at 2:46 PM
Nevermind. Trying and trying I found settings that work decently for all ages.

With the default rig's settings, in the eating animation sims eat (bite) my custom
food from the bottom. I wanted them to eat it from the top but it seems that's
just not possible because you have to change its position's offset and since
children got shorter arms and smaller hands than adults, changing the "y"
offset (the one parallel to the length of the sim's arm or hand) makes the
food's mesh goes beyond the sim's hand.

Why it's not possible to place the food correctly just rotating the object and without
changing its position's offset? I'm not sure, but I think this happens because if you
edit the rig to rotate the food's mesh, it doesn't rotate on its own x, y and z axis
(in relation to the mesh's joint or center), but it rotates in relation to the x, y e z
axis of the "hand slot joint" of the sim's rig, so it rotates but also changes its position.

In the meantime the texturing issue has been resolved and the creator I'm
collaborating with for this mod was so kind to make a simplified version of the
mesh with a reasonable number of polygons in regard to the object's size and purpose.
The object projects no shadows, either outdoors or indoors, that's a bit odd to me,
but I've checked and all dried food, official or custom, seems to work like that.
So, yeah, I think this is done.

Oh, last thing. I'm using a custom script for the food to avoid the Snob trait
to get in the way. I could have used NonaMena's script but I wanted to make
my own script and keep it as simple as possible. As I did for my Chewing Gum
mod, I derived the class from Morsel to avoid all the crypt's crap that comes
with the DriedFood's class.
Back to top