Bench

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Bench

Postby Jonnee » Fri Jul 25, 2008 10:32 am

Hiho! It's me again. :D

The today's problem: I have created a bench and did it the way as the tutorial explained it.
The avatar starts to sit down - but it doesn't keep sitting. My player walks through the wall across from the bench. Finally the avatar sits down at a point that is identic with the coords 0/0/0 of the blender file, somewhere in the air. It happens too if I want to make a simple cube sitable.
Anyone knows that phenomenon?

a pic of the bench in blender:
Image

The axes are set as explained.
User avatar
Jonnee
 
Posts: 266
Joined: Fri Nov 16, 2007 9:45 pm

Re: Bench

Postby Marcello » Fri Jul 25, 2008 12:10 pm

I had the same thing going on. I repositioned the object center and made sure the Y axis in edit mode was positioned as the tutorial says.
User avatar
Marcello
 
Posts: 374
Joined: Sun Nov 04, 2007 8:59 am
Location: Haarlem, The Netherlands

Re: Bench

Postby Jonnee » Fri Jul 25, 2008 12:50 pm

Ok, reading the tutorial twice (or more) helped a bit:
I did not mark the bench as an anctor. I did so in the logic panel, and... Now the avatar sits down where it should do.
But... What is this??? The size of the bench shrinked dramatically. It is not displayed as large as I've created it in blender. *lol*
Who can tell me what I did wrong?

Image
User avatar
Jonnee
 
Posts: 266
Joined: Fri Nov 16, 2007 9:45 pm

Re: Bench

Postby Jojon » Fri Jul 25, 2008 12:56 pm

It should do that automagically, from what I hear, but still; try applying object mode transformations. This will screw up your neatly arranged rotation of the bench, so you'll have to rotate it back. :P
Jojon
 
Posts: 1116
Joined: Sun Sep 30, 2007 5:49 am

Re: Bench

Postby Jonnee » Fri Jul 25, 2008 10:19 pm

Interesting.
I clicked in blender Object, Clear/Apply, Apply Scale Rotation. Now it works fine. Nice!
Thanks Jojon for the clue! :)
Now I remember that Clear/Apply from the past in another context. But don't know it extact.
May anybody explain it for me and the other writers please? Could be important for further applyings.
User avatar
Jonnee
 
Posts: 266
Joined: Fri Nov 16, 2007 9:45 pm

Re: Bench

Postby D'Lanor » Sat Jul 26, 2008 1:30 am

PyPRP is just a like a Microsoft program. :D It makes assumptions about what is best for the user. Based on the object type it will use some of the settings in Blender and ignore others. It has to do that in order to avoid excessive export errors, but this makes the whole process rather obscure.

As a rule I always apply scaling to avoid problems. Although I believe only clickables are affected by the scaling bug. It is a pity that Clear/Apply affects rotation too because some objects need rotation to function correctly. If there is a way to apply only scaling in Blender I have not found it yet.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Bench

Postby Jojon » Sat Jul 26, 2008 2:44 am

It goes something like this:

If an object is, say a box, that is just supposed to to sit there, wherever you placed it, pyPRP applies object translation and transformations at time of export, fitting its geometry into world coordinates.

If the object needs to bounce around, however, or as in cases like this and with ladders; simply know which directions are up and back, we need to keep the object's coordinate system (so that it can be used for moving the object around, through animation or physics and read by the engine, to seat you in the right direction) -- we tell pyPRP to do this by ticking the "Actor" button. In this case transformations are NOT applied automatically when exporting - doing so would result in loss of needed information, which is exactly what happened to you first, when you didn't know about the "actor" button. Now, with the included coodinate interface, Plasma will fit the object into place, in the world.


Now, from what I understand (having half-read some animation-related discussions), Plasma SHOULD not only translate and rotate, but also scale coordinate interface-owning objects, according to their transformation matrices, but apparently there is some sort of issue with scale filtering down through object child levels, so in your case, do you perhaps have the bench object as child to another object, which is the one that has received your scaling? This is something I myself like to do, so it doesn't seem unlikely to me that others too collect related stuff under a parent, whether "real" object or an empty.

One might for example have something like:

Code: Select all
Bench (The actual object)
  |
  +-Clicking "button" for seating to the left of the bench
  |
  +-Same for centre
  |
  +-Same for right end
  |
  +-Click region


Here, if I'm not misunderstanding completely, if I scale the bench, I will see the children (buttons and region) scale accordingly in Blender, but in the exported .prp, they MAY not have inherited that particular transformation from the Bench object - only have their own. Note that I'm guessing here - I do know from testing, that hierarchical animation works with translation and rotation, at least - I just heard that with scale, inheritance can go screwy.


Hope I'm not just spreading falsehoods here.. :P
Jojon
 
Posts: 1116
Joined: Sun Sep 30, 2007 5:49 am

Re: Bench

Postby Jonnee » Sat Jul 26, 2008 5:15 am

Thanks for your explanations. Now I'm a bit more wise. :D
User avatar
Jonnee
 
Posts: 266
Joined: Fri Nov 16, 2007 9:45 pm


Return to Building

Who is online

Users browsing this forum: No registered users and 3 guests