Blender

Blender

Blend4Web : https://www.blend4web.com/

Install blend4web :
  • Download blend4web ce 
  • Unzip and copy to Documents (e.g. blender
  • open Blender --> User Preference --> File --> Script (Add c:\...\blend4web_ce\ folder )
  • Reopen Blender 
  • open Blender --> User Preference --> Addon --> Select (Import/Export) --> blend4web

Simple 1 : Object + Material + Shadows + blend4web
  • Open, Create Two Objects : Muckey and a Plane
  • Each Object : Add Material and Object --> Shadows --> Muckey :Cast / Plane:Receive
  • Select Light : Data --> Select "SUN" --> Shadow : Select Shadow
  • Test and View on blend4web (Fast Play)
  • P:Render --> Reflections and Refractions --> Reflec : ON
  • Select Muckey : P:Object --> Reflexible
  • Select Plane : P:Object --> Reflective
  • Select Plane : Shift-A --> Create "Empty" --> "Plane Axes"
  • Select Plane : P:Object --> Real-Time Refections --> Reflection Plane --> Select "Empty"
  • Select Plane : P:Material --> Mirror --> Select "Show Reflectivity --> Refec : 0.83 / Fresn : 3 / Blend : 1
  • Set Envirnment :
  • P: World --> World --> Select "Render Sky", "Paper S' , "Blend S"
  • P: World --> Environment Lighting --> Select
  • (Fast Play) -DONE


Problem : Blender Export Obj to LibGDX  
Simple : https://www.raywenderlich.com/49955/blender-tutorial-for-beginners-how-to-make-a-mushroom
  • Blender Export ObJ with Texture : 
    • Export use : Y - UP
    • After Export : Texture File : Rotate 180 and Flip 

  • UV Unwrap File with Objects (Add Textures File)
    • Object Mode : Shift + S - Move Cursor to Center 
    • UV Mesh : 
      • Separate two Windows
      • Left : Select "UV Edit Mode"
      • Right : Select all by Key A
      • Press "Mesh" --> UV Unwrap > Smart UV Project
      • (not a good way to do)
      • -------------------------------------------------
      • Bast Way :
      • Right : deSelect all by Key A
      • Click deSlect : "Limit selection to visible"

      • Press B and Mouse to Select Face
      • Press "Mesh" --> UV Unwrap > UV Unwrap
    • Paint Mode :
      • On UV Editor Mode : Select paint and directly paint on Editor mode in Texture Paint mode
    • Save All before Export  :
      • Rename : Object, Image and Material to same is better
      • Save Material / textures Image file from UV/Image Editor  : Click "image" --> Save as Image
      • OBJ OPTIONS



    • Make it Animation by Rigging
      • https://www.raywenderlich.com/49955/blender-tutorial-for-beginners-how-to-make-a-mushroom
      • https://www.raywenderlich.com/52804/beginning-blender-tutorial-animating-rendering-mushroom
      • Create Mushroom Object as below
      • Shift-S : Cursor to Center
      • Viewport -> Solid
      • Shift-A  -> Armature -> Single Bone
      • Properites -> Object Data -> Select (Names and X-Ray)
      • Edit Mode
      • Right-Click Select Tip/top of Bone
      • Press G and Z to exten and restrict to Z -Axis to next Join Area
      • Press "E" to Exten and copy bone to next Join Area

      • Select Bone on Proporties rename Bones 
      • Goto Object Mode
      • Select Bone and Objects (Mushroom) Only
      • Control-P --> Set Parent To --> With Automatic Weights under Armature Deform
      • Control-Tab to Pose mode
      • Right Click Bone and Press "R" to Test Movement
      • (Options) 
        • After Create Bone
        • Goto Vector Group
        • Create Vector Group "name A" Bone
        • Go Back 3d View 
        • "B" Select Bone and Object 
        • Select "name A" and Click Button "Assign"
        • Repeat each Bone B, C, D, E,
      • Create HOP
        • Goto Object Mode and Select bone
        • Create First TimeLine : Press I and view insert Keyframe on Time Line
        • ------Goto Frame 4  : press timeline to move green line to X frame (e.g. 4 frame)
        • Go back to 3d View and Select Bone and press "s" and "z" to scale
        • Type "I" -> Scaling
        • -----Goto Frame 8 
        • Option-S to clear the Scaling (Options-S = Alt-S)
        • Type "I" ->LocScale
        • -----Goto 14 Frame
        • Select All Bone and Object
        • Press "G" and "z" to move mushroom up
        • Press "I" --> "Location"
        • ----Goto 16 Frame and 18 
        • Press "G" and Z" to move down mushroom a little bit
        • Press "i" --> Location
        • ----Goto 20 frame 
        • Press "Option-G to clear the location
        • Press "i" --> Location
        • ----Set end Frame Press "E"
      • Animation Screen
        • Control -Middle Mouse to Scale Timeline
        • Reame Animation name 
        • Press "F" to Create Fake User for Save Current Parameter
      • Create Nod Action
        • Goto Frame 1 : Move Timeline to First by "Shift-Control-Down Arrow"
        • Change View : View -> Presp/Ortho
        • Goto Frame 1 
        • Press "R" and move bone 
        • Press "I" and Rotation
        • Goto Frame 5 
        • Press "R" and move bone 
        • Press "I" and Rotation
        • Press "E" to End
        • Option - A (Alt -A) to Start Action
        • Rename Dope Sheet Action Name and Press "F" to Save


Key Control :
  • Add Edge  : [Edit Mode + Wireframe] Contrl + R : Add Edge 
  • More Smooth and Detail but Not Shading (smooht/Flat) -- Easy to control by Properties
    • P:Modifiers --> Add Subdividion Surface --> View 
  • Add Subdivide Edge into a plane to increase an edge and more smooth. : [Edit Mode + Wireframe] : W --> SubDivide

Download 3d model with animation character : https://www.mixamo.com/#/?page=1&type=Motion%2CMotionPack

  • -----------------
  • Download fbx from : https://www.mixamo.com/#/?page=1&type=Motion%2CMotionPack
  • Open Blender and import Downloaded fbx File
  • Save to .blend
  • REMOVE the Transparany Option from Material Manu
  • Export to .fbx file
  • Use Fbx-conv to convert .fbx to g3djOpen g3dj file into text editor
  • check "Animation ID" and "Material" File location
  • --------
  • Copy to Android Studio With Texture file


    Export Blender Animation to ogg for Android Studio input 



        
    HOW TO IMPORT TWO ANIMATION INTO ONE OBJECT AND MAKE IT ACTION

    1. Download Animation from https://www.mixamo.com/
    2. Create a Plane and Make it Rigid Body without Dynamic
    3. -----------------Load Idle Animation---------------------------
    4. Import Animation (Idle) FBX with Manual Orientation (left options menu)
    5. Select and Ctrl-J to Join all Objects to one.
    6. (Bottom Windows) Open as "Drop Sheet" Animation Windows and "Action Editor"
    7. Change Animation Name e.g idle
    8. (Right Windows) Open as "NonLinear Animation" Windows 
    9. HighLight "Armature" Click "Push Down" and Rename NICTrack name (e.g. to "idle")
    10. Test Play to see the result.
    11. ----------------Load Second Animation------------------------------
    12. Import Second Animation (e.g. Run) FBX with Manual Orientation (left Options Menu)
    13. Push X to Delete Object (But not Armature Animation)
    14. Select Object Tree "Armature"
    15. Go to Drop Sheet Window: Rename Animation Name and Rename "Armature.001" to "Armature"
    16. HighLight "Armature" Click "Push Down" and Rename NICTrack name (e.g. to "run")
    17. ------------------- Create Controller Node --------------------------
    18. Hightlight "Armature" goto Armory Traits create Node Script
    19. Open "Login Node Editor" Windows and Create Name Node name it (e.g. AnimController)
    20. Create "On Keyboard":Started:Key:r to "Play Action":Armature:run
    21. Create "On Keyboard":Released:Key:r to "Play Action":Armature:idle
    22. Make longer "Blend" to smooth start and stop action
    23. Test Play.........................
    24. --------------------Make the Player move with Animations----------------------------
    25. Create a Box to cover full the Animation Object named "Player" 
    26. Make the box Rigid Body with Dynamic
    27. Hightlight "Player" goto Armory Traits create Node Script
    28. Open "Login Node Editor" Windows and Create Name Node name it (e.g. PlayerController)
    29. Create "On Keyboard":Down:Key:r -- "Translate Object":in  
    30. Create "Vector":y:2 -- "Translate Object":Vector
    31. -------------------- Combon Armature and Box together.
    32. Select Armature and Box Object: Press Ctrl-P to Join Together.



    HOW to Create a First Person View With Simple Movement
    1. -------------------------------- Create a Scene 
    2. Add a Plane with Rigid Body without Dynamic
    3. Change World Background into Sky Texture
    4. Save File 

    5. ---------------------------------- Create Object
    6. Add a Box Object (Called Player) with Rigid Body with Dynamic
    7. Add a Camera Object (Called Play_Camera) 
    8. Adject Player_Camera with Box Together as a player point of View  
    9. Select and Drop a Player_Camera into Player to Create a Parents Link (Select + Shift Key --> Drop into Player)
    10. Highlight Player and Create Armory Tralt (New Bundled: FirstPersonController)
    11.  
    12. ----------------------------------- Change Scene
    13. Goto Scene and  Change Camera into "Player_Camera"
    14. Create a Sun 
    15. Delete Default Lights
    16. Delete Default Camera
    17. Change Player_Camera :  Camera Data : Focal Length to 2.2 (e.g.)

    HOW Make Object move on Plane by Mouse Click in PATH
    1. -------------------------------- Create a Scene 
    2. Create a Plane, Few Boxes with Rigid Body (Without Dynamic)

    3. -------------------------------- Create Move Player Body
    4. Create a Move Player with Rigid Body (Dynamic and Animation)
    5. Create a Armory Traits : Nodes : e.g. Named : NavigateNode
      1. On Mouse : Started : left : OUT --> Goto Location : IN
      2. Mouse Coords:COORDS --> Pick Location : SCREEN COORDS --> Goto Location : LOCATION
    6. Create a Armory Tralts : Bundle : NavAgent

    7. --------------------------------  PLane
    8. Create a Armory Tailts : Bundle : NavMesh



    HOW Make Texture tif on Object

    1. -------------------------------- Create an Object
    2. R.g.Create a Box / PLane
    3. Make Object to Unwarp

    4. --------------------------------- Download from Textures.com 
    5. Three Texture Files : Normal, Roughness, Height, Material and Albedo files (tif type)

    6. --------------------------------- CReate Notes
    7. Highlight Object and Open new window : Shader Editor
    8. Pick and Drop Three files on Editor and Connect it as following Pic.
      • Add "Armory PBR" : "Material Output"
      • Drop Material File into Shader Editor and Connect "Armory PBR"


    9. -------------------------------- Create Rendered preview as Look Dev
    10. Create New Material Nodes
    11. Add "Texture Coor" : "Mapping (texture)" : "Environment Texture (Open internal file) 
      • C:\Program Files\Blender Foundation\Blender\2.80\datafiles\studiolights\world
    12. : "Background" : "World Output"

    13. ---------------------------------------- 


    HOW To Setup Rigid Body With Two Objects

    1. -------------------------------- Create an Object
    2. Create a Box named "StillObject"
      • Physics : Rigid Body 
      • Type : Passive
      • Shape : Mesh
    3. Create a Cylinder named "Moving Object"
      • Physics : Rigid Body
      • Type : Active
      • Dynamic : Checked
      • Shape : Convex Hull
    4. -------------------------------- Create Join
      • Create Shift-A : Empty : Arrows
      • Physics : Rigid Body Constraint
      • Type : Hinge (Way to move )
      • First : MovingObject
      • Second : StillObject
    5. ------------------------------ Create Motor AutoMotion
      • Create Shift-A : Empty : Arrows
      • Physics : Rigid Body Constraint
      • Type : Motor (Way to move )
      • First : MovingObject
      • Second : StillObject
      • Angular (Checked) : Speed
      • Override Iteration (CHecked)
    6. ------------------------------- Move all Together

    HOW To Create two body link together with wire (Rigid Body)

    1. -------------------------------- Create an Object
    2. Create two objects with Rigid Body Constraint (Active)
    3. Create an Empty (Paint Asix) with Rigid Body Constraint : 
      • Type : Point
      • UnCheck : Disable Collisions
      • Objects : First and Second Object
    4. Create a Plain with Rigid Body (Passive)
    5. --------------------------------- Test RUn 

    HOW To Make a soft textures rope

    1. -------------------------------- Create an Object
    2. Create a Plain(Ground) and a Collision Object (a Cyliner Stick) for Testing
    3. -------------------------------- Create a Rope
      • Shift-A Create a Curve : Path
      • Edit Mode : Segments : subdivids (Few times) to make it more thick
      • --------Physics : SoftBody
      • DeSelect : Goal
      • Select : Self Collision (How soft is it)
      • Select : Edges

      • Run Timer to Test
    4. -------------- Make a Switched Rope
      • Goto Second Layout
      • Create a Curve : Circle
      • Duplcated to 4 Circle and Center on Center
      • Back to First Layout and Select Rpoe
      • Object Data : Geometry : Bevel : Object -- Select Circle (From Second Layout)
      • Goto Editor Mode
      • Select the last Vecties and Press Ctrl-T (Mouse Center to adject the Switch Radio) and ture move to switch
      •  

    HOW To InDirection lighting

    1. -------------------------------- Create an Objects
      • Create an Object as Material : Emmision
      • Create a simple Object (BOX) for Test
      • Shift-A : Create a Ligiting Probe : irradiance Volume : 
      • Adject Volume Size : Object Data : Resolution XYZ to 12 or more 
      • Press : Bake Indirect Lighting
    2. --------------------------------- Move Smooth Ligthing 
      • Create A Irradiance Volume as a Plain on Ground 
        • Scale : Z : 0.01
        • REsolution XYZ : 40, 40, 1
        • Position = Ground and (A)
      • Create B Irradiance Volume on REfection Object 
        • Distance : 0
        • Resolution XYZ : 12
        • Bottom to Overlap (A)
      • Clear all Bake data 
      • Press : Bake Indirect Lighting


    HOW To Use Krita and Software to COnvert Image to Textures

    1. -------------------------------- Open Software 
    2. OPen njob APps and open file to convert Normal, AO and Height

    HOW To Use Krita and Software to COnvert Image to Textures

    1. -------------------------------- Good Textures Setup Example




    Comments