Deprecated: Return type of ExplodeIterator::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/utils/StringUtils.php on line 576

Deprecated: Return type of ExplodeIterator::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/utils/StringUtils.php on line 592

Deprecated: Return type of ExplodeIterator::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/utils/StringUtils.php on line 611

Deprecated: Return type of ExplodeIterator::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/utils/StringUtils.php on line 558

Deprecated: Return type of ResultWrapper::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/db/DatabaseUtility.php on line 197

Deprecated: Return type of ResultWrapper::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/db/DatabaseUtility.php on line 215

Deprecated: Return type of ResultWrapper::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/db/DatabaseUtility.php on line 208

Deprecated: Return type of ResultWrapper::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/db/DatabaseUtility.php on line 225

Deprecated: Return type of ResultWrapper::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/db/DatabaseUtility.php on line 186

Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/WebResponse.php on line 37

Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/WebResponse.php on line 37

Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/WebResponse.php on line 37
https://www.jpct.net/wiki/api.php?action=feedcontributions&user=Fireside&feedformat=atom JPCT - User contributions [en] 2024-03-29T15:56:03Z User contributions MediaWiki 1.23.15 https://www.jpct.net/wiki/index.php?title=Main_Page Main Page 2009-04-07T01:56:08Z <p>Fireside: </p> <hr /> <div>&lt;big&gt;&#039;&#039;&#039;The jPCT wiki&#039;&#039;&#039;&lt;/big&gt;<br /> <br /> <br /> jPCT is a free, small, fast and easy to learn 3D engine for Java. It offers support for software and hardware rendering. This Wiki should help people with tutorials, instructions and samples. If you think that you have something to contribute, just create an account and go for it... <br /> <br /> <br /> == jPCT ressources ==<br /> <br /> [http://www.jpct.net The jPCT homepage]<br /> <br /> [http://www.jpct.net/forum2 The jPCT community]<br /> <br /> <br /> == Installation ==<br /> <br /> [[ Requirements ]]<br /> <br /> [[ How to install ]]<br /> <br /> <br /> == How to start ==<br /> <br /> [[ First steps ]]<br /> <br /> [[ Hello World ]]<br /> <br /> [[ Loading models ]]<br /> <br /> [[ Advanced example ]]<br /> <br /> [[ Applets ]]<br /> <br /> == Advanced topics ==<br /> <br /> [[ the different renderers ]]<br /> <br /> [[ collision detection ]]<br /> <br /> [[ multithreading ]]<br /> <br /> [[ compiling objects ]]<br /> <br /> [[ shaders ]]<br /> <br /> [[ physics ]]<br /> <br /> <br /> == Code Snippets ==</div> Fireside https://www.jpct.net/wiki/index.php?title=Help:Contents Help:Contents 2009-04-06T15:54:22Z <p>Fireside: </p> <hr /> <div>Paste code with pre and /pre in &lt;&gt; brackets.</div> Fireside https://www.jpct.net/wiki/index.php?title=Help:Contents Help:Contents 2009-04-06T15:51:59Z <p>Fireside: Created page with &#039;Paste code with &lt;pre&gt; &lt;/pre&gt;&#039;</p> <hr /> <div>Paste code with &lt;pre&gt; &lt;/pre&gt;</div> Fireside https://www.jpct.net/wiki/index.php?title=Main_Page Main Page 2009-04-06T15:47:52Z <p>Fireside: </p> <hr /> <div>&lt;big&gt;&#039;&#039;&#039;The jPCT wiki&#039;&#039;&#039;&lt;/big&gt;<br /> <br /> <br /> jPCT is a free, small, fast and easy to learn 3D engine for Java. It offers support for software and hardware rendering. This Wiki should help people with tutorials, instructions and samples. If you think that you have something to contribute, just create an account and go for it... <br /> <br /> <br /> == jPCT ressources ==<br /> <br /> [http://www.jpct.net The jPCT homepage]<br /> <br /> [http://www.jpct.net/forum2 The jPCT community]<br /> <br /> <br /> == Installation ==<br /> <br /> [[ Requirements ]]<br /> <br /> [[ How to install ]]<br /> <br /> <br /> == How to start ==<br /> <br /> [[ First steps ]]<br /> <br /> [[ Hello World ]]<br /> <br /> [[ Loading models ]]<br /> <br /> [[ Advanced example ]]<br /> <br /> <br /> == Advanced topics ==<br /> <br /> [[ the different renderers ]]<br /> <br /> [[ collision detection ]]<br /> <br /> [[ multithreading ]]<br /> <br /> [[ compiling objects ]]<br /> <br /> <br /> == Code Snippets ==</div> Fireside https://www.jpct.net/wiki/index.php?title=Loading_3ds_Keyframes_from_Blender Loading 3ds Keyframes from Blender 2009-04-05T21:35:14Z <p>Fireside: </p> <hr /> <div>3ds files can also be used for building an animation. In this view I have rigged the man from the previous tutorial and done a walk animation. Although there are 5 key frames in the walk animation in Blender, the last and first are the same so only four are necessary. The key frames are exported one at a time by clicking on the keyframe and then selecting the model rather than the skeleton and exporting the same way. I named these walk1- walk4.<br /> [[File:Bl_anim.jpg]]<br /> <br /> In the code below an animation sequence is added to the object and there is a new function called doAnim() which moves the key frames. The indexes for the animation really start at one, since a zero is a combination of all sequences. Here the animation is set for walk (2); I started loading the animation walk sequence at walk2 because it matches an idle better for a smoother transition from idle to walk.<br /> <br /> <br /> &lt;pre&gt;<br /> import com.threed.jpct.*;<br /> import javax.swing.*;<br /> <br /> <br /> public class HelloWorldSoftware {<br /> <br /> private String[] textures = {&quot;bman&quot;};<br /> private String thingName = &quot;bman&quot;;<br /> private int thingScale = 1;<br /> private World world;<br /> private FrameBuffer buffer;<br /> private Object3D thing;<br /> private JFrame frame;<br /> private int an = 2;//do a walk animation<br /> private float ind = 0;<br /> <br /> public static void main(String[] args) throws Exception {<br /> new HelloWorldSoftware().loop();<br /> }<br /> <br /> public HelloWorldSoftware() throws Exception {<br /> <br /> frame = new JFrame(&quot;Blender Model Loading&quot;);<br /> frame.setSize(350, 300);<br /> frame.setVisible(true);<br /> frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);<br /> world = new World();<br /> world.setAmbientLight(150, 150, 150);<br /> for (int i = 0; i &lt; textures.length; ++i) {<br /> TextureManager.getInstance().addTexture(textures[i] + &quot;.jpg&quot;, new Texture(&quot;res/&quot; + textures[i] + &quot;.jpg&quot;));<br /> }<br /> <br /> thing = loadModel(&quot;res/&quot; + thingName + &quot;.3ds&quot;, thingScale);<br /> <br /> Animation anim = new Animation(5);<br /> anim.createSubSequence(&quot;idle&quot;);<br /> anim.addKeyFrame(thing.getMesh()); <br /> <br /> anim.createSubSequence(&quot;walk&quot;);<br /> anim.addKeyFrame(loadModel(&quot;res/&quot; + &quot;walk2.3ds&quot;, 1).getMesh());<br /> anim.addKeyFrame(loadModel(&quot;res/&quot; + &quot;walk3.3ds&quot;, 1).getMesh());<br /> anim.addKeyFrame(loadModel(&quot;res/&quot; + &quot;walk4.3ds&quot;, 1).getMesh());<br /> anim.addKeyFrame(loadModel(&quot;res/&quot; + &quot;walk1.3ds&quot;, 1).getMesh());<br /> <br /> thing.setAnimationSequence(anim);<br /> world.addObject(thing); <br /> world.getCamera().setPosition(0, 0, -20);<br /> world.getCamera().lookAt(thing.getTransformedCenter());<br /> }<br /> <br /> private void loop() throws Exception {<br /> buffer = new FrameBuffer(350, 300, FrameBuffer.SAMPLINGMODE_NORMAL);<br /> <br /> while (frame.isShowing()) {<br /> doAnim(); <br /> buffer.clear(java.awt.Color.BLUE); <br /> world.renderScene(buffer);<br /> <br /> world.draw(buffer);<br /> buffer.update();<br /> buffer.display(frame.getGraphics());<br /> Thread.sleep(10);<br /> }<br /> buffer.disableRenderer(IRenderer.RENDERER_OPENGL);<br /> buffer.dispose();<br /> frame.dispose();<br /> System.exit(0);<br /> }<br /> <br /> private Object3D loadModel(String filename, float scale) {<br /> Object3D[] model = Loader.load3DS(filename, scale);<br /> <br /> Object3D o3d = new Object3D(0);<br /> <br /> Object3D temp = null;<br /> <br /> for (int i = 0; i &lt; model.length; i++) {<br /> temp = model[i];<br /> temp.setCenter(SimpleVector.ORIGIN);<br /> temp.rotateX((float)( -.5*Math.PI));<br /> temp.rotateMesh();<br /> temp.setRotationMatrix(new Matrix());<br /> o3d = Object3D.mergeObjects(o3d, temp);<br /> o3d.build();<br /> }<br /> return o3d;<br /> }<br /> public void doAnim() {<br /> {<br /> ind += 0.018f;<br /> if (ind &gt; 1f) {<br /> ind -= 1f;<br /> }<br /> }<br /> thing.animate(ind, an);<br /> }<br /> }<br /> &lt;/pre&gt;</div> Fireside https://www.jpct.net/wiki/index.php?title=Loading_3ds_Keyframes_from_Blender Loading 3ds Keyframes from Blender 2009-04-05T21:29:33Z <p>Fireside: </p> <hr /> <div>3ds files can also be used for building an animation. In this view I have rigged the man from the previous tutorial and done a walk animation. Although there are 5 key frames in the walk animation in Blender, the last and first are the same so only four are necessary. The key frames are exported one at a time by clicking on the keyframe and then selecting the model rather than the skeleton and exporting the same way. I named these walk1- walk4.<br /> [[File:Bl_anim.jpg]]<br /> <br /> In the code below an animation sequence is added to the object and there is a new function called doAnim() which moves the key frames. The indexes for the animation really start at one, since a zero is a combination of all sequences. Here the animation is set for walk (2); I started loading the animation walk sequence at walk2 because it matches an idle better for a smoother transition from idle to walk.<br /> <br /> <br /> &lt;pre&gt;<br /> import com.threed.jpct.*;<br /> import javax.swing.*;<br /> <br /> <br /> public class HelloWorldSoftware {<br /> <br /> private String[] textures = {&quot;bman&quot;};<br /> private String thingName = &quot;bman&quot;;<br /> private int thingScale = 1;//end <br /> private World world;<br /> private FrameBuffer buffer;<br /> private Object3D thing;<br /> private JFrame frame;<br /> private int an = 2;<br /> private float ind = 0;<br /> <br /> public static void main(String[] args) throws Exception {<br /> new HelloWorldSoftware().loop();<br /> }<br /> <br /> public HelloWorldSoftware() throws Exception {<br /> <br /> frame = new JFrame(&quot;Blender Model Loading&quot;);<br /> frame.setSize(350, 300);<br /> frame.setVisible(true);<br /> frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);<br /> world = new World();<br /> world.setAmbientLight(150, 150, 150);<br /> for (int i = 0; i &lt; textures.length; ++i) {<br /> TextureManager.getInstance().addTexture(textures[i] + &quot;.jpg&quot;, new Texture(&quot;res/&quot; + textures[i] + &quot;.jpg&quot;));<br /> }<br /> <br /> thing = loadModel(&quot;res/&quot; + thingName + &quot;.3ds&quot;, thingScale);<br /> <br /> Animation anim = new Animation(5);<br /> anim.createSubSequence(&quot;idle&quot;);<br /> anim.addKeyFrame(thing.getMesh()); <br /> <br /> anim.createSubSequence(&quot;walk&quot;);<br /> anim.addKeyFrame(loadModel(&quot;res/&quot; + &quot;walk2.3ds&quot;, 1).getMesh());<br /> anim.addKeyFrame(loadModel(&quot;res/&quot; + &quot;walk3.3ds&quot;, 1).getMesh());<br /> anim.addKeyFrame(loadModel(&quot;res/&quot; + &quot;walk4.3ds&quot;, 1).getMesh());<br /> anim.addKeyFrame(loadModel(&quot;res/&quot; + &quot;walk1.3ds&quot;, 1).getMesh());<br /> <br /> thing.setAnimationSequence(anim);<br /> world.addObject(thing); <br /> world.getCamera().setPosition(0, 0, -20);<br /> world.getCamera().lookAt(thing.getTransformedCenter());<br /> }<br /> <br /> private void loop() throws Exception {<br /> buffer = new FrameBuffer(350, 300, FrameBuffer.SAMPLINGMODE_NORMAL);<br /> <br /> while (frame.isShowing()) {<br /> doAnim(); <br /> buffer.clear(java.awt.Color.BLUE); <br /> world.renderScene(buffer);<br /> <br /> world.draw(buffer);<br /> buffer.update();<br /> buffer.display(frame.getGraphics());<br /> Thread.sleep(10);<br /> }<br /> buffer.disableRenderer(IRenderer.RENDERER_OPENGL);<br /> buffer.dispose();<br /> frame.dispose();<br /> System.exit(0);<br /> }<br /> <br /> private Object3D loadModel(String filename, float scale) {<br /> Object3D[] model = Loader.load3DS(filename, scale);<br /> <br /> Object3D o3d = new Object3D(0);<br /> <br /> Object3D temp = null;<br /> <br /> for (int i = 0; i &lt; model.length; i++) {<br /> temp = model[i];<br /> temp.setCenter(SimpleVector.ORIGIN);<br /> temp.rotateX((float)( -.5*Math.PI));<br /> temp.rotateMesh();<br /> temp.setRotationMatrix(new Matrix());<br /> o3d = Object3D.mergeObjects(o3d, temp);<br /> o3d.build();<br /> }<br /> return o3d;<br /> }<br /> public void doAnim() {<br /> {<br /> ind += 0.018f;<br /> if (ind &gt; 1f) {<br /> ind -= 1f;<br /> }<br /> }<br /> thing.animate(ind, an);<br /> }<br /> }<br /> &lt;/pre&gt;</div> Fireside https://www.jpct.net/wiki/index.php?title=Loading_3ds_Keyframes_from_Blender Loading 3ds Keyframes from Blender 2009-04-05T21:18:32Z <p>Fireside: </p> <hr /> <div>3ds files can also be used for building an animation. In this view I have rigged the man from the previous tutorial and done a walk animation. Although there are 5 key frames in the walk animation in Blender, the last and first are the same so only four are necessary. The key frames are exported one at a time by clicking on the keyframe and then selecting the model rather than the skeleton and exporting the same way. I named these walk1- walk4.<br /> [[File:Bl_anim.jpg]]<br /> <br /> In the code below an animation sequence is added to the object and there is a new function called doAnim() which moves the key frames. The indexes for the animation really start at one, since a zero is a combination of all sequences. Here the animation is set for walk (2);<br /> <br /> <br /> &lt;pre&gt;<br /> import com.threed.jpct.*;<br /> import javax.swing.*;<br /> <br /> <br /> public class HelloWorldSoftware {<br /> <br /> private String[] textures = {&quot;bman&quot;};<br /> private String thingName = &quot;bman&quot;;<br /> private int thingScale = 1;//end <br /> private World world;<br /> private FrameBuffer buffer;<br /> private Object3D thing;<br /> private JFrame frame;<br /> private int an = 2;<br /> private float ind = 0;<br /> <br /> public static void main(String[] args) throws Exception {<br /> new HelloWorldSoftware().loop();<br /> }<br /> <br /> public HelloWorldSoftware() throws Exception {<br /> <br /> frame = new JFrame(&quot;Blender Model Loading&quot;);<br /> frame.setSize(350, 300);<br /> frame.setVisible(true);<br /> frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);<br /> world = new World();<br /> world.setAmbientLight(150, 150, 150);<br /> for (int i = 0; i &lt; textures.length; ++i) {<br /> TextureManager.getInstance().addTexture(textures[i] + &quot;.jpg&quot;, new Texture(&quot;res/&quot; + textures[i] + &quot;.jpg&quot;));<br /> }<br /> <br /> thing = loadModel(&quot;res/&quot; + thingName + &quot;.3ds&quot;, thingScale);<br /> <br /> Animation anim = new Animation(5);<br /> anim.createSubSequence(&quot;idle&quot;);<br /> anim.addKeyFrame(thing.getMesh()); <br /> <br /> anim.createSubSequence(&quot;walk&quot;);<br /> anim.addKeyFrame(loadModel(&quot;res/&quot; + &quot;walk2.3ds&quot;, 1).getMesh());<br /> anim.addKeyFrame(loadModel(&quot;res/&quot; + &quot;walk3.3ds&quot;, 1).getMesh());<br /> anim.addKeyFrame(loadModel(&quot;res/&quot; + &quot;walk4.3ds&quot;, 1).getMesh());<br /> anim.addKeyFrame(loadModel(&quot;res/&quot; + &quot;walk1.3ds&quot;, 1).getMesh());<br /> <br /> thing.setAnimationSequence(anim);<br /> world.addObject(thing); <br /> world.getCamera().setPosition(0, 0, -20);<br /> world.getCamera().lookAt(thing.getTransformedCenter());<br /> }<br /> <br /> private void loop() throws Exception {<br /> buffer = new FrameBuffer(350, 300, FrameBuffer.SAMPLINGMODE_NORMAL);<br /> <br /> while (frame.isShowing()) {<br /> doAnim(); <br /> buffer.clear(java.awt.Color.BLUE); <br /> world.renderScene(buffer);<br /> <br /> world.draw(buffer);<br /> buffer.update();<br /> buffer.display(frame.getGraphics());<br /> Thread.sleep(10);<br /> }<br /> buffer.disableRenderer(IRenderer.RENDERER_OPENGL);<br /> buffer.dispose();<br /> frame.dispose();<br /> System.exit(0);<br /> }<br /> <br /> private Object3D loadModel(String filename, float scale) {<br /> Object3D[] model = Loader.load3DS(filename, scale);<br /> <br /> Object3D o3d = new Object3D(0);<br /> <br /> Object3D temp = null;<br /> <br /> for (int i = 0; i &lt; model.length; i++) {<br /> temp = model[i];<br /> temp.setCenter(SimpleVector.ORIGIN);<br /> temp.rotateX((float)( -.5*Math.PI));<br /> temp.rotateMesh();<br /> temp.setRotationMatrix(new Matrix());<br /> o3d = Object3D.mergeObjects(o3d, temp);<br /> o3d.build();<br /> }<br /> return o3d;<br /> }<br /> public void doAnim() {<br /> {<br /> ind += 0.018f;<br /> if (ind &gt; 1f) {<br /> ind -= 1f;<br /> }<br /> }<br /> thing.animate(ind, an);<br /> }<br /> }<br /> &lt;/pre&gt;</div> Fireside https://www.jpct.net/wiki/index.php?title=Loading_3ds_Keyframes_from_Blender Loading 3ds Keyframes from Blender 2009-04-05T21:16:32Z <p>Fireside: </p> <hr /> <div>3ds files can also be used for building an animation. In this view I have rigged the man from the previous tutorial and done a walk animation. Although there are 5 key frames in the walk animation in Blender, the last and first are the same so only four are necessary. The key frames are exported one at a time by clicking on the keyframe and then selecting the model rather than the skeleton and exporting the same way. I named these walk1- walk4.<br /> [[File:Bl_anim.jpg]]<br /> <br /> In the code below an animation sequence is added to the object and there is a new function called doAnim() which moves the key frames. The indexes for the animation really start at one, since a zero is a combination of all sequences. Here the animation is set for walk (2);<br /> <br /> <br /> &lt;pre&gt;<br /> import com.threed.jpct.*;<br /> import javax.swing.*;<br /> <br /> <br /> public class HelloWorldSoftware {<br /> <br /> private String[] textures = {&quot;bman&quot;};<br /> private String thingName = &quot;walk1&quot;;<br /> private int thingScale = 1;//end <br /> private World world;<br /> private FrameBuffer buffer;<br /> private Object3D thing;<br /> private JFrame frame;<br /> private int an = 2;<br /> private float ind = 0;<br /> <br /> public static void main(String[] args) throws Exception {<br /> new HelloWorldSoftware().loop();<br /> }<br /> <br /> public HelloWorldSoftware() throws Exception {<br /> <br /> frame = new JFrame(&quot;Blender Model Loading&quot;);<br /> frame.setSize(350, 300);<br /> frame.setVisible(true);<br /> frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);<br /> world = new World();<br /> world.setAmbientLight(150, 150, 150);<br /> for (int i = 0; i &lt; textures.length; ++i) {<br /> TextureManager.getInstance().addTexture(textures[i] + &quot;.jpg&quot;, new Texture(&quot;res/&quot; + textures[i] + &quot;.jpg&quot;));<br /> }<br /> <br /> thing = loadModel(&quot;res/&quot; + thingName + &quot;.3ds&quot;, thingScale);<br /> <br /> Animation anim = new Animation(5);<br /> anim.createSubSequence(&quot;idle&quot;);<br /> anim.addKeyFrame(thing.getMesh()); <br /> <br /> anim.createSubSequence(&quot;walk&quot;);<br /> anim.addKeyFrame(loadModel(&quot;res/&quot; + &quot;walk2.3ds&quot;, 1).getMesh());<br /> anim.addKeyFrame(loadModel(&quot;res/&quot; + &quot;walk3.3ds&quot;, 1).getMesh());<br /> anim.addKeyFrame(loadModel(&quot;res/&quot; + &quot;walk4.3ds&quot;, 1).getMesh());<br /> anim.addKeyFrame(loadModel(&quot;res/&quot; + &quot;walk1.3ds&quot;, 1).getMesh());<br /> <br /> thing.setAnimationSequence(anim);<br /> world.addObject(thing); <br /> world.getCamera().setPosition(0, 0, -20);<br /> world.getCamera().lookAt(thing.getTransformedCenter());<br /> }<br /> <br /> private void loop() throws Exception {<br /> buffer = new FrameBuffer(350, 300, FrameBuffer.SAMPLINGMODE_NORMAL);<br /> <br /> while (frame.isShowing()) {<br /> doAnim(); <br /> buffer.clear(java.awt.Color.BLUE); <br /> world.renderScene(buffer);<br /> <br /> world.draw(buffer);<br /> buffer.update();<br /> buffer.display(frame.getGraphics());<br /> Thread.sleep(10);<br /> }<br /> buffer.disableRenderer(IRenderer.RENDERER_OPENGL);<br /> buffer.dispose();<br /> frame.dispose();<br /> System.exit(0);<br /> }<br /> <br /> private Object3D loadModel(String filename, float scale) {<br /> Object3D[] model = Loader.load3DS(filename, scale);<br /> <br /> Object3D o3d = new Object3D(0);<br /> <br /> Object3D temp = null;<br /> <br /> for (int i = 0; i &lt; model.length; i++) {<br /> temp = model[i];<br /> temp.setCenter(SimpleVector.ORIGIN);<br /> temp.rotateX((float)( -.5*Math.PI));<br /> temp.rotateMesh();<br /> temp.setRotationMatrix(new Matrix());<br /> o3d = Object3D.mergeObjects(o3d, temp);<br /> o3d.build();<br /> }<br /> return o3d;<br /> }<br /> public void doAnim() {<br /> {<br /> ind += 0.018f;<br /> if (ind &gt; 1f) {<br /> ind -= 1f;<br /> }<br /> }<br /> thing.animate(ind, an);<br /> }<br /> }<br /> &lt;/pre&gt;</div> Fireside https://www.jpct.net/wiki/index.php?title=Loading_3ds_Keyframes_from_Blender Loading 3ds Keyframes from Blender 2009-04-05T21:08:08Z <p>Fireside: Created page with &#039;[File:Bl_anim.jpg]&#039;</p> <hr /> <div>[File:Bl_anim.jpg]</div> Fireside https://www.jpct.net/wiki/index.php?title=Loading_models Loading models 2009-04-05T21:07:12Z <p>Fireside: </p> <hr /> <div>[[Loading 3ds Models from Blender]]<br /> <br /> [[Loading 3ds Keyframes from Blender]]</div> Fireside https://www.jpct.net/wiki/index.php?title=File:Bl_anim.jpg File:Bl anim.jpg 2009-04-05T21:05:15Z <p>Fireside: </p> <hr /> <div></div> Fireside https://www.jpct.net/wiki/index.php?title=Loading_3ds_Models_from_Blender Loading 3ds Models from Blender 2009-04-05T21:02:27Z <p>Fireside: </p> <hr /> <div>Loading a 3ds file from Blender is fairly straight forward. Below is a quick model which I made and did a simple texture on. If the image texture window is used during texturing the coordinates and name will be exported. The name needs to be 8 characters with three for the extension or some characters will be cut off and it will be harder to load into Jpct. It&#039;s a good idea to select all the vertices and hit cntrl-t after making your model in order to export triangles. I have exported quads and they have worked so far, however. I switch to object mode before I export. Then Hit File-&gt;export-&gt;3ds. I named this character bman and texture is called bman.jpg.<br /> [[File:Bman1.jpg]]<br /> <br /> Now we can load it into a modified version of the [[Hello World]] program. Notice that the texture is loaded first. Also notice the loadmodel function which does a bunch of things, which are pretty much standard I guess, except for the rotations which are used to orient the blender model in the same way it was in Blender.<br /> <br /> &lt;pre&gt;<br /> <br /> import com.threed.jpct.*;<br /> import javax.swing.*;<br /> <br /> public class HelloWorldSoftware {<br /> private String[] textures = {&quot;bman&quot;};<br /> private String thingName = &quot;bman&quot;;<br /> private int thingScale = 1;//end <br /> private World world;<br /> private FrameBuffer buffer;<br /> private Object3D thing;<br /> private JFrame frame;<br /> <br /> public static void main(String[] args) throws Exception {<br /> new HelloWorldSoftware().loop();<br /> }<br /> <br /> public HelloWorldSoftware() throws Exception {<br /> frame = new JFrame(&quot;Blender Model Loading&quot;);<br /> frame.setSize(350, 300);<br /> frame.setVisible(true);<br /> frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);<br /> world = new World();<br /> world.setAmbientLight(150, 150, 150);<br /> for (int i = 0; i &lt; textures.length; ++i) {<br /> TextureManager.getInstance().addTexture(textures[i] + &quot;.jpg&quot;, new Texture(&quot;res/&quot; + textures[i] + &quot;.jpg&quot;));<br /> }<br /> thing = loadModel(&quot;res/&quot; + thingName + &quot;.3ds&quot;, thingScale);<br /> thing.build();<br /> world.addObject(thing);<br /> world.getCamera().setPosition(0, 0, -20);<br /> world.getCamera().lookAt(thing.getTransformedCenter());<br /> }<br /> <br /> private void loop() throws Exception {<br /> buffer = new FrameBuffer(350, 300, FrameBuffer.SAMPLINGMODE_NORMAL);<br /> while (frame.isShowing()) {<br /> SimpleVector place = new SimpleVector();<br /> buffer.clear(java.awt.Color.BLUE);<br /> world.renderScene(buffer);<br /> world.draw(buffer);<br /> buffer.update();<br /> buffer.display(frame.getGraphics());<br /> Thread.sleep(10);<br /> }<br /> buffer.disableRenderer(IRenderer.RENDERER_OPENGL);<br /> buffer.dispose();<br /> frame.dispose();<br /> System.exit(0);<br /> }<br /> <br /> private Object3D loadModel(String filename, float scale) {<br /> Object3D[] model = Loader.load3DS(filename, scale);<br /> Object3D o3d = new Object3D(0);<br /> Object3D temp = null;<br /> for (int i = 0; i &lt; model.length; i++) {<br /> temp = model[i];<br /> temp.setCenter(SimpleVector.ORIGIN);<br /> temp.rotateX((float)( -.5*Math.PI));<br /> temp.rotateMesh();<br /> temp.setRotationMatrix(new Matrix());<br /> o3d = Object3D.mergeObjects(o3d, temp);<br /> o3d.build();<br /> }<br /> return o3d;<br /> }<br /> }<br /> &lt;/pre&gt;</div> Fireside https://www.jpct.net/wiki/index.php?title=Loading_3ds_Models_from_Blender Loading 3ds Models from Blender 2009-04-05T16:59:22Z <p>Fireside: /* Loading a 3ds file from Blender */</p> <hr /> <div><br /> Loading a 3ds file from Blender is fairly straight forward. Below is a quick model which I made and did a simple texture on. If the image texture window is used during texturing the coordinates and name will be exported. The name needs to be 8 characters with three for the extension or some characters will be cut off and it will be harder to load into Jpct. It&#039;s a good idea to select all the vertices and hit cntrl-t after making your model in order to export triangles. I have exported quads and they have worked so far, however. I switch to object mode before I export. Then Hit File-&gt;export-&gt;3ds. I named this character bman and texture is called bman.jpg.<br /> [[File:Bman1.jpg]]<br /> <br /> Now we can load it into a modified version of the Hello World program. Notice that the texture is loaded first. Also notice the loadmodel function which does a bunch of things, which are pretty much standard I guess, except for the rotations which are used to orient the blender model in the same way it was in Blender.<br /> <br /> &lt;pre&gt;<br /> <br /> import com.threed.jpct.*;<br /> import javax.swing.*;<br /> <br /> public class HelloWorldSoftware {<br /> private String[] textures = {&quot;bman&quot;};<br /> private String thingName = &quot;bman&quot;;<br /> private int thingScale = 1;//end <br /> private World world;<br /> private FrameBuffer buffer;<br /> private Object3D thing;<br /> private JFrame frame;<br /> <br /> public static void main(String[] args) throws Exception {<br /> new HelloWorldSoftware().loop();<br /> }<br /> <br /> public HelloWorldSoftware() throws Exception {<br /> frame = new JFrame(&quot;Blender Model Loading&quot;);<br /> frame.setSize(350, 300);<br /> frame.setVisible(true);<br /> frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);<br /> world = new World();<br /> world.setAmbientLight(150, 150, 150);<br /> for (int i = 0; i &lt; textures.length; ++i) {<br /> TextureManager.getInstance().addTexture(textures[i] + &quot;.jpg&quot;, new Texture(&quot;res/&quot; + textures[i] + &quot;.jpg&quot;));<br /> }<br /> thing = loadModel(&quot;res/&quot; + thingName + &quot;.3ds&quot;, thingScale);<br /> thing.build();<br /> world.addObject(thing);<br /> world.getCamera().setPosition(0, 0, -20);<br /> world.getCamera().lookAt(thing.getTransformedCenter());<br /> }<br /> <br /> private void loop() throws Exception {<br /> buffer = new FrameBuffer(350, 300, FrameBuffer.SAMPLINGMODE_NORMAL);<br /> while (frame.isShowing()) {<br /> SimpleVector place = new SimpleVector();<br /> buffer.clear(java.awt.Color.BLUE);<br /> world.renderScene(buffer);<br /> world.draw(buffer);<br /> buffer.update();<br /> buffer.display(frame.getGraphics());<br /> Thread.sleep(10);<br /> }<br /> buffer.disableRenderer(IRenderer.RENDERER_OPENGL);<br /> buffer.dispose();<br /> frame.dispose();<br /> System.exit(0);<br /> }<br /> <br /> private Object3D loadModel(String filename, float scale) {<br /> Object3D[] model = Loader.load3DS(filename, scale);<br /> Object3D o3d = new Object3D(0);<br /> Object3D temp = null;<br /> for (int i = 0; i &lt; model.length; i++) {<br /> temp = model[i];<br /> temp.setCenter(SimpleVector.ORIGIN);<br /> temp.rotateX((float)( -.5*Math.PI));<br /> temp.rotateY((float)Math.PI);<br /> temp.rotateMesh();<br /> temp.setRotationMatrix(new Matrix());<br /> o3d = Object3D.mergeObjects(o3d, temp);<br /> }<br /> return o3d;<br /> }<br /> }<br /> &lt;/pre&gt;</div> Fireside https://www.jpct.net/wiki/index.php?title=Loading_3ds_Models_from_Blender Loading 3ds Models from Blender 2009-04-05T12:29:55Z <p>Fireside: /* Loading a 3ds file from Blender */</p> <hr /> <div>== Loading a 3ds file from Blender ==<br /> Loading a 3ds file from Blender is fairly straight forward. Below is a quick model which I made and did a simple texture on. If the image texture window is used during texturing the coordinates and name will be exported. The name needs to be 8 characters with three for the extension or some characters will be cut off and it will be harder to load into Jpct. It&#039;s a good idea to select all the vertices and hit cntrl-t after making your model in order to export triangles. I have exported quads and they have worked so far, however. I switch to object mode before I export. Then Hit File-&gt;export-&gt;3ds. I named this character bman and texture is called bman.jpg.<br /> [[File:Bman1.jpg]]<br /> <br /> Now we can load it into a modified version of the Hello World program. Notice that the texture is loaded first. Also notice the loadmodel function which does a bunch of things, which are pretty much standard I guess, except for the rotations which are used to orient the blender model in the same way it was in Blender.<br /> <br /> <br /> &lt;code&gt;<br /> import com.threed.jpct.*;<br /> import javax.swing.*;<br /> <br /> /**<br /> Modified from Egon&#039;s HelloWorld program<br /> */<br /> public class HelloWorldSoftware {<br /> //world info<br /> <br /> private String[] textures = {&quot;bman&quot;};<br /> private String thingName = &quot;bman&quot;;<br /> private int thingScale = 1;//end <br /> private World world;<br /> private FrameBuffer buffer;<br /> private Object3D thing;<br /> private JFrame frame;<br /> <br /> public static void main(String[] args) throws Exception {<br /> new HelloWorldSoftware().loop();<br /> }<br /> <br /> public HelloWorldSoftware() throws Exception {<br /> <br /> frame = new JFrame(&quot;Blender Model Loading&quot;);<br /> frame.setSize(350, 300);<br /> frame.setVisible(true);<br /> frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);<br /> world = new World();<br /> world.setAmbientLight(150, 150, 150);<br /> for (int i = 0; i &lt; textures.length; ++i) {<br /> TextureManager.getInstance().addTexture(textures[i] + &quot;.jpg&quot;, new Texture(&quot;res/&quot; + textures[i] + &quot;.jpg&quot;));<br /> }<br /> <br /> thing = loadModel(&quot;res/&quot; + thingName + &quot;.3ds&quot;, thingScale);<br /> thing.build();<br /> world.addObject(thing);<br /> world.getCamera().setPosition(0, 0, -20);<br /> world.getCamera().lookAt(thing.getTransformedCenter());<br /> }<br /> <br /> private void loop() throws Exception {<br /> buffer = new FrameBuffer(350, 300, FrameBuffer.SAMPLINGMODE_NORMAL);<br /> <br /> while (frame.isShowing()) {<br /> SimpleVector place = new SimpleVector();<br /> buffer.clear(java.awt.Color.BLUE);<br /> world.renderScene(buffer);<br /> world.draw(buffer);<br /> buffer.update();<br /> buffer.display(frame.getGraphics());<br /> Thread.sleep(10);<br /> }<br /> buffer.disableRenderer(IRenderer.RENDERER_OPENGL);<br /> buffer.dispose();<br /> frame.dispose();<br /> System.exit(0);<br /> }<br /> <br /> private Object3D loadModel(String filename, float scale) {<br /> Object3D[] model = Loader.load3DS(filename, scale);<br /> <br /> Object3D o3d = new Object3D(0);<br /> <br /> Object3D temp = null;<br /> <br /> for (int i = 0; i &lt; model.length; i++) {<br /> temp = model[i];<br /> temp.setCenter(SimpleVector.ORIGIN);<br /> temp.rotateX((float)( -.5*Math.PI));<br /> temp.rotateY((float)Math.PI);<br /> temp.rotateMesh();<br /> temp.setRotationMatrix(new Matrix());<br /> o3d = Object3D.mergeObjects(o3d, temp);<br /> <br /> }<br /> return o3d;<br /> }<br /> <br /> }<br /> &lt;/code&gt;</div> Fireside https://www.jpct.net/wiki/index.php?title=Loading_3ds_Models_from_Blender Loading 3ds Models from Blender 2009-04-05T12:16:28Z <p>Fireside: /* Loading a 3ds file from Blender */</p> <hr /> <div>== Loading a 3ds file from Blender ==<br /> Loading a 3ds file from Blender is fairly straight forward. Below is a quick model which I made and did a simple texture on. If the image texture window is used during texturing the coordinates and name will be exported. The name needs to be 8 characters with three for the extension or some characters will be cut off and it will be harder to load into Jpct. It&#039;s a good idea to select all the vertices and hit cntrl-t after making your model in order to export triangles. I have exported quads and they have worked so far, however. I switch to object mode before I export. Then Hit File-&gt;export-&gt;3ds. I named this character bman and texture is called bman.jpg.<br /> [[File:Bman1.jpg]]<br /> <br /> Now we can load it into a modified version of the Hello World program. Notice that the texture is loaded first. Also notice the loadmodel function which does a bunch of things, which are pretty much standard I guess, except for the rotations which are used to orient the blender model in the same way it was in Blender.<br /> <br /> <br /> &lt;code&gt;<br /> import com.threed.jpct.*;<br /> import javax.swing.*;<br /> <br /> /**<br /> Modified code from Egon&#039;s HelloWorld program<br /> */<br /> public class HelloWorldSoftware {<br /> //world info<br /> <br /> private String[] textures = {&quot;bman&quot;};<br /> private String thingName = &quot;bman&quot;;<br /> private int thingScale = 1;//end <br /> private World world;<br /> private FrameBuffer buffer;<br /> private Object3D thing;<br /> private JFrame frame;<br /> <br /> public static void main(String[] args) throws Exception {<br /> new HelloWorldSoftware().loop();<br /> }<br /> <br /> public HelloWorldSoftware() throws Exception {<br /> <br /> frame = new JFrame(&quot;Blender Model Loading&quot;);<br /> frame.setSize(350, 300);<br /> frame.setVisible(true);<br /> frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);<br /> world = new World();<br /> world.setAmbientLight(150, 150, 150);<br /> for (int i = 0; i &lt; textures.length; ++i) {<br /> TextureManager.getInstance().addTexture(textures[i] + &quot;.jpg&quot;, new Texture(&quot;res/&quot; + textures[i] + &quot;.jpg&quot;));<br /> }<br /> <br /> thing = loadModel(&quot;res/&quot; + thingName + &quot;.3ds&quot;, thingScale);<br /> thing.build();<br /> world.addObject(thing);<br /> world.getCamera().setPosition(0, 0, -20);<br /> world.getCamera().lookAt(thing.getTransformedCenter());<br /> }<br /> <br /> private void loop() throws Exception {<br /> buffer = new FrameBuffer(350, 300, FrameBuffer.SAMPLINGMODE_NORMAL);<br /> <br /> while (frame.isShowing()) {<br /> SimpleVector place = new SimpleVector();<br /> buffer.clear(java.awt.Color.BLUE);<br /> world.renderScene(buffer);<br /> world.draw(buffer);<br /> buffer.update();<br /> buffer.display(frame.getGraphics());<br /> Thread.sleep(10);<br /> }<br /> buffer.disableRenderer(IRenderer.RENDERER_OPENGL);<br /> buffer.dispose();<br /> frame.dispose();<br /> System.exit(0);<br /> }<br /> <br /> private Object3D loadModel(String filename, float scale) {<br /> Object3D[] model = Loader.load3DS(filename, scale);<br /> <br /> Object3D o3d = new Object3D(0);<br /> <br /> Object3D temp = null;<br /> <br /> for (int i = 0; i &lt; model.length; i++) {<br /> temp = model[i];<br /> temp.setCenter(SimpleVector.ORIGIN);<br /> temp.rotateX((float)( -.5*Math.PI));<br /> temp.rotateY((float)Math.PI);<br /> temp.rotateMesh();<br /> temp.setRotationMatrix(new Matrix());<br /> o3d = Object3D.mergeObjects(o3d, temp);<br /> <br /> }<br /> return o3d;<br /> }<br /> <br /> }<br /> &lt;/code&gt;</div> Fireside https://www.jpct.net/wiki/index.php?title=Loading_3ds_Models_from_Blender Loading 3ds Models from Blender 2009-04-05T12:14:14Z <p>Fireside: /* Loading a 3ds file from Blender */</p> <hr /> <div>== Loading a 3ds file from Blender ==<br /> Loading a 3ds file from Blender is fairly straight forward. Below is a quick model which I made and did a simple texture on. If the image texture window is used during texturing the coordinates and name will be exported. The name needs to be 8 characters with three for the extension or some characters will be cut off and it will be harder to load into Jpct. It&#039;s a good idea to select all the vertices and hit cntrl-t after making your model in order to export triangles. I have exported quads and they have worked so far, however. I switch to object mode before I export. Then Hit File-&gt;export-&gt;3ds. I named this character bman and texture is called bman.jpg.<br /> [[File:Bman1.jpg]]<br /> <br /> Now we can load it into a modified version of the Hello World program. Notice that the texture is loaded first. Also notice the loadmodel function which does a bunch of things, which are pretty much standard I guess, except for the rotations which are used to orient the blender model in the same way it was in Blender.<br /> &lt;code&gt;<br /> import com.threed.jpct.*;<br /> import javax.swing.*;<br /> <br /> /**<br /> Modified code from Egon&#039;s HelloWorld program<br /> */<br /> public class HelloWorldSoftware {<br /> //world info<br /> <br /> private String[] textures = {&quot;bman&quot;};<br /> private String thingName = &quot;bman&quot;;<br /> private int thingScale = 1;//end <br /> private World world;<br /> private FrameBuffer buffer;<br /> private Object3D thing;<br /> private JFrame frame;<br /> <br /> public static void main(String[] args) throws Exception {<br /> new HelloWorldSoftware().loop();<br /> }<br /> <br /> public HelloWorldSoftware() throws Exception {<br /> <br /> frame = new JFrame(&quot;Blender Model Loading&quot;);<br /> frame.setSize(350, 300);<br /> frame.setVisible(true);<br /> frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);<br /> world = new World();<br /> world.setAmbientLight(150, 150, 150);<br /> for (int i = 0; i &lt; textures.length; ++i) {<br /> TextureManager.getInstance().addTexture(textures[i] + &quot;.jpg&quot;, new Texture(&quot;res/&quot; + textures[i] + &quot;.jpg&quot;));<br /> }<br /> <br /> thing = loadModel(&quot;res/&quot; + thingName + &quot;.3ds&quot;, thingScale);<br /> thing.build();<br /> world.addObject(thing);<br /> world.getCamera().setPosition(0, 0, -20);<br /> world.getCamera().lookAt(thing.getTransformedCenter());<br /> }<br /> <br /> private void loop() throws Exception {<br /> buffer = new FrameBuffer(350, 300, FrameBuffer.SAMPLINGMODE_NORMAL);<br /> <br /> while (frame.isShowing()) {<br /> SimpleVector place = new SimpleVector();<br /> buffer.clear(java.awt.Color.BLUE);<br /> world.renderScene(buffer);<br /> world.draw(buffer);<br /> buffer.update();<br /> buffer.display(frame.getGraphics());<br /> Thread.sleep(10);<br /> }<br /> buffer.disableRenderer(IRenderer.RENDERER_OPENGL);<br /> buffer.dispose();<br /> frame.dispose();<br /> System.exit(0);<br /> }<br /> <br /> private Object3D loadModel(String filename, float scale) {<br /> Object3D[] model = Loader.load3DS(filename, scale);<br /> <br /> Object3D o3d = new Object3D(0);<br /> <br /> Object3D temp = null;<br /> <br /> for (int i = 0; i &lt; model.length; i++) {<br /> temp = model[i];<br /> temp.setCenter(SimpleVector.ORIGIN);<br /> temp.rotateX((float)( -.5*Math.PI));<br /> temp.rotateY((float)Math.PI);<br /> temp.rotateMesh();<br /> temp.setRotationMatrix(new Matrix());<br /> o3d = Object3D.mergeObjects(o3d, temp);<br /> <br /> }<br /> return o3d;<br /> }<br /> <br /> }<br /> &lt;/code&gt;</div> Fireside https://www.jpct.net/wiki/index.php?title=Loading_3ds_Models_from_Blender Loading 3ds Models from Blender 2009-04-05T11:10:11Z <p>Fireside: /* Loading a 3ds file from Blender */</p> <hr /> <div>== Loading a 3ds file from Blender ==<br /> Loading a 3ds file from Blender is fairly straight forward. Below is a quick model which I made and did a simple texture on. If the image texture window is used during texturing the coordinates and name will be exported. The name needs to be 8 characters with three for the extension or some characters will be cut off and it will be harder to load into Jpct. It&#039;s a good idea to select all the vertices and hit cntrl-t after making your model in order to export triangles. I have exported quads and they have worked so far, however. I switch to object mode before I export. Then Hit File-&gt;export-&gt;3ds. I named this character bman and texture is called bman.jpg.<br /> [[File:Bman1.jpg]]<br /> <br /> Now we can load it into a modified version of the Hello World program. Notice that the texture is loaded first. Also notice the loadmodel function which does a bunch of things, which are pretty much standard I guess, except for the rotations which are used to orient the blender model in the same way it was in Blender.<br /> &quot;<br /> import com.threed.jpct.*;<br /> import javax.swing.*;<br /> <br /> /**<br /> Modified code from Egon&#039;s HelloWorld program<br /> */<br /> public class HelloWorldSoftware {<br /> //world info<br /> <br /> private String[] textures = {&quot;bman&quot;};<br /> private String thingName = &quot;bman&quot;;<br /> private int thingScale = 10;//end <br /> private World world;<br /> private FrameBuffer buffer;<br /> private Object3D thing;<br /> private JFrame frame;<br /> <br /> public static void main(String[] args) throws Exception {<br /> new HelloWorldSoftware().loop();<br /> }<br /> <br /> public HelloWorldSoftware() throws Exception {<br /> <br /> frame = new JFrame(&quot;Blender Model Loading&quot;);<br /> frame.setSize(350, 300);<br /> frame.setVisible(true);<br /> frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);<br /> world = new World();<br /> world.setAmbientLight(150, 150, 150);<br /> for (int i = 0; i &lt; textures.length; ++i) {<br /> TextureManager.getInstance().addTexture(textures[i] + &quot;.jpg&quot;, new Texture(&quot;res/&quot; + textures[i] + &quot;.jpg&quot;));<br /> }<br /> <br /> thing = loadModel(&quot;res/&quot; + thingName + &quot;.3ds&quot;, 1);<br /> thing.build();<br /> thing.setScale(thingScale);<br /> world.addObject(thing);<br /> world.getCamera().setPosition(25, 25, -5);<br /> world.getCamera().lookAt(thing.getTransformedCenter());<br /> }<br /> <br /> private void loop() throws Exception {<br /> buffer = new FrameBuffer(350, 300, FrameBuffer.SAMPLINGMODE_NORMAL);<br /> <br /> while (frame.isShowing()) {<br /> SimpleVector place = new SimpleVector();<br /> buffer.clear(java.awt.Color.BLUE);<br /> setCamera();<br /> world.renderScene(buffer);<br /> world.draw(buffer);<br /> buffer.update();<br /> buffer.display(frame.getGraphics());<br /> Thread.sleep(10);<br /> }<br /> buffer.disableRenderer(IRenderer.RENDERER_OPENGL);<br /> buffer.dispose();<br /> frame.dispose();<br /> System.exit(0);<br /> }<br /> <br /> private Object3D loadModel(String filename, float scale) {<br /> Object3D[] model = Loader.load3DS(filename, scale);<br /> <br /> Object3D o3d = new Object3D(0);<br /> <br /> Object3D temp = null;<br /> <br /> for (int i = 0; i &lt; model.length; i++) {<br /> temp = model[i];<br /> temp.setCenter(SimpleVector.ORIGIN);<br /> temp.rotateX((float)( -.5*Math.PI));<br /> temp.rotateY((float)Math.PI);<br /> temp.rotateMesh();<br /> temp.setRotationMatrix(new Matrix());<br /> o3d = Object3D.mergeObjects(o3d, temp);<br /> <br /> }<br /> return o3d;<br /> }<br /> <br /> <br /> public void setCamera() {<br /> SimpleVector tc = thing.getTransformedCenter();<br /> SimpleVector pos = new SimpleVector(tc);<br /> SimpleVector zAxis = thing.getZAxis();<br /> SimpleVector yAxis = thing.getYAxis();<br /> zAxis.scalarMul(20f);<br /> yAxis.scalarMul(-5f);<br /> pos.add(zAxis);<br /> pos.add(yAxis);<br /> world.getCamera().setPosition(pos);<br /> world.getCamera().lookAt(tc);<br /> }<br /> <br /> }<br /> &quot;</div> Fireside https://www.jpct.net/wiki/index.php?title=Loading_3ds_Models_from_Blender Loading 3ds Models from Blender 2009-04-05T00:01:33Z <p>Fireside: Created page with &#039;== Loading a 3ds file from Blender == Loading a 3ds file from Blender is fairly straight forward. Below is a quick model which I made and did a simple texture on. If the image ...&#039;</p> <hr /> <div>== Loading a 3ds file from Blender ==<br /> Loading a 3ds file from Blender is fairly straight forward. Below is a quick model which I made and did a simple texture on. If the image texture window is used during texturing the coordinates and name will be exported. The name needs to be 8 characters with three for the extension or some characters will be cut off and it will be harder to load into Jpct. It&#039;s a good idea to select all the vertices and hit cntrl-t after making your model in order to export triangles. I have exported quads and they have worked so far, however. I switch to object mode before I export.<br /> [[File:Bman1.jpg]]</div> Fireside https://www.jpct.net/wiki/index.php?title=File:Bman1.jpg File:Bman1.jpg 2009-04-04T23:51:38Z <p>Fireside: First screen shot in upload 3ds file from Blender</p> <hr /> <div>First screen shot in upload 3ds file from Blender</div> Fireside https://www.jpct.net/wiki/index.php?title=Loading_models Loading models 2009-04-04T22:33:30Z <p>Fireside: Created page with &#039;Loading 3ds Models from Blender&#039;</p> <hr /> <div>[[Loading 3ds Models from Blender]]</div> Fireside
Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/WebResponse.php on line 37