JCPalmer

Members
  • Content count

    2,380
  • Joined

  • Last visited

  • Days Won

    9

JCPalmer last won the day on March 5

JCPalmer had the most liked content!

4 Followers

About JCPalmer

  • Rank
    Advanced Member

Contact Methods

  • Twitter
    whoopstopia

Profile Information

  • Gender
    Male
  • Location
    Rochester, NY
  • Interests
    Power Napping

Recent Profile Visitors

3,885 profile views
  1. JCPalmer

    Loading bones asynchronously

    If you wish to get the bones loaded, they have to be attached to a mesh in the JSON file, per what @Deltakoshsaid above. Then you have to load this shame mesh. You might either export it as not visible, or even better, disabled for the custom export properties. If you are just going to throw this mesh away, make it a plane with 2 faces. Your cube is wasting 209 faces (636 / 3).
  2. JCPalmer

    camera example on mobile device

    Cameras, are mostly the same, except device orientation or VR, regardless the platform. Think the question you are really asking is how do I make them work using touch. Add pep any everything should work. <script src="https://code.jquery.com/pep/0.4.3/pep.min.js"></script>
  3. JCPalmer

    Loading bones asynchronously

    The first thing to check is the exporter.log file. If an armature was exported, it will list it. Next thing to check is that the mesh it is wanted for has skeleton weights & indices exported. Checking at run time, as you are doing, gives the final verdict, but checking your upstream workflow is wise.
  4. I had the same thing in my animation extension until recently. I mention this in case it might be helpful here. I was stringing together 15 short duration morph targets synced with sound (talking). It was acceptable when I ran in a live scene. On the final frame of an animation, the next morph target was submitted. That was correct, but the first frame of the next animation "reset the clock to zero", so 0 percent of the next animation was performed the first frame. This results in 2 frames with the exact same results. The sound kept on going, of course, so I was getting out of sync 1000/60 (16.6 millis) every animation, or a quarter second by the end. It still looked in sync though. When I started producing 24 fps videos, that meant I out of sync 1000/24 (41.6 millis) every frame, or .625 seconds. Not near close enough. I have an old shoot where this is a result: 24_lagging-vp9.webm I am not familiar with waitAsync, but this "looks" exactly like duplicate frame issue. I fixed my problem by adding on one frames worth of time into the calculation of how much to animate. I also edited my code, putting in console.logs every frame with the value of the property to prove that was the problem. It sounds like a real pain to have to do edit BJS for logging. Being sneaky, maybe you sine based, IN & OUT easing for both animations. I never used easing (stole it though), if eased on both sides, then it will not be moving very fast at the beginning or end of an animation, so it will look less noticeable.
  5. JCPalmer

    Optimization tips for mobile

    First, which OS? iOS could easily be skinning on the cpu if you have more than 25 bones, while Android can handle many more. 2nd, that sounds about right. It can difficult to profile on remote devices to find your bottlenecks. Use your browser's profiler on the desktop. Even if you can not visibly see slowness there, any improvements on your desktop should translate. At least the knowledge of your biggest issues give you a chance. Blindingly doing "optimizations" without the faintest idea of where & in what amounts your application is spending it's time is not a winning strategy. All you are going to get from what you provided is random suggestions. Posting code is not necessarily better than screen shots of BJS debug layer stats, or a shot of the top time percentages from profiling.
  6. JCPalmer

    My company's landing page

    Minor, but there is a plane mesh, which can be scene with mouse drag. If not intentional, get out your delete button.
  7. JCPalmer

    GUI Button, Change Shape

    Using cornerRadius, you can get close http://www.babylonjs-playground.com/#WWBIKZ#8. Strange why giving same dim for height & width do not give a square though. If this could finallized, perhaps a CircleButton class could be made.
  8. I recently went thru all my source for my QI extension. Changed every reference of var to let or const unless it was absolutely needed, 1 place. Changed to "for of" in every place where "for(let i = 0.." was just indexing. tons of places (Typescript has an option for transpiling ' --downlevelIteration ' for ES3 & ES5). Changed to backquote for all strings concatenated with a "+". Kind of a mechanical process, but helped by using an ide with good search. Cleaning made the code more readable. Does not replace reading, but for libraries it seemed worth it.
  9. JCPalmer

    Blender > .babylon Vertex Groups

    Might be you wrote it out this way: write_array(file_handler, 'indices', list(set(self.vertexGroups[indexgroups]))) I was not sure what that did. Looking at this entire topic, it was probably for duplicates. That could be put into the to_scene_file(). Duplicates can also just be avoided by moving up & indenting the code that appends them only when the vertex is added for the first time. Duplicates are created automatically for the vertices which border a material change, but those are not implemented through indices, but actual duplicate vertices. On your animation of vertices, this can get really expensive file size wise.
  10. JCPalmer

    How to get submeshes by name?

    Not sure what you are seeing in Blender, but submesh does not have a name. You might be able to something to retrieve by corresponding material name. Going the opposite direction is let matName = my_model.materials[my_model.subMeshes[0].materialIndex].name; getSubMesh(mesh, name) { let mat = mesh.materials; let idx; for (let i = 0, len = mat.length; i < len; i++) { if (mat[i].name === name) { idx = i; break; } } return idx ? mesh.submeshes[idx] : null; }
  11. Looks like your gameavatar Mesh is finding an armature. I also see only positions, normals, & UV's being written. No matrix weights or indices. Without .blend or log file, can only guess: The Armature modifier on the mesh has been removed (though you say it is animating) You checked the ignore skeleton check in custom properties
  12. JCPalmer

    Blender > .babylon Vertex Groups

    I look at your mesh.py. I refactored it creating a small class called BJSVertexGroup, since you were doing an array of arrays, then indexing into it with loop, and also including a matching name. It is very small, and looks a lot like the SubMesh class: class BJSVertexGroup: def __init__(self, group): self.name = group.name self.groupIdx = group.index self.indices = [] # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - def to_scene_file(self, file_handler): file_handler.write('\n{') write_string(file_handler, 'name', self.name, True) write_array(file_handler, 'indices', self.indices) file_handler.write('}') This adds functionality, so I bumped the version to 5.7. I ran it in against a blend with armature of 25 bones, but one of the meshes is only affected by 2 bones (vertex groups are used for bones too). It correctly only matched for 2 vertex groups. Data looked reasonable. I do not have code to playing with this once in BJS though. Please run this mesh.py against your .blends to verify, before I push up the new .zip file. Also, please add an announcement topic illustrating, since this is the only change for 5.7
  13. JCPalmer

    Blender > .babylon Vertex Groups

    Not at all. Even worse, if you desired that, the vertices are not even directly consulted. A feature in Blender that allows you to get a temp copy of geometry, with modifiers applied is used. So if you were using a modifier like mirror, then twice the vertices would be exported than were actually be in the mesh. Inside of using the mesh copy, vertices are indexed in the export for compactness & that is how BJS loads them to gl context.
  14. JCPalmer

    Blender > .babylon Vertex Groups

    In the middle of something today. Will look at this soon.
  15. JCPalmer

    Blender > .babylon Vertex Groups

    Saw the pg, and downloaded last file, but did not diff it to the repos. As it is the largest source file in the add-on, I would need to diff to find the lines added / changed. Not a big deal in Netbeans. I do not a use for right now in my own work, but now that I know it is an option uses might come up. If you are thinking about a PR, a checkbox in the custom properties (default false) would definitely be needed, since if you are not using, it could really increase the size of the export file.