pivot of a 3d model outside its mesh after importing into Unity3d - unity3d

as you can see, the pivot is outside my mesh. I want to use the pivot for rotating around, for that I need to set the pivot to the real "rotating point". I know that there's the SetPivot script, but it only works with pivots inside meshes.
This mesh is part of an object which contains several meshes, I created it with Wings3d. The problem appears with .obj and .3ds as file extension.
1.How can I fix this?
2.Is there a possibility to define a second pivot which can be used in scripts to "rotate around"(maybe a vector3 which can be set in "Designer")?

I found a youtube vide which might help. I don't know whether it will help though.
Does THIS help?

Related

Unity: skinned mesh vertexbuffer output slightly different than correct results

It’s like this hip is stuck in place, with in the pictures(being at different times in the animation since I can’t upload a gif) the red wireframe is the drawing of the raw output triangles and everything else being default unity, aka the correct output
What am I doing wrong? What am I missing? This has been driving me nuts for 2-3 days now, any help is appreciated
As you do not post any code, I will try to do some guessing over what is going on. Disclamair: I actually happen to run into similar problem myself.
First, you must know that Update's of MonoBehaviour are called in random order (not neccessery random-random, but yous see the point). If you bake mesh in one component, it can still be one-frame late to the Animator component.
There are actually two solution of this case: first is to specify the order of Script Execution Order in Project Settings, while the second is to use LateUpdate instead of Update when updating mesh after skinning.
The second problem you might have run into is scale / position of skinned mesh. Even if it does not contribute at all to the animation movement it can still wreck the mesh baking collision later on.
To fix that make sure that all your SkinnedMeshRenderers objects have Local Position, Local Rotation and Local Scale set in Transform component to identity (0,0,0 for position and rotation, 1,1,1 for scale). If not - reset those values in editor. It will not change animations, but it will change mesh generator.
If both solutions does not work, please describe the problem more thoroughly.

Terrain's Edges Matching

I load some terrains from my asset bundle, but their edges are not matched together.
I recognize when I edit the terrain in Unity Editor, the problem is solved because the terrains are in the same terrain group (see it here).
So my question is: Can I do it runtime by code? If yes, please tell me how! Many Thanks!
P/S: I know the function TerrainData.SetHeights() and I can match edges of two terrains with this function, but I don't want to do it so manually.

Extra edges are generated between vertices when I move camera in game or in editor

I'm trying generate custom procedural landscape in unreal engine 4
To implement this I'm using this class https://docs.unrealengine.com/en-US/API/Plugins/ProceduralMeshComponent/UProceduralMeshComponent/index.html
and for nice noise generation on Z axis I'm using this plugin https://github.com/devdad/SimplexNoise from this library the only method I use is: USimplexNoiseBPLibrary::SimplexNoise2D
How to implement whole process I inspired from this video: https://www.youtube.com/watch?v=IKB1hWWedMk
I will try to describe flow of whole process:
define vertices count in row and column
iterate through row and column and create vertex vectors on (xscale, yscale, FMath::Lerp((-maxFallOff, maxHeight, USimplexNoiseBPLibrary::SimplexNoise2D(xperlinScale,yperlinScale)))
generate triangles using this method: https://docs.unrealengine.com/en-US/API/Plugins/ProceduralMeshComponent/UKismetProceduralMeshLibrary/ConvertQuadToTri-/index.html
generate UVs
That is all, at this point I can say everything works fine, but there is little issue, when I move camera in editor or in game on mesh appears extra edges. I also recorded video to show what I'm talking about.
https://youtube.com/watch?v=_B9Fxg5oZcE the edges I'm talking, appears on 00:05 second
Code is written in C++, I could post code here, but I think code is not problem here, I think something happens on runtime while I move camera something that I don't know...
I can say in advance if you interested that I'm not manipulating on mesh on Tick event
Problem solved...
Actually seems like I had bug in my code, I was passing too many triangle points to CreateMeshSection_LinearColor method that was the problem.
Anyway thanks for attention
Cheers

Select Mesh on Three.js

do you know how can I select a geometry with Three.js?
ve you never seen something like that?
I searched for many days but all examples I found don't work and are legacy coded. I would have to be able to select a geometry with the mouse and move it like in a drag and drop.. Maybe better select a Mesh, cause there are a lot of composed shapes. It's not fundamental move it with mouse, I can do it with fields, so at least to know where is the feature to select a Geometry, if there is, I couldn't find it.. thanks
http://mrdoob.github.com/three.js/examples/webgl_interactive_draggablecubes.html
If you need to select to color the mesh of the 3D model, use MeshLambertMaterial.js when creating the scene.
http://mrdoob.github.com/three.js/examples/webgl_interactive_cubes.html

Mesh with different materials unity3d

How do I create a mesh in unity via script to use two different materials?
I think you can find all the information you need in here, unless like Kay said you don't really mean to create the mesh in Unity directly.
To assign two different materials to a mesh I think you need to break that mesh in two and assign separately. I'm doing something like this and I just keep the vertices[] and separate the triangles[]. Works for me.