Does anyone have saved copy of IMVU's Unity API?

Questions, Tips and Concerns about Creating on IMVU in general.
DimitriX89
Sage Pixel
Posts: 58
Joined: Fri Mar 10, 2017 4:01 am

Re: Does anyone have saved copy of IMVU's Unity API?

Post by DimitriX89 » Wed Oct 09, 2019 6:18 am

And just for future reference: we got it working in Unity 2019 3.0a8 (by faking the path it demanded), while in 2019.2.8f1 demos never get to login stage, only displaying yellow warnings after a while: https://gyazo.com/f7f9000fee1f7d00c9d6933d651d3925 Impression like Unity terminates some process because it takes too long

User avatar
nerseus
Sage Pixel
Posts: 46
Joined: Fri Mar 10, 2017 1:40 pm
Location: Arizona
IMVU Homepage: http://avatars.imvu.com/nerseus
Contact:

Re: Does anyone have saved copy of IMVU's Unity API?

Post by nerseus » Wed Oct 09, 2019 7:10 am

Interesting... I'm using 2019.2.5f1 and don't see anything like that in the console. I'll upgrade today and push up a change that fixes a few things. I'm hoping to fix the FeedPost as well, but I won't let that keep me from pushing a fix.
I'm always around to answer meshing questions! PM me or find me on Skype: djatarchon

(I also take mesh requests from time to time)

DimitriX89
Sage Pixel
Posts: 58
Joined: Fri Mar 10, 2017 4:01 am

Re: Does anyone have saved copy of IMVU's Unity API?

Post by DimitriX89 » Wed Oct 09, 2019 4:48 pm

I managed to run it, but now there are new runtime errors and the resulting avatar isnt visible (though it creates avatar hierarchy in the scene): https://gyazo.com/13dabdd9387d34e67432d98522e2ca77 The code I used for loader: https://pastebin.com/55EgUzYn Unity 2019 3.0.b6

User avatar
nerseus
Sage Pixel
Posts: 46
Joined: Fri Mar 10, 2017 1:40 pm
Location: Arizona
IMVU Homepage: http://avatars.imvu.com/nerseus
Contact:

Re: Does anyone have saved copy of IMVU's Unity API?

Post by nerseus » Thu Oct 10, 2019 10:27 am

Doing some testing with Unity 2019.2.8f1 - but so far, testing is working fine. I'm not seeing the errors you are. I've tried 2 sample projects:

1. Running the Outfit demo in a clean install
- Create a new 3D project; I didn't include any extra modules as I'm testing in Windows 10 and nothing else was/is needed.
- Once the empty project loaded, I imported the unity package (all files)
- Opened the Outfit demo and ran
I see the login window; entered my credentials; the rest of the demo seemed to run just fine.

2. Running with an empty scene and minimal script:
- Created an empty scene with just Main Camera and a Directional Light
- Added one empty GameObject
- Created a new script, using your sample code. Essentially just:
void Start()
{
Imvu.Connect("username", "password").Then(
userModel => Load(userModel)
);
}

Running the scene loads my avatar and shows it in the T-pose. No errors or issues.
I'm always around to answer meshing questions! PM me or find me on Skype: djatarchon

(I also take mesh requests from time to time)

DimitriX89
Sage Pixel
Posts: 58
Joined: Fri Mar 10, 2017 4:01 am

Re: Does anyone have saved copy of IMVU's Unity API?

Post by DimitriX89 » Fri Oct 11, 2019 2:17 am

I'd think it is something related to my local computer, but I've tried it on 2 machines for same result. Same Unity version as the person who reported it working, same packages installed. Finally, I've connected to his computer via Parsec and ran my project from there; it worked just fine. No idea what it can be. Some restrictions by Russian internet providers? But I can run IMVU itself just fine, and as I understand, IMVUnity uses same servers as Next. Textures get downloaded, only models and skeletons are somehow the problem. Error messages say that error happens in ner.imvu.BoneScaler function; any idea what can cause it to receive invalid Quaternion input?

User avatar
nerseus
Sage Pixel
Posts: 46
Joined: Fri Mar 10, 2017 1:40 pm
Location: Arizona
IMVU Homepage: http://avatars.imvu.com/nerseus
Contact:

Re: Does anyone have saved copy of IMVU's Unity API?

Post by nerseus » Fri Oct 11, 2019 6:48 am

Interesting...
I wonder if it has to do with how decimal values are formatted. Either IMVU sending back data in a localized format and the unity code not interpreting that, or vice versa - Unity/DotNet assuming values are localized.

Since the server name is fixed in code, I'm pretty sure the data sent back will be the same for everyone regardless of region. Although... it's possible imvu pulls some region info out of the headers.

I'll poke around and see if I can see where localization is, or isn't, happening...
I'm always around to answer meshing questions! PM me or find me on Skype: djatarchon

(I also take mesh requests from time to time)

User avatar
nerseus
Sage Pixel
Posts: 46
Joined: Fri Mar 10, 2017 1:40 pm
Location: Arizona
IMVU Homepage: http://avatars.imvu.com/nerseus
Contact:

Re: Does anyone have saved copy of IMVU's Unity API?

Post by nerseus » Fri Oct 11, 2019 8:16 am

Poking around the parsing code - IMVU implements their own JSON parsing, including number parsing.
That code specifically looks for decimal values in English/Imperial format with a "." as a decimal separator. That is "1.5" is one and a half. I believe in Russian and other systems that would be stored as "1,5"?

But... that would only be an issue if IMVU's api returned data in different formats depending on who was requesting the data, which seems unlikely.

Try going to the following URL:
https://asset-server-akm.imvu.com/asset ... uY2Zs/1335

You should see some JSON data like:

Code: Select all

{"bones":[{"flags":{},"inverseBindPoseTransform":{
"rotation":[0.0,0.0,0.0,-1.0],"translation":[-0.0,-0.0,-0.0]},
"name":"Female03MasterRoot","relativeTransform":{
"rotation":[-0.7071067690849304,0.0,0.0,0.7071067690849304]
...
I'm curious if those "rotation" values show up the same for you, like "-0.707..."?
I'm always around to answer meshing questions! PM me or find me on Skype: djatarchon

(I also take mesh requests from time to time)

DimitriX89
Sage Pixel
Posts: 58
Joined: Fri Mar 10, 2017 4:01 am

Re: Does anyone have saved copy of IMVU's Unity API?

Post by DimitriX89 » Fri Oct 11, 2019 10:56 am

JSON looks the same for me,digits in the fractions separated by the dots. BTW, by "IP restrictions" I meant different thing: internet resources actually banned by our control organisations. Like about a year ago, the owner of Telegram messenger refused to comply to some Russian government regulations and started to use Amazon proxies to avoid then. That lead to Roscomnadzor (the control organisation) banning Amazon-related URLs left and right. The incident was sorted long ago and everything was unbanned since then. A paranoid theory but I simply do not have any ideas. Even an *.exe build of the project displays the same error, so it is not Unity version or some package problem.

User avatar
nerseus
Sage Pixel
Posts: 46
Joined: Fri Mar 10, 2017 1:40 pm
Location: Arizona
IMVU Homepage: http://avatars.imvu.com/nerseus
Contact:

Re: Does anyone have saved copy of IMVU's Unity API?

Post by nerseus » Fri Oct 11, 2019 11:16 am

Hmm... so the EXE doesn't work on your machine? Can you send the EXE to your friend and verify it works there? That would help narrow it down somewhat...

This seems like a slim chance... but maybe try changing some Windows settings related to your Region and Number/Date formats?
The "best" way is through: Control Panel -> Region -> Region dialog

If you search windows for "Region Settings" Windows will point you to the Windows 10 Metro settings. For me, those settings didn't let me change number formats.

If you see an old fashioned windows window, then you're in the right area.

Here's what I have:
Image
Image
Image
Image
I'm always around to answer meshing questions! PM me or find me on Skype: djatarchon

(I also take mesh requests from time to time)

DimitriX89
Sage Pixel
Posts: 58
Joined: Fri Mar 10, 2017 4:01 am

Re: Does anyone have saved copy of IMVU's Unity API?

Post by DimitriX89 » Fri Oct 11, 2019 11:33 am

Regional settings worked! You're genius! https://gyazo.com/d3054fcb7a8c95e85dede118c4d43e61

User avatar
nerseus
Sage Pixel
Posts: 46
Joined: Fri Mar 10, 2017 1:40 pm
Location: Arizona
IMVU Homepage: http://avatars.imvu.com/nerseus
Contact:

Re: Does anyone have saved copy of IMVU's Unity API?

Post by nerseus » Fri Oct 11, 2019 12:02 pm

Whew! I'm glad it's working.

And I hope to have an updated DLL/package out today with some fixes.
I'm always around to answer meshing questions! PM me or find me on Skype: djatarchon

(I also take mesh requests from time to time)

User avatar
nerseus
Sage Pixel
Posts: 46
Joined: Fri Mar 10, 2017 1:40 pm
Location: Arizona
IMVU Homepage: http://avatars.imvu.com/nerseus
Contact:

Re: Does anyone have saved copy of IMVU's Unity API?

Post by nerseus » Tue Oct 15, 2019 10:01 am

Sorry for the delay. I had a request to change the old Conversion/Exporter tools and, after a small issue where Windows thought it was a Virus - I just decided to package up the source code for those that want it.

I'll jump back on the IMVU Unity DLL today and get that updated package ready.
I spent time this weekend trying to get the posting to Feed demo working, but haven't gotten it yet. No point in holding things up for just that.
I'm always around to answer meshing questions! PM me or find me on Skype: djatarchon

(I also take mesh requests from time to time)

User avatar
nerseus
Sage Pixel
Posts: 46
Joined: Fri Mar 10, 2017 1:40 pm
Location: Arizona
IMVU Homepage: http://avatars.imvu.com/nerseus
Contact:

Re: Does anyone have saved copy of IMVU's Unity API?

Post by nerseus » Wed Oct 16, 2019 7:33 am

Updated package:
- Removed debugging code
- FeedPost demo still not working

Current (and older) versions can be found here:
http://nersoftware.com/?page_id=1387


NOTE: I'm still working on fixing the FeedPost. It seems to be almost working - just an issue with preserving credentials when it comes time to post the saved image.
I'm always around to answer meshing questions! PM me or find me on Skype: djatarchon

(I also take mesh requests from time to time)

DimitriX89
Sage Pixel
Posts: 58
Joined: Fri Mar 10, 2017 4:01 am

Re: Does anyone have saved copy of IMVU's Unity API?

Post by DimitriX89 » Thu Oct 17, 2019 12:23 am

Thats cool! Do you plan to add file path customisation? Not everyone has D:/

User avatar
nerseus
Sage Pixel
Posts: 46
Joined: Fri Mar 10, 2017 1:40 pm
Location: Arizona
IMVU Homepage: http://avatars.imvu.com/nerseus
Contact:

Re: Does anyone have saved copy of IMVU's Unity API?

Post by nerseus » Thu Oct 17, 2019 4:03 am

No File path needed. The debugging code referencing D: was just for troubleshooting transparency and resizing. I've got both of those fixed and the original imvu demo for taking a photo and displaying a thumbnail now works. Just the posting to imvu is failing.

In looking at how imvu coded/exposed things... it sure seems like they had intentions of exposing more. Ah well. Their APIs don't appear that complicated. Easy enough for a web backend dev to figure it out and expose more if they needed it.
I'm always around to answer meshing questions! PM me or find me on Skype: djatarchon

(I also take mesh requests from time to time)

User avatar
nerseus
Sage Pixel
Posts: 46
Joined: Fri Mar 10, 2017 1:40 pm
Location: Arizona
IMVU Homepage: http://avatars.imvu.com/nerseus
Contact:

Re: Does anyone have saved copy of IMVU's Unity API?

Post by nerseus » Sun Oct 27, 2019 11:07 am

I have the FeedPost demo working, finally. Turns out to be quite a bit of missing code - but I should have an updated DLL/package later today.
I'm always around to answer meshing questions! PM me or find me on Skype: djatarchon

(I also take mesh requests from time to time)

User avatar
nerseus
Sage Pixel
Posts: 46
Joined: Fri Mar 10, 2017 1:40 pm
Location: Arizona
IMVU Homepage: http://avatars.imvu.com/nerseus
Contact:

Re: Does anyone have saved copy of IMVU's Unity API?

Post by nerseus » Sun Oct 27, 2019 12:33 pm

Package is updated to 1.3:
http://nersoftware.com/?page_id=1387

NOTE: There are some notes at the bottom of the page regarding posting to the feed.

The FeedPost demo is now working! Here's a silly little sample:
https://www.imvu.com/next/feed/feed_ele ... b6d2a2719/

As far as I know... this is the last of the demos, now working. I don't plan on making additional changes to the DLL unless someone requests them (or has issues).

-Dan / ner
I'm always around to answer meshing questions! PM me or find me on Skype: djatarchon

(I also take mesh requests from time to time)

User avatar
nerseus
Sage Pixel
Posts: 46
Joined: Fri Mar 10, 2017 1:40 pm
Location: Arizona
IMVU Homepage: http://avatars.imvu.com/nerseus
Contact:

Re: Does anyone have saved copy of IMVU's Unity API?

Post by nerseus » Sat Nov 09, 2019 2:31 pm

Another update - there are at least two bugs still:
* Texture animation isn't working (or at least not always working)
* Skeletal animations on accessories isn't working (or at least not always working)

I've been testing with this awesome hat concoction:
https://www.imvu.com/shop/product.php?p ... d=47233317

The blue "hat" morphs correctly, but the yellow teapot "hat" doesn't spin in Unity but works fine in IMVU client.
Both the blue and yellow hats should have texture animations, but neither are working.

Bummer...
I'll see what I can do.
I'm always around to answer meshing questions! PM me or find me on Skype: djatarchon

(I also take mesh requests from time to time)

User avatar
nerseus
Sage Pixel
Posts: 46
Joined: Fri Mar 10, 2017 1:40 pm
Location: Arizona
IMVU Homepage: http://avatars.imvu.com/nerseus
Contact:

Re: Does anyone have saved copy of IMVU's Unity API?

Post by nerseus » Sun Nov 10, 2019 9:14 pm

Small update - texture animation is now working, at least with my limited tests. I may have to make more hats though as, once I fixed the general bug and saw the textures animating - I realized the imvu code had them animating in the wrong Y direction. There might be issues with the cell-based animation so I'll check that out, too.

But so far... bugs found; bugs fixed. Love it!
(No updated posted yet, unless someone needs this. I'll post an update when I confirm/fix other related issues.)
I'm always around to answer meshing questions! PM me or find me on Skype: djatarchon

(I also take mesh requests from time to time)

DimitriX89
Sage Pixel
Posts: 58
Joined: Fri Mar 10, 2017 4:01 am

Re: Does anyone have saved copy of IMVU's Unity API?

Post by DimitriX89 » Thu Nov 14, 2019 5:53 am

Thats awesome! Definitely required for full experience. I've finally figured out whats wrong with my IK rig (IMVUnity used slightly different avatar body bones map) so I'll resume work on the photo studio project soon

User avatar
nerseus
Sage Pixel
Posts: 46
Joined: Fri Mar 10, 2017 1:40 pm
Location: Arizona
IMVU Homepage: http://avatars.imvu.com/nerseus
Contact:

Re: Does anyone have saved copy of IMVU's Unity API?

Post by nerseus » Thu Nov 14, 2019 9:18 pm

Some progress...
I made samples of 11 different texture settings to see what works and what doesn't.
Here's everything working in IMVU:
Image


After some tweaks to code and shaders I have all but 3 working (and 2 unknowns):
Image

Not working:
1. Vertex colors (image "6" above should have weird color splotches)
2. Cycling (almost works, but the indices are off - should be an easy fix)
3. Scrolling with offsets (almost works, but not using offsets)
Unknown:
4. Self-lit (might be working... but I think maybe not)
5. Fog override (not really sure how to test in Unity)

As far as I can tell, IMVU didn't provide any support in their shaders for vertex colors. I've never coded a shader before so it's slow going. I've found a few examples and have this so far. It's ugly, but texture "6" is showing the vertex colors... that's a start!
Image

-Dan / ner
I'm always around to answer meshing questions! PM me or find me on Skype: djatarchon

(I also take mesh requests from time to time)

User avatar
nerseus
Sage Pixel
Posts: 46
Joined: Fri Mar 10, 2017 1:40 pm
Location: Arizona
IMVU Homepage: http://avatars.imvu.com/nerseus
Contact:

Re: Does anyone have saved copy of IMVU's Unity API?

Post by nerseus » Sat Nov 16, 2019 8:32 pm

Some progress - I've got the vertex colors working with some slight shader tweaks! That is all...
Image
I'm always around to answer meshing questions! PM me or find me on Skype: djatarchon

(I also take mesh requests from time to time)

Post Reply