Topic: real world scale problem and camera jumps like crazy

The problem:
the UFE example-characters are scaled in size by 3.6 and 4 and EVERYTHING seems to be internally adjusted to this.

Caused major problems:
- you can not use already created terrains, since you can not just scale the terrain object like any other mesh-object, and creating terrains from scratch is also hard when they are not in real world scale
- it causes lighting artifacts (you see fast changing pixel-noise created by light/shadow )
- you lose a lot of resolution from the skybox (this is because of the zooming of the camera, but it is related to the problem), so the other scaled objects at least do not lose resolution, but the skybox does, it is like when you zoom into a smaller part of a picture and stretch it to the full screen size, of course it looks pixelated

I've tried so many different settings and combinations on the camera-setup, but nothing helped:
- when you have your characters in real world size you can't get the camera that close. Reducing the distance moves the camera a bit closer, but only to a certain internal(?) value and it can't get below that value, even when you reduce the number further
- disabling the zoom makes the camera rotate like crazy and most times you even do not see the characters at all

So the most important question to this is: What is the reason to have the characters scaled that big? Is it just because played around to have physics feel good and kept that value? Or is it something we even can not work against to solve?

Share

Thumbs up Thumbs down

2 (edited by Mistermind 2021-03-26 01:09:42)

Re: real world scale problem and camera jumps like crazy

UFE's templates was designed on very early versions of Unity, and the scales for those were often based on early 3D models available on Unity's free database.

That said, what you are referring to are the templates that comes with UFE, not the engine itself. All the physics values can be adjusted on Global, Character and Move editors.

Here, I narrowed down a few options you can try adjusting once you set your scales to 1:1
http://www.ufe3d.com/doku.php/global:camera
http://www.ufe3d.com/doku.php/global:bounce
http://www.ufe3d.com/doku.php/global:combo
http://www.ufe3d.com/doku.php/global:knockdown
http://www.ufe3d.com/doku.php/global:advanced
http://www.ufe3d.com/doku.php/character:physics
http://www.ufe3d.com/doku.php/move:activeframes
http://www.ufe3d.com/doku.php/move:cinematics
http://www.ufe3d.com/doku.php/move:particleeffects
http://www.ufe3d.com/doku.php/move:selfappliedforce
http://www.ufe3d.com/doku.php/move:projectiles

Like UFE? Please rate and review us on the Asset Store!
Questions about the Forum? Check out our Karma FAQ.

Re: real world scale problem and camera jumps like crazy

Hello and sorry for necroing this one.

Although it got better when i worked through the topics mentioned above (and the many suggestions in the forum) to modify existing templates accordingly, my AI fights are far not as exciting as those of the 4x scale templates. The AIs are making their moves, with attack and block in sync, standing apparat just out of range and a fight starts only if one decides to run into the other or in the corner. Probably because internally they are at the optimal distance for the executed moves, but actually out of hit range.

To understand better what mechanics are here at work, id like to ask what the internal distance is based on as described in ai:definitions? (http://www.ufe3d.com/doku.php/ai:definitions)

Distance
Based on an internal distance normalized value (0-1), how distance is represented by each linguistic variable.
0 meaning the character is as close as possible to the opponent, 1 meaning as far as possible on the screen.

Default Values

Very Close: 0.05
Close: 0.1
Mid: 0.5
Far: 0.8
Very Far: 0.95

Share

Thumbs up Thumbs down

Re: real world scale problem and camera jumps like crazy

binary wrote:

Distance
Based on an internal distance normalized value (0-1), how distance is represented by each linguistic variable.
0 meaning the character is as close as possible to the opponent, 1 meaning as far as possible on the screen.

The AI definition of distance inherit its value from ControlsScript.normalizedDistance, which is defined by the following algorithm:

normalizedDistance = FPMath.Clamp(FPVector.Distance(opControlsScript.worldTransform.position, worldTransform.position) / UFE.config.cameraOptions._maxDistance, 0, 1);

In other words, its a normalized value based on the camera options' "Maximum Players Distance".

Perhaps the issue is not the definitions themselves, but the AI classification for individual moves. Take a look at this option:
http://www.ufe3d.com/doku.php/move:aidefinitions

Like UFE? Please rate and review us on the Asset Store!
Questions about the Forum? Check out our Karma FAQ.

Re: real world scale problem and camera jumps like crazy

Thanks for the prompt reply!

The "Maximum Players Distance" was exactly what i was missing, finally now, they beat the s*** out of each other. smile

Share

Thumbs up +1 Thumbs down

6 (edited by Scyra 2024-01-11 23:33:06)

Re: real world scale problem and camera jumps like crazy

I kept notes to help anyone who attempts this. It is a lot of dividing by 4, but the end result looks almost perfect (only tested Robot Kyle).

I do have one remaining problem with the move KickCrouchingHeavy (Hit Type: Sweep): The Force Options are greyed-out for this hit type. The Applied Force is too high and it repulses the attacker when the move is used near a wall. (Edit: Problem solved. See my next post in this thread.)

Prefab: Robot Kyle > Transform > Scale > XYZ / 4
        Hit Boxes Script > Blockable Area > Radius > Serialized Value: / 4
Prefab: Training Room > Transform > Position > YZ / 4, Scale > XYZ / 4
Prefab: AlternativeCharacterSelectionScreen > Position Players > X / 4

Global > Combo Options > Minimum Juggle/Knockdown Force > Juggle Weight / 4
Global > Bounce Options > Minimum Ground/Wall Bounce Force / 4
Global > Knock Down Options > Sweep Knockdown > Predefined Push Force / 4
Global > Stages > Left/Right Boundary / 4, Ground Friction / 4
Global > Round Options > Initial Spawn Position > X / 4
Global > Camera Options > Initial Distance > YZ / 4, -Rotation Offset > Y / 4
        Minimum Zoom / 4, Maximum Zoom / 4, Maximum Players Distance / 4

Character > Physics > Move Forward/Back Speed, Jump Force/Distance, Character's Weight, Ground Collision Mass / 4
Character > Hit Box Setup > Hit Boxes > Radius/Rectangle / 4, Off Set / 4 > Apply Changes (17 total for Robot Kyle)

Assets > UFE > Engine > Map Recorder > Play (Robot Kyle was automatically selected for me by the Map Recorder/Animation Recorder). You must run this step after editing the hit boxes for them to update properly.

There are 31 moves to edit for Robot Kyle...

Move > Active Frames > Hits > Hurt Boxes > Radius / 4
Move > Active Frames > Hits > Force Options > Applied Force / 4
Move > Active Frames > Blockable Area > Radius / 4
Move > Self Applied Forces > Force Applied / 4

A few moves require other settings...

Dash > Self Applied Forces > Force Applied / 4
Power Hit > Cinematic Options > Initial & Final Position > XYZ / 4
Throw Confirm > Opponent Override > Relative Position > X / 4
Wall Launcher > Stage Reactions > Applied Force / 4
Fireball > Projectiles > Casting Options > Force Applied / 4, Weight / 4
    Hit Area > Radius / 4, Blockable Area > Rectangle / 4
    Collision Options > Push Force / 4, Applied Force (Air) / 4

Lastly, you'll need to scale the 11 particle prefabs...

Assets > UFE > Demos > Shared_Assets > Particles

Prefab > Open > Transform > Position / 4, Scale / 4 (for each Hierarchy gameobject). Then change each Particle System Scaling Mode to Local. For any lights, divide the range by 4. Some particles may require minor adjustments.

Share

Thumbs up +1 Thumbs down

Re: real world scale problem and camera jumps like crazy

Thank you for that. I'll review those numbers in the next update.

Like UFE? Please rate and review us on the Asset Store!
Questions about the Forum? Check out our Karma FAQ.

Re: real world scale problem and camera jumps like crazy

You're welcome, Mistermind. Looking forward to UFE 3 - keep up the great work!

Scyra wrote:

I do have one remaining problem with the move KickCrouchingHeavy (Hit Type: Sweep): The Force Options are greyed-out for this hit type. The Applied Force is too high and it repulses the attacker when the move is used near a wall.

This turned out to be no problem - all you have to do is temporarily change the Hit Type to something else, such as Mid, then you can edit the Applied Force (divide by 4), and then change the Hit Type back to Sweep.

Share

Thumbs up +1 Thumbs down