Announcement

Collapse
No announcement yet.

[WALK-THROUGH] Fully Functional Vehicle (my first car).

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #46
    ok what i normally do is a quick and nasty weighting just so i can check things out in udk, in this case take your time since in most parts are sub-object it should be ok, don't waste to much time with the springs just in case it doesn't work

    Comment


      #47
      almost fineshed the whole car, only thing left is assigning the springs verticies to the top suspension parts (already assigned them to spring bone).

      Comment


        #48
        ok we're getting close then

        Comment


          #49
          ok, so i just finshed assigning all the verticies to there propper groups and thought i would give it a test import. i tried "file>export>.psk" and it made blender crash, then i tried to export using the"export to unreal" button on the side toolbar and that failed aswell, i then tried the .fbx exporter, it exported successfully, i converted it to the correct .fbx version, and then imported to UDK. now it imported just fine (so no warnings or anything), but because my export script is standard and not modified it added an extra armature (i also did nothing to the export settings), the car and skeleton were on there side. i tried moving a couple of the bones in the skeletal mesh viewer and they moved the corresponding part of of the car witch means the way i added the wieghts must have worked in some way, i also grabbed one of the spring bones, moved it and the spring streched as i expected but the top of the spring slowly moved away from the top suspension bone that its also attached to so i think the springs might need 2 bones each instead of one. i have no idea why the .psk exporter did'nt work or why the .fbx does.

          i have tried to work out what the problem is by comparing the stuff in the top right corner of my screen with the top right corner of your screen in your tutorial but it looks the same.

          i cant work out what the problem/s could be.

          so close but not quite

          Comment


            #50
            ok you need to edit the fbx script line 2565 and 2566 if i remember rightly, though if it erros on the udk export then we might still get probs in udk

            Comment


              #51
              how do i do that?

              also have you got any idea why the unreal exporter fails

              --EDIT--

              just tried the psk exporter again but with the console showing and got this

              Comment


                #52
                ok i'll do a video for the fbx fix today, never seen that error but i'll guess that some vertex has more than 2 bone weights but then its a guess only

                ok this is doing my nut in, when ever i export a skel mesh from blender 2.65 using the fbx exporter the bones get rotated.
                sorry at this moment in time i"ve no idea on how to get it to work using fbx

                we'll have to find the problem with the psk export

                Comment


                  #53
                  well all verticies except the springs verticies have a wieght of 1 and are assigned to only one vertex group. every vert of the springs has two wieghts and are assigned to two vertex groups.

                  also i have been testing the fbx eporter. yesterday i just exported using the default settings and when i imported the car and skeleton were both on there sides but still in the correct positions in relation to each other. today i tried to set the "up and forward" in the export options but it imported really wierd, the car was still on its side but the skeleton was pointing up (so the bones for the front of the car were pointing up and the rear bones were pointing down).

                  this is getting very odd

                  Comment


                    #54
                    just spend the last 2 hours on it and no joy, there must be something wrong with the blender fbx exporter

                    Comment


                      #55
                      even more odd then i thought

                      im stll trying to work out why the psk exporter didnt work

                      Comment


                        #56
                        I think you either have loose vertices and edges, or a degenerate polygon. In mesh edit try Select->Loose verts/edges for the former. For the latter you can try W->Remove doubles, but beware that may weld some stuff you don't want welded.

                        If that fails, create a temp copy of the file to work on (so you don't accidentally save over your work!) and try breaking down the model and exporting specific parts in isolation until you find the area that's causing the issue.

                        I'm still on 2.63 at the moment, but I'll have a look at the fbx export tonight. It's been awhile since I last did this... I assume you've read the relevant link in my sig?

                        Comment


                          #57
                          Ok, for 2.65a FBX:

                          You can find the python script in *blender*\2.65\scripts\addons\io_scene_fbx\export_ fbx.py

                          If this is in the progam files directory or similar then Window's UAC may complain if you try to edit it directly. So copy the file to the desktop (create a second backup of the original just in case) and open it with notepad or something better, but not a word processor. Any scripting IDE like Notepad++ or even Blender itself will do.

                          Lines 2549 to 2556 look like this:

                          Code:
                              #for bonename, bone, obname, me, armob in ob_bones:
                              for my_bone in ob_bones:
                                  # Always parent to armature now
                                  if my_bone.parent:
                                      fw('\n\tConnect: "OO", "Model::%s", "Model::%s"' % (my_bone.fbxName, my_bone.parent.fbxName))
                                  else:
                                      # the armature object is written as an empty and all root level bones connect to it
                                      fw('\n\tConnect: "OO", "Model::%s", "Model::%s"' % (my_bone.fbxName, my_bone.fbxArm.fbxName))
                          We need to comment out the last three lines by prefixing a # to each line:

                          Code:
                              #for bonename, bone, obname, me, armob in ob_bones:
                              for my_bone in ob_bones:
                                  # Always parent to armature now
                                  if my_bone.parent:
                                      fw('\n\tConnect: "OO", "Model::%s", "Model::%s"' % (my_bone.fbxName, my_bone.parent.fbxName))
                              #else:
                              #    # the armature object is written as an empty and all root level bones connect to it
                              #    fw('\n\tConnect: "OO", "Model::%s", "Model::%s"' % (my_bone.fbxName, my_bone.fbxArm.fbxName))

                          This will prevent the script from adding a default root bone at the top of the rig hierarchy. Save the file then copy it back into the original folder, overwriting the original.

                          Open Blender and load your file.

                          Choose Export->FBX export. The default export settings should be fine, don't worry about the orientation settings as they're pretty much ignored for skeletal rigs and only of use to static meshes. Since this isn't an animation rig you can ignore Only Deform Bones (rigs built for animation often contain control bones not intended for UDK, and this will filter out any bone not enabled as a vertex deformer).

                          In UDK, select import and locate the fbx file. An options screen will popup. Locate the SkeletalMesh->Advanced panel and tick "Use T0As Ref Pose". This will use the first frame of Blender's main timeline as the reference pose for the rig and sets up its orientation.

                          Ignore the warning about out of date fbx format. When the mesh is imported it should automatically be rotated to face down the X axis (Rot Origin yaw will be -90).

                          Comment


                            #58
                            Originally posted by Spoof View Post
                            I think you either have loose vertices and edges, or a degenerate polygon. In mesh edit try Select->Loose verts/edges for the former. For the latter you can try W->Remove doubles, but beware that may weld some stuff you don't want welded.
                            hi spoof.

                            because i have had to rebuild my car so many times the last time i did it i triple checked to see if there were any doubles/loose verts/edges, after that i manualy corrected every individual tri so im pretty confident there arent any.

                            If that fails, create a temp copy of the file to work on (so you don't accidentally save over your work!) and try breaking down the model and exporting specific parts in isolation until you find the area that's causing the issue.
                            i have about 6 spare versions of my car, all at different stages of creation, i did a test import as a static mesh after i UVmapped/textured/applied a material and before i added any bones (there is a pic of it in UDKs static mesh viewer a couple of pages back) and other than two sets of flipped normals on the inner drive shafts it was fine.

                            when i tried to parent the mesh and bones i pressed the "with automatic weights" like in geodav's tutorial and had a weird warrning (again screenshot a page or two back), turns out it had created the vertex groups but didnt assign any verticies to them, so i went through every vertex group and unassigned all verticies just to make sure, then assigned all the vertices to the correct groups witch seemed to work fine. (not sure if that warning had anything to do with it)

                            I'm still on 2.63 at the moment, but I'll have a look at the fbx export tonight. It's been awhile since I last did this... I assume you've read the relevant link in my sig?
                            appreciate you taking the time to take a look

                            i took a look but im no scripter unfortunately could'nt make heads or tails of it.



                            i did think that the psk export failed because of the way i weighted the springs, so i unassigned those verticies and tried exporting again witch resulted in the same failure warnig.

                            i did notice this after the export to psk failed


                            before i tried to export there was only one mesh (buggy), it would appear that the psk exporter duplicated the mesh twice. in blenders console window when i try to export it says "copy and convert anyway..." just above where it says "mesh selected 1" or whatever (cant remember the exact phrase). dontknow it that means anything or not.

                            to be honest it boggles the mind

                            --EDIT--

                            ha, you posted while i was typing

                            anyway i only have notepad, i do have visual studio 2010 and 2012, unreal x editor, and context/uncodeX, will one of them work?

                            also will that fix the rotating skeleton problem GEODAV said about?

                            Comment


                              #59
                              The extra mesh is a result of the PSK exporter crashing. It generates a duplicate mesh to triangulate it, and destroys that extra mesh at the end... unless it crashes

                              One thing I would advise - and you may kick yourself for doing it - don't triangulate your mesh until the very, very end. Both PSK and FBX will happily export quads, and a quad topology is far easier to work with when editing. There are options to convert back to quads, but you may need to tinker with some parts to get them right - it's up to you.

                              I don't think automatic weight generation is a good idea for a hard-surface model like a car as it'll create blended weights between bones at the joints, so the mesh will bend and stretch organically. It's mainly for characters... and springs Assigning the groups directly to each bone should give them a 1:1 relationship. You can always add a little stretching in weight-paint mode, so e.g. the steering rack bends a little when you put some serious stress on it hehe.

                              Also, if you haven't noticed already, read up. I posted again while you were posting.

                              Edit: also the PSK crash log is nothing to do with bones or weighting. It's found a face (triangle) who's normal is coplanar - meaning it's not pointing out from the face, implying that the triangle is degenerate: two or more of the vertices have the exact same coordinates, which prevents the math from calculating a plane for the surface normal.

                              Comment


                                #60
                                Originally posted by Spoof View Post
                                Also, if you haven't noticed already, read up. I posted again while you were posting.
                                again

                                ok ill give it a try (think i might try to get a copy of notepad++).

                                lets just hope this works

                                Comment

                                Working...
                                X