Giter VIP home page Giter VIP logo

Comments (11)

linkanon avatar linkanon commented on July 18, 2024 1

This PR fixes a few bugs, namely:

  • Disappearing heads. Now even if you're interrupted you keep your head on.
  • Bug that could lead the partners to swap their faces/hairstyles.
  • When you exited while in states 1 or 2 your POV in conversation was broken(it was positioned a few meters behind the person you're speaking with and facing the other way). Is also fixed now.

from aa2unlimited.

DooMGuy87 avatar DooMGuy87 commented on July 18, 2024

Thank you very much for this! This is something that this game really needed!
While this is working really good, i noticed that the POV camera its positioned really low in the face and sometimes you can see the insides of the model. it would be nice if it could be positioned at eyes height.
I dont know if its possible, but it would be nice adding a face tracking mode:
Pressing any key makes one or both participants make eye track or avoid looking the camera.
Thanks again for this, i really appreciate it.

from aa2unlimited.

linkanon avatar linkanon commented on July 18, 2024

Camera position relative to the neck can already be adjusted in the config.txt (see this PR). X is left/right axis, Y is down/up axis, Z is back/front axis (supposedly, it changes in some positions but Y is consistent). To set it around eye height you should set fPOVOffsetY to ~1.5 - 2.0.

Since there won't be a single solution being able to change these offsets on the fly would solve this and many more issues.

Also added your suggestion to the first post.

from aa2unlimited.

DooMGuy87 avatar DooMGuy87 commented on July 18, 2024

hi again, Ive tried setting the fPOVOffsetY to these values... didnt end good. in some poses (lets say cowgirl), the camera goes far back to the head and you can see the insides of the head model.
On a side note, pressing the W key, sometimes it just doesnt work, and whenever it works, it just removes the hair, but it doesnt removes the face. Im using the HEXA Hair Pack if it helps...
BTW despite these issues, the mod works really good (didnt get any crash), i hope to see more updates!

from aa2unlimited.

linkanon avatar linkanon commented on July 18, 2024

Hey, lucky that I logged in. Try using the config I updated in the mega (AAUnlimited_pov_test2 folder). It will look better in some positions(e.g. cowgirl, sitting in lap) but will look bad in others(e.g. doggys, missionary) and there's not much you can do about it now. You can adjust X and Z offsets but you'll see it's hard to find something that fits most positions.
The "POV is inside the head" bug happens when you don't have the faceless face for the actor(HEXAOC has it for males but there's no such thing for females for now). Also keep in mind that you don't see the changes until the model is reloaded, i.e. when you switch the undress state.

Basically if you're playing male and want POV experience do the following:

  • Press Q twice(first press switches to passive actor, second switches to active actor, i.e. your PC. Don't worry if your actual POV is wrong - your PC is always second in the sequence) to switch to your PC's POV.
  • Press W once to disable selected actor's head
  • Press Q to switch back to default camera mode, undress your PC(notice no head), and press Q twice again to get to active's POV

W in default camera will return both heads to normal but you'll see the changes after model reload.

from aa2unlimited.

AA2Hackanon avatar AA2Hackanon commented on July 18, 2024

About the original points:

  • note that the !notEnd part may be executed multiple times in a row. i guess the original crash you experienced was because you effectively deleted the same pointer twice. Also, note that attaching the debugger to the AAPlay exe actually works. VC++ is pretty awsome
  • i did a few short tests and managed to scale the hair, face and tongue by 0 and they actually disappeared. Need to modify the matrix of some root bone (not SCENE_ROOT or its child, those seem to have no effect), but the xx files i saw all had one of them, so this should be possible
  • im not exactly sure where i inject, but its inside a function that is constantly called, inside an if that is only reached when q,w or e are pressed. I found the camera parameters and having a place that sets these parameters to align with the neck was a pretty convenient way to find out how the heck the neck is stored in the first place. Decided to just stick with it since it conveniently also works as a trigger for q presses.
  • eye tracking sounds like something rather annoying to implement. i remember trying to do it in AAFace. Maybe i'll take a look at it somewhen. The custom keys could be annoying but not hard; the game has a buffer that logs key presses, we could just look at that buffer in the h tick. Haven't dissected it to the point where i know the location of every key in it yet tho.

Also, the PC is not always the active actor. Certain positions switch them around, as does the arrow button in the top right corner

As for the eye offset, i guess clinging to a bone on the face is not a good idea when the face can be hidden. Maybe calculate a vector from neck to somewhere between the eyes and use it as a constant offset?

from aa2unlimited.

linkanon avatar linkanon commented on July 18, 2024
  • yeah, I noticed that block being called exactly twice and you're right - in the first call I removed the object pointed but did not set the pointer to NULL so the second time the pointer pointed to an unallocated memory or something. I'll try hooking it up with the debugger, thanks for the suggestion, but I usually debug like a caveman.
  • If you can reduce the headthings to nothing even without reloading then the whole switching faces becomes obsolete.
  • some kind of camera adjustment is already called when you press arrow keys or RMB-drag. It probably adds some value every tick to the camera's translation. If we can listen to this event and instead add those values to the offsets we use for the POV camera we can effectively implement camera adjustments on the fly.
  • I don't know how eye tracking is implemented but it should be some kind of flag or "eye behavior" value that determines whether she stares in space, follows or avoids. For dialogue it's read from the dialogue's .lst but I don't know about H. I'll throw it out there but if we find the spot she's actually looking at we can just remember it's position, calculate the offsets from the neck bone and set the camera in that spot, assuming it's the same for every position.

I know that some positions swap passive/active actors but for the POV behavior both roles are remembered when the H starts for consistency purposes(so that we don't accidentally restore a wrong head)

Fixing the camera to the eyes is a bad idea indeed. I suggested still fixing it to the neck and the offsets would determine where the "between the eyes" is located. Thing is, while Y offset is consistent and obvious("up" basically ) X and Z are not. In some positions Z corresponds to "forward" and in others - "left", so fixing the offset to be perfect for one position will inevitably break it for others hence why I'm pushing for more camera controls.

from aa2unlimited.

AA2Hackanon avatar AA2Hackanon commented on July 18, 2024
  • it does indeed scale the had instantly, though you have to change the matrix on every position change as the reload resets the matrix. Might also be a good thing though, as this way its impossible to do lasting damage as all changes are gone after the models are reloaded
  • why would you need the move callback for the adjustment though. There are allready buttons to move the camera, you could just get the offset from the camera struct every tick before you null it.
  • you set the focus bone based on the hinfo struct though, which is where the pov camera is going to attach to in the end. Im not sure if the consistent player/non-player/free circle would be more intuitive or less intuitive (as it breaks the usual order of q) though
  • as for the offset, try multiplying the translation matrix from the left side instead, so x/y and z are still what you would expect them to be instead of whatever they are after the rotations.

from aa2unlimited.

linkanon avatar linkanon commented on July 18, 2024
  • that sounds pretty much perfect. We could even disable the head right when we switch to the first person and re-enable it when we switch out.
  • I'll try messing around with it more if you don't(master branch doesn't work for me at the moment anyway). If it works like you described then it's a non-issue and only waits to be implemented.
  • I'd say a consistent cycle is more intuitive simply for the fact it's consistent. Illusion's decisions on who is considered an "active partner" should not be trusted as with any other Illusion decisions.
  • again I'll mess more with it. Adding the offset adjustments and proper decapitation would pretty much complete the POV functionality in an even better shape than it is with CM3D2 for example.

from aa2unlimited.

AA2Hackanon avatar AA2Hackanon commented on July 18, 2024

current master should contain a somewhat working implementation of that head scaling stuff. I also used position information about the two eye bones to put the camera half way between the eyes. I hope you still had an old master branch and this one works for you
You are welcome to work on the pov feature. I'm currently working on something different (bone transformation, eventually additional sliders) and the todo list isn't exactly tiny, so I'm thankful for any help i can get

from aa2unlimited.

linkanon avatar linkanon commented on July 18, 2024

Yeah, I'll be chipping in code.
Current master version still has a few issues you should be aware of: no override rules apply(male nor female) and it crashes whenever I remove someone from the class. POV works though. For working overrides I have github history and the test build I linked in the first post.
I'm hype for bodysliders.

from aa2unlimited.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.