Yokoed, (and anyone else interested in attempting this), below is a sample of a furniture room .xsf file with 2 seats, catcher and pitcher nodes, 1 camera, and 2 floor nodes for furniture (You'll have to build more if you want them in your room). This is to give anyone with any experience with coding an idea of how it works.
Code:
1133.65 1070.01 -458.848
0 0 0 1
-1133.65 -1070.01 458.848
0 0 0 1
-1
1
2
3
4
5
6
7
8
9
10
-53.1389 -2221.7 1299.64
-0.705222 -3.56743e-008 -2.78574e-008 0.708986
-1080.51 -834.654 -1156.15
0.705222 3.56743e-008 2.78574e-008 0.708986
0
-53.1392 819.666 1283.45
0 0 0 1
-1080.51 -1889.67 -824.607
0 0 0 1
0
-78.9924 5705.73 499.473
0 0 5.96046e-008 1
-1054.66 -6775.74 -40.6246
0 0 -5.96046e-008 1
0
-990.302 5705.73 499.473
0 0 5.96046e-008 1
-143.349 -6775.74 -40.6245
0 0 -5.96046e-008 1
0
-387.683 208.801 459.387
0 0 -0.258819 0.965926
-1285.43 -734.497 -0.539063
0 0 0.258819 0.965926
0
439.297 207.299 459.387
0 0 0.248466 0.968641
-763.907 -1876.73 -0.539063
0 0 -0.248466 0.968641
0
-129.645 -237.989 458.848
-6.12534e-008 -6.21179e-008 0.964411 0.264407
1287.95 203.646 0.000212278
-6.12534e-008 -6.21179e-008 0.964411 -0.264407
0
191.009 -244.983 458.848
-8.38532e-008 -2.40679e-008 0.970063 -0.242853
779.687 1351.84 0.000235911
-8.38532e-008 -2.40679e-008 0.970063 0.242853
0
-393.219 206.567 458.848
2.30855e-007 -1.05641e-007 -0.264407 0.964411
-1287.95 -720.465 -0.000700227
-2.30855e-007 1.05641e-007 0.264407 0.964411
0
434.517 210.875 458.848
1.49312e-007 -2.05329e-007 0.242853 0.970063
-779.687 -1868.66 -0.000981739
-1.49312e-007 2.05329e-007 -0.242853 0.970063
0
On Translation, the first number is horizontal left and right (from front view), the second number is forward or backwards, and the third number is vertical height. You can adjust these to suit your needs. (Don't forget the space between each number)
On Rotation, in order to have your avatar face in different directions, you can adjust the numbers there as well.
Ex. 1: 0 0 0 1 (front facing)
In order to have your avatar's eyes looking in the proper direction, your LOCAL ROTATION should be the same as your ROTATION.
As you can see, this method is building a room skeleton in code rather than using the mesh. It works, but I will not lie to you for a second. It's a killer to do! If you attempt to do this, don't forget to adjust your Skeletal numbones and numchilds (for skeleton.room) as you go along. Also, the camera is required or it will not work.
To make wall or ceiling nodes, simply use the word wall or ceiling in the place of floor when making your nodes.
Ex. 2:
(translation, rotation, local rotation, parent id, end of bone)
Ex. 3:
(translation, rotation, local rotation, parent id, end of bone)
When you save your .xsf file, remember to save it as "nameoffile.xsf" under All Files in Notepad. It's easiest if you save it in your SketchUp folder. Also, I would recommend NOT replacing the original .xsf file from exporting just in case you need to go back and find where you put your seat01 node.
When I'm testing this, I generally swap the seat01.Standing (or sitting) node name with the name of whatever node I want to see the position of in Previewer until such time as I have the rotation where I want it to be. You can do this with your Catcher and Pitcher nodes in order to test them for position. (I've found that a distance of 32.1719 between facing avatars seems to work for the most part...other variations are ALOT trickier but you can try them and see for yourself.) Just be sure and remember to put your seat01 back where it's supposed to be in your finished room.
Another quick note. You can create alot of different avatar accessories by simply creating a mesh in SketchUp, Create Component, name it "Mesh", save it, export it, use the SketchUp to IMVU exporter, plug it in the previewer and under the "Edit Other" tab in Previewer's advanced mode, go to AttachmentNode and put in the skeletal position of where you want your accessory to attach to the avatar's body. (Ex. Head) You may need to adjust positioning of your mesh somewhat, but that can be accomplished using SketchUp and avoid the whole notepad rigamarole.
Good luck!
For the record, this is the one and only official tutorial I'll be doing on this topic for the time being as I've been busy writing room nodes in notepad and it's very time and energy consuming to say the least! If you don't understand how to do this in notepad, do NOT attempt this as it will only make you tear your hair out in frustration.
On another note, I've had some ideas about some things I'd like to try with SketchUp that haven't yet been accomplished. The stacked furniture sounds like a challenge to me and I may well give that a go as well as attempting to create a pet or furniture that will work with pre-existing animations. Wish me luck ppl!
Now go to it!
Edit: The .xrf file refers to your mesh itself and should not need to be altered to accomplish creating a room or other product using this method. This tutorial focuses on creating and implementing an .xsf file (refers to positioning of all bones/nodes within the room's skeletal structure).
====================================
To use the opacity map, first of all, you need to make sure that your texture size that you want to use is accurate in SketchUp, then save and export as usual (using the new exporter). Once you've plugged in the .xmf and .xsf files and are ready to work on textures, instead of the .xrf file from the SketchUp Exporter, you'll need to manually create an .xrf file for the texture for which you'll need an opacity.
--------------------------------------------------------------------------------
Example:
Copy the following text:
255 255 255 0
255 255 255 255
229 229 229 0
0
(Don't change the .jpg file names. It won't work. I don't know why..it just won't lol)
Paste it into Notepad
Save as: default[0].xrf (Save As > File Name = default[0].xrf>Save as type = All Files)...name the file according to your needs.
(ie. if SketchUp Exporter gave you rainbow_red[0].xrf then you'd need to name your new file rainbow_red[0].xrf in the same folder you exported to and when prompted "rainbow_red[0].xrf already exists. Do you want to replace it?", click "Yes".)
When you've completed that, plug in your material (.xrf) files as usual and create whatever opacity maps you require. This will work for black, white, and gray, but will have to be repeated for each material file for which you will be needing an opacity map. Remember that your opacity map and texure must be EXACTLY the same size in order for this function to work properly.
--------------------------------------------------------------------------------
====================================================
(someone asking about how you made the shoes)
It's really pretty simple. All you have to do is to weight your mesh to the appropriate bone. For the boots, there are two seperate meshes. Weighted to "4" for the left boot and "10" for the right boot.
There is a line in the .xmf file that you need to change in order to accomplish this.
Code:
1
would need to be changed to read
Code:
1
for the right boot as an example.
This works for any mesh but you'll need to consult Female04_Anime01_SkeletonMASTER.xsf to be certain of the number of the bone you'll be weighting the mesh to.
What I did is to simply replace all in notepad or wordpad and resave the .xmf file. It works though! Smile Give it a go!
====================================================
DreamWeaver1 wrote:
Cliff Notes: (All of the following can be adjusted using Notepad in the .xsf file of your mesh)
Translation = Avatar position
1st number = <--- --->
2nd number = forward or backward
3rd number = height
Rotation = direction avatar is facing.
1.
0.000000 0.000000 0.000000 1.000000
This will position the avatar facing forward.
2.
0 0 0.698067 0.747006
This will position the avatar facing left (I think...might have the left & right mixed up on this
one...try it and see)
3.
0 0 -0.698067 0.747006
This will position the avatar facing right (I think...might have the left & right mixed up on
this one...try it and see)
4.0.000000 0.000000 1 0
This will position the avatar facing backwards.
Catcher & Pitcher Nodes:
ONLY rotate the height in the rotation on this! (Just copy and paste and move left or right to
create more C&P nodes..)
2.58167 -247.238 539.517
-4.24045e-008 -2.61318e-011 -0.000616225 1
12.7293 250.876 -2.12765e-005
4.24045e-008 2.61318e-011 0.000616225 1
0
1.41833 -764.057 539.517
-8.29066e-010 7.07197e-008 1 0.000616387
-12.7295 -767.695 0.000108563
-8.29066e-010 7.07197e-008 1 -0.000616387
0
Furniture Nodes Naming conventions:
furniture.Floor.01
furniture.Wall.01
furniture.Ceiling.01
====================================================
(Genraly a bit of usefull info, iv yet to try this out myself )
DreamWeaver1 wrote:
Nalehp, there actually are other positions for the avatars....
If you derive from Product13027.cfl, it's a bed created by IMVU, Inc. that has two additional avatar poses available other than seated or standing. They are stance.InBed01 and stance.BedUnder . In order to make these work for your bed mesh, simply change the seat01.Sitting (or whichever seat you choose to use for the position) to seat01.InBed01 or seat01.BedUnder .
This works for all sorts of furniture. Just because you derive from a product does NOT mean that you cannot replace the original mesh with your own and make use of the poses included in that product. Otherwise, why would so many new furniture items be derived from the Chair (Denim Relaxed) ?
====================================================
DreamWeaver1 wrote:
It's been awhile since I posted a new tutorial on here for anyone to work with so....here goes. I learned a little trick with SketchUp that makes things a little easier for me. It may complicate things for you if you're new to working with SketchUp and it's various issues where creating content for IMVU is concerned, but for those of you who have reached the level to be ready for this...here goes.
Say you've got a mesh that has multiple parts you need to export as one model....Using the SketchUp to IMVU tutorials to this point, you very well may run into a problem exporting if the mesh parts don't intersect properly or something.
So my trick is this:
I create my mesh parts as seperate components and export each portion seperately to seperate output files (rename it upon exporting as a kmz and DON'T mix them up). To do this, I hide all the parts of the mesh except for the portion I'm wanting to export right then and I explode all groups and components in regards to that particular section of the mesh. Make sure you don't MOVE anything in the process of doing this or you'll get a result you weren't expecting.
Once all the mesh parts have been exported, I open up a Notepad and save it naming it (for example) vase.xmf (Save As >All File Types) . To put all the mesh parts together, re-open this file in Wordpad. (The reason is WordPad is better able to handle the size of the text file you'll be creating.)
In another Wordpad document, open up the first part of your mesh you exported earlier. (eg. vasewater.xmf) You will be adding to this mesh. Here is how to do it:
In the first section of the mesh file (.xmf file), you will see the following or something similar.
Code:
This is where your mesh file defines the number of submeshes, vertices, faces, and assigns the material index number to your mesh. To add to this, you'll need to change the to (this number will need to be changed for each portion of the mesh you add to the .xmf file).
Now, open up the next portion of the exported mesh in Wordpad (the .xmf file for that export). Change your material file to the number you'll be using in Previewer for that section's material index number. Select everything after all the way to , copy it and paste it into your vase.xmf file...or whatever you named yours..between and . Save your file and have a look at the file in previewer. At this point, you should be able to see both portions of your mesh you just put together in Wordpad. Go ahead and load your material files for this if you choose at this point.
You will have to repeat the above steps for each new section you add to this mesh. You can use the same material index file number repeatedly in your .xmf file so if you have multiple parts using the same material file you want to load individually, just paste each one in as a new submesh section and don't forget to change the to reflect the addition of each section of mesh.
Section two. Editing texturing glitches in your .xmf file.
You can also edit your textures in Wordpad. This is VERY tricky. The keys to this are to make sure your number is correct, that all your vertices are defined, and that all your closing tags are there. One little mistake and youre entire mesh will vanish. (You can just undo or re-export..it's just a PITA)
So okay..your texture comes out looking like there are two faces trying to take up the same space in Previewer. Chances are, that IS the case. The SketchUp exporter has a strange habit of doubling the faces on occasion. The way I defeat this is to remove some of the vertices from the mesh file.
Here's an example of a very small triangle alpha plane mesh..just to show the code:
Code:
-0.078408 -44.012304 1161.246408
-0.014819 0.294708 0.955473
0 0 0
0.175185 0.746076
1
0.143400 -38.618040 1157.456424
0.000000 0.574885 0.818234
0 0 0
0.142431 0.732065
1
-0.078408 -38.618040 1157.456424
0.000000 0.574885 0.818234
0 0 0
0.142429 0.732358
1
0.143400 -38.618040 1157.456424
0.000000 0.574885 0.818234
0 0 0
0.142431 0.732065
1
In the for any vertices no longer in use, and delete the no longer in use. These numbers are absolutely intertwined and MUST be done accurately or the mesh will vanish in previewer.
For example, if I had a mesh with 6 vertices, 2 faces and I wanted to delete half of the faces, I would change my SUBMESH NUMVERTICES="6" NUMFACES="2" ... to from 3 to 6, and delete
Then I'd save and have a look at it. If it removed part of the mesh I didn't want to get rid of, then I'd backtrack and undo until the point where I knew I had it right.
SO..now you've been told how I do what I do in SketchUp. I've said it's not easy and if you've gotten this far without turning blue in the face, I have to say I admire your persistance and best of luck! I'll answer PMs with questions as they arrive, but I'm not great about checking the forums as much as I should.
Good luck to any with the guts to give this a go! (you may want to have a look back at my notes on accessories, hair and clothing as well at some point)
Note to Don: If you're reading this, how about a rework of my words to put them into clearer English and make an "Advanced SketchUp Tutorial" for the brave at heart? Include all my notes if you would. I don't mind giving out my tips, but they're all over the place in this thread and as we're at page 80, it's about to get locked. Just a thought