<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jihoo Byeon on Medium]]></title>
        <description><![CDATA[Stories by Jihoo Byeon on Medium]]></description>
        <link>https://medium.com/@jihoobyeon?source=rss-95ca2004b4c7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Jihoo Byeon on Medium</title>
            <link>https://medium.com/@jihoobyeon?source=rss-95ca2004b4c7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 11:22:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jihoobyeon/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Adding rigid body to meshes imported from .glb files at Babylon.js]]></title>
            <link>https://medium.com/@jihoobyeon/adding-rigid-body-to-meshes-imported-from-glb-files-at-babylon-js-fb1aabb7a596?source=rss-95ca2004b4c7------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb1aabb7a596</guid>
            <category><![CDATA[gltf]]></category>
            <category><![CDATA[3d-models]]></category>
            <category><![CDATA[babylonjs]]></category>
            <category><![CDATA[game-graphics]]></category>
            <dc:creator><![CDATA[Jihoo Byeon]]></dc:creator>
            <pubDate>Fri, 22 Sep 2023 09:30:54 GMT</pubDate>
            <atom:updated>2023-09-22T09:38:54.154Z</atom:updated>
            <content:encoded><![CDATA[<h3>Adding rigid body to meshes imported from .glb files at Babylon.js</h3><p>Okay, I’m now happy that <a href="https://medium.com/@jihoobyeon/babylon-js-at-react-native-for-macos-779f7680a6d6">I can use Babylon.js at React Native macOS</a>, but still more things are needed for completing a video game. one of those is in-game graphic objects, so I made a human boy mesh with <a href="https://vroid.com/en/studio">VRoid Studio</a> and imported to Babylon.js.</p><h4>But…</h4><p>When I added rigid body to the boy mesh, he acted like it has something under himself, and his head doesn’t collide with anything at all!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FHoXMeW15jDo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DHoXMeW15jDo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FHoXMeW15jDo%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b110e52a275579cdcf835d4a97704c15/href">https://medium.com/media/b110e52a275579cdcf835d4a97704c15/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FjYWUGupLTj8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DjYWUGupLTj8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FjYWUGupLTj8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a5b9fd968f77e9267e67e34bcc201072/href">https://medium.com/media/a5b9fd968f77e9267e67e34bcc201072/href</a></iframe><p>I tested it with box mesh(which made defaultly by Blender) instead of boy mesh, but that wasn’t acting weird like boy mesh.</p><p>So I searched <a href="https://forum.babylonjs.com/">Babylon.js forum</a> and finally found <a href="https://forum.babylonjs.com/t/physicsimposter-not-in-line-with-the-mesh/10846">someone suffered with same symptom</a> with me!</p><p>It seemes to rigid body has made on lower position than his mesh, since root of mesh was under his feet in my case.</p><h4>Solution</h4><p>As <a href="https://github.com/CedricGuillemet">Cedric Guillemet</a> of Babylon.js team mentioned at that forum thread, I had to reset mesh’s pivot point to its center. after I did that…</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fz6_NpLaU0BU&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dz6_NpLaU0BU&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2Fz6_NpLaU0BU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=google" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/cd42c04c30de55d6133ffe02445cd41a/href">https://medium.com/media/cd42c04c30de55d6133ffe02445cd41a/href</a></iframe><p>OK! He now stands on floor correctly and ball is colliding with his head!</p><h4>Sample Code</h4><pre>getPivotOfMesh(m: AbstractMesh) {<br>  return (m.getBoundingInfo().boundingBox.maximum.y + m.getBoundingInfo().boundingBox.minimum.y) / 2;<br>}<br><br>const scene = new Scene(this.props.engine);<br>scene.enablePhysics(new Vector3(0, -1, 0), new OimoJSPlugin(undefined, 16, OIMO));<br>scene.createDefaultCamera(true);<br>scene.activeCamera!.position = new Vector3(0, 0.1, 8);<br>const light = new HemisphericLight(‘light’, new Vector3(0, 1, 0), scene);<br><br>const ground = MeshBuilder.CreateGround(‘ground’, { width: 100, height: 100 }, scene);<br>ground.position = new Vector3(0, 0, 0);<br><br>const boy = await SceneLoader.ImportMeshAsync(‘’, ‘file:///path/to/your/folder’, ‘boy.glb’, scene);<br><br>ground.setPivotPoint(new Vector3(0, 0, 0));<br>boy.meshes[0].setPivotPoint(new Vector3(0, -getPivotOfMesh(boy.meshes[8]), 0)); // meshes[0] is root mesh in VRoid; meshes[8] is body mesh.<br>boy.meshes[0].position = new Vector3(0, getPivotOfMesh(boy.meshes[8]), 0);<br><br>ground.physicsImpostor = new PhysicsImpostor(ground, PhysicsImpostor.NoImpostor, undefined, scene);<br>boy.meshes[0].getChildMeshes().forEach(m =&gt; m.physicsImpostor = new PhysicsImpostor(m, PhysicsImpostor.NoImpostor, { mass: 1 }, scene));<br>boy.meshes[0].physicsImpostor = new PhysicsImpostor(boy.meshes[0], PhysicsImpostor.MeshImpostor, { mass: 1 }, scene); // You must set PhysicsImposter(rigid body) of child meshes first then set PhysicsImposter of root mesh.</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb1aabb7a596" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Babylon.js at React Native for macOS]]></title>
            <link>https://medium.com/@jihoobyeon/babylon-js-at-react-native-for-macos-779f7680a6d6?source=rss-95ca2004b4c7------2</link>
            <guid isPermaLink="false">https://medium.com/p/779f7680a6d6</guid>
            <category><![CDATA[graphics-programming]]></category>
            <category><![CDATA[macos]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[babylonjs]]></category>
            <category><![CDATA[game-engine]]></category>
            <dc:creator><![CDATA[Jihoo Byeon]]></dc:creator>
            <pubDate>Mon, 24 Jul 2023 11:41:01 GMT</pubDate>
            <atom:updated>2023-07-24T11:41:01.995Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>There’s a good free, open-sourced 3D game engine for JavaScript, named <a href="https://www.babylonjs.com/">Babylon.js</a>. and Babylon.js team has made <a href="https://www.babylonjs.com/native/">Babylon Native</a> — which uses Native graphics instead of WebGL, and they also made <a href="https://www.babylonjs.com/reactnative/">Babylon React Native</a> — which links Babylon Native to React Native apps.</p><p>It was best option for me — who was searching for 3D game engine for React Native, but there was one big problem: It didn’t support macOS!</p><p>I didn’t want to work with Unity because of “that splash screen”; and Unreal does not had React Native bridge — and seemed too big for make a bridge myself. also, both are only partially free; someday may I have to pay royalty if I used them.</p><p>I also thought about Godot; but Ryan Tremblay of Babylon.js team <a href="https://github.com/BabylonJS/BabylonReactNative/issues/197#issuecomment-817397906">said</a> porting Babylon React Native to macOS could be easy since Babylon Native already supports macOS, so I chose to take this way.</p><h3>Finding the problem</h3><p>First I tried build following <a href="https://github.com/BabylonJS/BabylonReactNative/blob/master/README.md">their documents</a>. I had to modify some lines on code to app show up; but app showed up with only FPS info, no graphic screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*8z_9opYlL_yL4mb-cINgWg.jpeg" /></figure><p>So I had to trace codes responsible to graphic screen, and I found that RendererContextNOOP::submit has invoked instead of RendererContextMtl::submit, so I modified code to force-invoke RendererContextMtl::submit.</p><h3>Problem over problem</h3><p>But now it crashed with invalid memory access error. with some investigate, I found that platformData in bgfx was not properly initialized.</p><p>I tried manually initializing platformData, but some type issues disturbed to code work properly.</p><h3>Found the solution</h3><p>But, I found that Gary Hsu of Babylon.js team has <a href="https://github.com/BabylonJS/BabylonNative/pull/1221">commited a fix</a> about that after I had forked the repo. when I synced and rebuilt… Voilà!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FUwWTBECrhC8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DUwWTBECrhC8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FUwWTBECrhC8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a52098ed9abe957e24e447c47ac855ee/href">https://medium.com/media/a52098ed9abe957e24e447c47ac855ee/href</a></iframe><h3>Still not incomplete</h3><p>Sadly, my solution isn’t complete port of Babylon React Native.</p><p>I omitted XR functionality because npm package <a href="https://www.npmjs.com/package/react-native-permissions">react-native-permissions</a>, which is a dependancy for XR, does not support macOS, and it’s quite big project to port it by only myself.</p><p>Since I don’t need XR on my working project, I’m publishing without it.</p><h3>How to use on my project?</h3><p>First, you should disable remote debugging. you can achieve it by adding these line at AppDelegate.mm of your project’smacos/&lt;project-name&gt;-macOS folder:</p><pre>#import &lt;React/RCTDevSettings.h&gt;<br><br>...<br><br>[self.bridge.devSettings setIsDebuggingRemotely:NO];</pre><p>Second, you should install @babylonjs/core but NOT @babylonjs/react-native; you should install a version from my github:</p><pre>// if you are using Apple Silicon Mac<br>yarn add @babylonjs/core https://github.com/jihoobyeon/BRN-macOS.git https://github.com/jihoobyeon/BRN-macOS-arm64.git<br><br>// else if you are using Intel Mac<br>yarn add @babylonjs/core https://github.com/jihoobyeon/BRN-macOS.git https://github.com/jihoobyeon/BRN-macOS-x86_64.git</pre><p>and do npx pod-install; then you can now use Babylon React Native for your React Native macOS project.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=779f7680a6d6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I started this blog]]></title>
            <link>https://medium.com/@jihoobyeon/why-i-started-this-blog-77373eb40674?source=rss-95ca2004b4c7------2</link>
            <guid isPermaLink="false">https://medium.com/p/77373eb40674</guid>
            <category><![CDATA[introduction]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Jihoo Byeon]]></dc:creator>
            <pubDate>Wed, 07 Dec 2022 03:55:20 GMT</pubDate>
            <atom:updated>2022-12-08T11:39:18.031Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, my name is Jihoo Byeon (pronounce <em>yeo</em> as <strong>Yeo</strong>man).</p><p>I am South Korean software developer, especially interested in <strong><em>desktop</em></strong> game developing by React Native.</p><p>Yeah, most of programmers who use React Native does not targets to desktop… and does not makes video games.</p><p><strong>But</strong> I am doing <em>both</em>, so I sometimes suffer from shortage of information, thus I made this blog to save and share error and bugs I had suffered and their solution.</p><p>Hopefully my experience will help whom are reading this blog — including you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77373eb40674" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>