Search Unity

SpriteMan 3D Support Thread!

Discussion in 'Assets and Asset Store' started by glowe, Oct 23, 2015.

?

How important is having access to full source code?

Poll closed Apr 10, 2016.
  1. It's a must for me.

    1 vote(s)
    33.3%
  2. It would be nice.

    1 vote(s)
    33.3%
  3. I get along fine without it.

    1 vote(s)
    33.3%
  4. I'm indifferent.

    0 vote(s)
    0.0%
  1. glowe

    glowe

    Joined:
    Jun 10, 2014
    Posts:
    68
    And, (finally) starting a video tutorial series:
    I'll be linking them to better places once I complete the series.

    WOOHOO!

    Saturday: was very productive. 5 videos so far, and I've barely scratched the surface of this
    asset. (30 mins of quality tuts)
    Sunday: even more productive. 10 videos made, and I still haven't finished getting through all the features. (over 2 more hours of how-tos)
    Monday: 3 more videos. Finally DONE! (playtime 1 hour)

    I think I've covered all the features!

    I ended up with about 4 hours of SpriteMan 3D tutorials!

    Check out the entire playlist!

     
    Last edited: Apr 30, 2019
    HeadClot88 likes this.
  2. Zebbi

    Zebbi

    Joined:
    Jan 17, 2017
    Posts:
    207
  3. glowe

    glowe

    Joined:
    Jun 10, 2014
    Posts:
    68
    @Zebbi - spriteman doesn't handle multiple elevations. It only does one level of 360 degree roundabout view of sprite characters.

    It's not the first time I got this request. But it's mainly a matter of keeping the product features simple and intuitive as its complexity grows.

    I'm a little stuck on how I would show this feature in the tool options. It'll take some thought.
     
    Last edited: Apr 30, 2019
  4. Zebbi

    Zebbi

    Joined:
    Jan 17, 2017
    Posts:
    207
    As a suggestion, how many other projections would be required? As you say, at the moment you can do 16 fractions on the yaw axis, my request would cover the pitch axis of which you could have 16 fractions. I'm not sure a roll axis would be necessary, since sprites are only emulating 3d-space items with 2d, I can't quite imagine how a roll axis projection would be useful (feel free to correct me!)

    I would imagine it could be toggle-able to either use yaw or pitch (unless you wanted both simultaneously for some seriously over-engineered projectiles that have different viewing angles as it goes past you as well as above or below you!)
     
  5. glowe

    glowe

    Joined:
    Jun 10, 2014
    Posts:
    68
    Ok, I'm working on supporting multiple elevations. It's a pretty major change. So, I'm also overhauling the rest of the asset to make even more things configurable that aren't right now. Like, you'll be able to create any amount of directions you want. And that'll be configurable for each elevation. It'll all be a new set of controls and I'll be deprecating the old set. Of course, with fully custom capabilities, the Editor windows need to be overhauled too, to allow that. Lots to do...
     
    HeadClot88 likes this.
  6. jKessinger

    jKessinger

    Joined:
    Jan 21, 2016
    Posts:
    4
    I'd also like to see if there's any solution to the issue @lbonnage posted.
     
  7. glowe

    glowe

    Joined:
    Jun 10, 2014
    Posts:
    68
    The best solution I found for clipping is twofold:
    1. make the character's collider slightly bigger, like you're saying
    2. set sprite pivots to center instead of bottom of sprite
    These are mainly compromises dealing with sprites in 3d environments. Ex: centered pivots will change how rotating perspectives look. But I haven't found better solutions.
     
  8. Zebbi

    Zebbi

    Joined:
    Jan 17, 2017
    Posts:
    207
    Sounds awesome, can't wait to try it!
     
  9. Navarth

    Navarth

    Joined:
    Dec 17, 2017
    Posts:
    6
    @glowe I've been looking into the issue of sprites clipping into geometry, but they're all pretty daunting for a beginner to implement. Maybe you'll have better luck?

    My topic on reddit here sums up the solutions I've found so far.
    There's also the closest thing to an explanation of the process here.

    See also this Gamasutra article for doing the same thing for a 2D game.
    And a blog post from the Starmancer team about similar issues.

    I'd happily buy any number of plugins if they could spare me from having to write custom shaders and projection matrices to avoid sprites clipping into walls behind them without sacrificing the ability for walls in front to still occlude them.

    As an aside: If I can get Spriteman working for my particular setup (4-directional NW/NE/SW/SE with all E flipped from W) I'd be ecstatic, which it sounds like is something coming in the next version. Awesome!
     
    Last edited: May 19, 2019
  10. glowe

    glowe

    Joined:
    Jun 10, 2014
    Posts:
    68
    Hi, yeah, sorry I can't help too much with the clipping issue. I took a look at the various resources you posted. I understand most of the things people are talking about. The matrix thing is making my head spin. It's nice to see people documented so well all the various types of sprite issues I've noticed in the past years.

    I'm currently revamping the spriteman asset. One main feature I'm adding is allowing different elevations, full 360 degree rotation, above and below. It kinda works, but I've been stuck on a few difficult angles.

    And I also got really sick this week. I'm finally feeling better.

    Anyway, I already have the fully customizable angle ranges working just fine. So, I can probably wrap up what I have so far and get it released. It sounds like it'll give you some of the features you're looking for. The 360 elevation thing will still be a bit wonky, but I'll just have to keep working on that as I have time.
     
  11. Zebbi

    Zebbi

    Joined:
    Jan 17, 2017
    Posts:
    207
    Hope you're feeling better, and thanks so much for all the effort, I can't wait to try the vertical elevations!
     
  12. kastrateus

    kastrateus

    Joined:
    Jun 1, 2019
    Posts:
    1
    Helloo, love the plug-in. Is there any way to prevent the sprites that aren't the player's from changing as you approach them from an angle? I believe it is because the direction for each Sprite is chosen based on the forward vector of the camera, even if the camera is not directly pointed at the Sprite. In a third-person point of view this can cause the sprites to change direction even when they logically should not based on their transform's rotation. This effect causes a bit of confusion as to where my character'' are facing, is there any way to fix jt.?

    Thanks
     
  13. ncho

    ncho

    Joined:
    Feb 1, 2014
    Posts:
    89
    Just chiming in to say that I'll buy this once multiple elevation angles are possible!
     
  14. ncho

    ncho

    Joined:
    Feb 1, 2014
    Posts:
    89
    Went ahead and bought it anyway - works flawlessly so far so once elevation angles are in it'll be pretty awesome.

    I also wonder if one other thing is possible - for multi frame animations of a specific angle, instead of dragging in every animation frame one by one, could it maybe accept a folder with sequentially named files instead? Or automatically load in all other frames after the first? Otherwise with 8-16 Way mode that's a lot of time spent individually dragging frames into boxes...

    Another good option would be to be able to lock billboarding to specific axises only. (Edit - regarding this I just found billboardV in Billboarder.cs but setting it to false doesn't seem to do anything...)
     
    Last edited: Jun 14, 2019
  15. glowe

    glowe

    Joined:
    Jun 10, 2014
    Posts:
    68
    Did you remember to uncheck billboarding on the Sprite Manager component?
     
  16. ncho

    ncho

    Joined:
    Feb 1, 2014
    Posts:
    89
    Hmm, doing that has an effect, but just not the desired one. What I'd like is for billboarding to continue to happen around the vertical axis but prevent the horizontal warping you get when you stand close to a sprite and look up/down as it then billboards according to the perspective. What I mean by that is this effect: https://imgur.com/a/B2qdLYo

    But if I turn off the billboarding option and set billboardingV to true I get this now, which corrects the horizontal billboarding distortion up close but messes up everything on the other axis: https://imgur.com/a/o2KHzeZ

    Any clue how to correctly implement this?
     
  17. mufabil45

    mufabil45

    Joined:
    Jun 6, 2017
    Posts:
    1
    @glowe hello, I'm currently making 2D top down game. Your assets help me lot in animating sprite.

    My question is, is there's a way to change sprite cardinal direction from script?

    Here what I mean

    Code (CSharp):
    1. SpriteManager SM;
    2.  
    3. if(Input.GetKey(KeyCode.S){
    4. SM.//change the direction to south
    5. }
    I've read the documentation but I'm really confused, thx in advance.
     
    Last edited: Jun 25, 2019
  18. Zebbi

    Zebbi

    Joined:
    Jan 17, 2017
    Posts:
    207
    When’s the eta for multiple elevations? Can’t wait to try sprite elevators!
     
  19. ncho

    ncho

    Joined:
    Feb 1, 2014
    Posts:
    89
    Just wondering if this is still being developed?
     
  20. Gisstrio

    Gisstrio

    Joined:
    Apr 5, 2018
    Posts:
    4
    Hello,
    There's something I've been wondering I could achieve with this system. You see, my game plan is to have 4-Way facing sprites, but the sprites will always be at a 3/4 angle view, kinda like this:

    While I can rig it up to fit the system's natural 4-Way mode, it obviously wasn't made for this view in mind, thus, playing feels kinda awkward with this setup.

    I just wanted to inquire about whether it's possible to, say, modify the Cardinal Direction in the full source code to match these kind of sprites better and if it is, how I'd go about doing it.

    Thanks in advance!
     
  21. Anthony0506

    Anthony0506

    Joined:
    Oct 13, 2016
    Posts:
    84
    hey, the cardinal directions are entirely customizable as the source code is included. i think what you're looking to do is entirely possible.
     
  22. tripwynn

    tripwynn

    Joined:
    May 22, 2019
    Posts:
    1
    Hello! Noob question! Srry:) My Spriteman demos all have reversed up and down controls. Is there a way to alter this within the character? TY! and Srry if this is a dumb question.

    ***Edit*** More specifics. Characters control perfectly when imported into new project.

    when I import Spriteman into existing project using MoreMountains "TopDownEngine"
    the controlls are inversed. Is it the INPUT thats causing this?

    I will keep poking at it. ty for anyone with suggestions:)

    **Edit again**
    I'm Stupid. I created an additional input in Project Settings, inverted it and reassigned it in the character controller. That fixed it. Srry!:D
     
    Last edited: Sep 6, 2019
  23. Gisstrio

    Gisstrio

    Joined:
    Apr 5, 2018
    Posts:
    4
    Hi,
    Apologies in advance if I'm being pushy or unreasonable, but I've been fiddling around with the Cardinal Directions to try and achieve my desired effect as explained above, and with the front facing sprites, it's easy enough to set the directions at East and West respectively, but I have no idea how to handle North and South. It still makes a very jarring effect when I make the character move up or down as they awkwardly just suddenly change their direction to fit that one angle without bearing whether they're facing East or West in mind.
    The thing is, with the script's simple 0, 90, 180, 170, 360 degree system in mind, I have no idea if I can fix this issue I'm having without reworking the PersonPlayerController script from the ground up or cutting the upwards facing sprites entirely.

    Either that, or there's a really obvious solution to my problem that I'm dumbly overlooking.

    Thanks again for all the help anyhow! I appreciate it a lot as a bit of an amateur, once again, sorry if what I'm asking is unreasonable.
     
  24. Anthony0506

    Anthony0506

    Joined:
    Oct 13, 2016
    Posts:
    84
    go into your directioninventory script and find these lines
    Code (CSharp):
    1.     FourDirections = new List<AngleRange>
    2.             {
    3.                 new AngleRange(CardinalDirection.N, 315f, 360f),
    4.                 new AngleRange(CardinalDirection.N, 0f, 45f),
    5.                 new AngleRange(CardinalDirection.E, 45f, 135f),
    6.                 new AngleRange(CardinalDirection.S, 135f, 225f),
    7.                 new AngleRange(CardinalDirection.W, 225f, 315f)
    8.             };
    you're going to have to play around with these values until you get what you're looking for. keep a back up in case you don't like your desired result and have to start from scratch.

    your other option is to use 8 or 16 way and redundantly assign your sprites.

    glowe should be able to help you better than I can as he is the asset dev, but he hasn't been around in the last couple weeks. he usually pops in and out, but you could probably find his email address if you search around. he's usually pretty good about helping out.

    edit:

    you can try these values, and this should help you out a little bit to visualize how to assign your sprites.

    Code (CSharp):
    1.  FourDirections = new List<AngleRange>
    2.             {
    3.                 new AngleRange(CardinalDirection.N, 10f, 80f),
    4.                 new AngleRange(CardinalDirection.E, 80f, 190f),
    5.                 new AngleRange(CardinalDirection.S, 190f, 280f),
    6.                 new AngleRange(CardinalDirection.W, 280f, 360f),
    7.                 new AngleRange(CardinalDirection.W, 0f, 10f)
    8.             };
    so north would be sprites that are facing to the right and away from the camera, east would be facing towards the camera and to the right, south would be facing toward the camera and to the left, and west would be facing away from the camera and to the left. you're likely going to have to adjust these values slightly.

    notice that your western direction is broken down into two separate angle ranges, this is probably to prevent some kind of error, i'm not certain, and i didn't delve into why he did it this why, i just kept it consistent with how he scripted it previously, just adjusted to fit your needs. it may be that unity doesn't recognize when a range resets at 0, either way just that in mind when you're adjusting your values.

    the reason i set it this way is so that if you're holding up on a joystick, it won't stutter between left and right. either way if you hit the angle where it differentiates between which sprite it should render it's going to stutter no matter what just by design, but at least with it offset slightly to the left or right it's likely to occur much less.


    also, keep in mind that the player controlller that comes packaged with the asset is super bare bones and you're going to to most likely change nearly everything in it as make your game.
     

    Attached Files:

    Last edited: Sep 6, 2019
  25. Gisstrio

    Gisstrio

    Joined:
    Apr 5, 2018
    Posts:
    4
    Thank you so much!

    I decided to put in your suggested values, and as you said, there's still a bit of awkward stutter when turning North and South but eh, doesn't seem like that's something I can help, but regardless, this setup still works way better for my game plan then the default one.
    Maybe I'll play around with the settings and fix the Player Controller when I get better at scripting.

    Seriously, that helps me out a lot, I can't thank you enough for your guidance through all this!
     
    Anthony0506 likes this.
  26. Anthony0506

    Anthony0506

    Joined:
    Oct 13, 2016
    Posts:
    84
    if you're seeing too large of a stutter still there's a couple options you have. first you can define the pivot point of sprites upon import, so mess around with that and see what looks best for you, and also make sure when importing your sprites that they're aligned correctly. even one pixel off will show pretty dramatically.
     
  27. HandlebarOrionX

    HandlebarOrionX

    Joined:
    Jun 18, 2018
    Posts:
    1
    This looks like this is really what I needed
     
unityunity