Madeliefste Oh Posted April 19, 2011 Share Posted April 19, 2011 I'm working on something where I needed different rotationpoints then the default.The original mesh is made in cinema4d. As you can see I have put the rotationpoint on the corner of the wing. But now when I upload the collade file to SL, the rotationpoint is still the default.How do I make SL know where to place the rotationpoint? Link to comment Share on other sites More sharing options...
Drongle McMahon Posted April 19, 2011 Share Posted April 19, 2011 A good question with no simple answer. The original implementation always used the center of the bounding box (in x,y,z) as the origin/pivot. We asked for offsets and ... 1) A rather kludgy way of doing it was added - you add an extra (possibly empty) object to the Collada file with the name "AssetPivot" (techically, the name attribute of the <node> tag). The uploader then uses the displacement of this from the global origin (the translation specified in the <node> ) as a proportional offset for the origin. That is to say, position of 0.5 in a dimension will offset the pivot/origin by half the width of the bounding box in that dimension. This is not entirely intuitive, as the position of the object in e.g. Blender is (generally) not the position of the new pivot, but it does work. See this thread. 2) There is a jira requesting the implementation of an additional option to use the local origin of the geometry of the high-LOD mesh as the origin/pivot. (In Blender, that is the pink spot indicating the object's global location.) This would be much easier. I think we expect this to be implemented before release. At first sight, it does not seem to be difficult. 3) Before the kludge, there was a work-around by adding simple planar flaps to the visual and physics meshes to move the center of the bounding box to the desired place, then making the visual ones transparent. Provided the "Solid" decomposition method (now choose "Solid" then "Analyse") was used, the flap was ignored in the physics shape but only after it was included in setting the origin. As far as I know, this still works. It is described in more detail in the text file with the door example on the sample content page of the mesh wiki. 4) There is apparently a bug with the present AssetPivot implementation that results in the viewer and the server disagreeing about the location of the object for collisions. I am sure this will get fixed. Link to comment Share on other sites More sharing options...
Madeliefste Oh Posted April 19, 2011 Author Share Posted April 19, 2011 Thanks for your answer, Drongle. I have an aditional question. The wing is made of a plane. As you know the plane has only one side in SL. So to be able to make the wings visible at two sides, I have upload two different meshes (one with normals and one with reversed normals). Then in SL I link them together, so in the end I have one wings that consist of two meshes. Now for this rotation point: will it be sufficient to ad this AssetPivot to only one of the meshes and make this the default one, when I link them? Or do both versions of the mesh need this AssetPivot? Link to comment Share on other sites More sharing options...
Drongle McMahon Posted April 19, 2011 Share Posted April 19, 2011 I'm not certain how the pivot of linked prims is decided. Is it the pivot of the root? If so, then I imagine the offset of the root mesh should be respected. On the other hand, with linked doors they still rotate about their own pivots; so you might have to rotate both explicitly. You will have to experiment, or wait for someone who knows more. However, you might be better off making the two sides of the wing in one mesh. There is no reason I know of why not, and the total prim cost may be less*. For texturing: if the two sides use the same texture mirrored, you can just mirror and superimpose the UV maps, and use the one texture; or you could use two submeshes (materials in Blender - I don't know in Cinema) which become two faces inworld; if the two sides are different, then you can either use one UV map with both on and one texture with the sides fitting the map, or you could use two submeshes, which become faces inworld, and put the different textures on the appropriate faces. *although I suppose this is for attchment, in which case the prim cost doesn't matter. Link to comment Share on other sites More sharing options...
DanielRavenNest Noe Posted April 19, 2011 Share Posted April 19, 2011 To do two sided visibility on complex models like hair or trees with leaves what I do is copy the geometry in my 3D program, then flip the normals on one set. Then I attach one to the other so it is listed as a single object, that happens to have two sets of polygons in the same place. Doing it that way can reduce prim cost since they can share the physics hull and fractional prim count, and avoids any chance of the parts slipping. As far as offset pivots, I have home kit parts that pretty much require the pivot to be at the corner in order for things to line up. But since the software for that is unfinished, I am not even going to try and import those items for now. Link to comment Share on other sites More sharing options...
Drongle McMahon Posted April 20, 2011 Share Posted April 20, 2011 Good point about sharing the physics shape. I think that gives a decisive advantage to using a single mesh, even if they sides aren't as simple as normal-flipped replicates. Although, again, if it's an attachment it's phantom and physics doesn't matter. Link to comment Share on other sites More sharing options...
Madeliefste Oh Posted April 21, 2011 Author Share Posted April 21, 2011 Oh, that's smart, Daniel. Thanks. Sometimes you are too much focussed on solving the problem in SL and then don't even think about solving the SL problem in your 3d proggie. But what you suggest is a much better solutions indeed. I tried it and it works great. With this rotation point I still did not managed to get it in the right spot. I think I better wait too till LL comes up with a better method for the pivot point problem. Meanwhile watching your jira, Drongle. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.