I'm trying to replicate the workflow posted here: http://renaun.com/blog/2013/09/live-three-js-texture-updating-with-photoshop-cc/
This is a method for automatically refreshing a texture in Three.JS, and uses the code:
var renderer = new THREE.WebGLRenderer();
renderer.addPostPlugin(new RENAUN.LiveTextureUpdatePlugin());
When running with the most recent version of ThreeJS, the error:
THREE.WebGLRenderer: .addPostPlugin() has been removed.
Any ideas for a workaround? I can't seem to find much on addPostPlugin and would like to know how to modify the above code for the latest version.
It's removed in r69. If you need it use r68 instead.
Related
I am not a 3d modeller, and new to jeeliz face filter git library. I am trying to convert one necklest.gltf 3d model to threejs(json format) using below link.
Steps for adding threejs exporter in blender
All the steps I have followed but at the end when I am checking the checkbox to enable it, its saying "upgrade to 2.8x req".
I am using blender 2.81a. I have tested on 2.81 also still not working.
Kindly help.
It's not recommended to use the JSON Blender exporter anymore. Export your models to glTF instead and then use THREE.GLTFLoader. Notice that the exporter was removed with R93 in May 2018. Just three month after the article at medium.com was published.
three.js R113
To expand on Mugen's answer, the Blender Three.js JSON exporter was written for the previous version of Blender 2.7x. When Blender 2.8 came out, it revamped almost every aspect of its engine, and the JSON exporter is no longer supported. However, it's been replaced with a much more efficient exporter you can find in File > Export > glTF 2.0. You can read about it here.
Once you have exported your GLTF file, you can import it into Three.js with THREE.GLTFLoader.
Is the Combined Camera in Three Js depricated in the recent release or is it an issue? Because I am unable to see its documentaion which was supposed to be here. But the page is not available now. Also the example for the same is supposed to be here. It is also not available now. I have gone through the recent release versions and js files related to Combined Camera are missing in r88(latest release).Can someone suggest if I can use the Combined Camera or any other alternative to switch between Orthographic and perspective camera.
I have some codes developed using Three.js R52. I need some features in some code developed using Three.js R56. While I tried to add those features to the original codes developed in R52 and replace the reference to R52 with that to R56, it tells me some some error.
For example, in the original code based on R52, THREE.Matrix4().multiplySelf function is used. After I change the reference to three.min.js from R52 to R56, I came across errors saying:
TypeError: multiplySelf is not a function.
Then I go through the changes listed in https://github.com/mrdoob/three.js/releases by searching "Matrix4", I did not see any note related to method 'multiplySelf'. I searched "multiplySelf" and it returns no entry found. I searched three.min.js R52 and found function "multiplySelf". But there is no 'multiplySelf' in R65.
Could anybody tell me what I should do now? And in general, what is the best practice to resolve issues due to updated revisions in Three.JS? Thanks...
I would create different sandboxes with the different versions of three.js. As such, I would be able to move from one sandbox to another and testing my functions without contaminating my code. I call sandbox a folder whose name is distinctive per three.js version where I only keep functionality relevant to that release and I never mix sandboxes. Usually you would have to keep a copy of your code in each sandbox until all the translations from one release to the other have been performed.
In addition you can use code like: if (THREE.REVISION < 58) to separate the different versions of three.js in your code.
I used kinetic-v3.10.4.js for almost all my work.
Now the requirement changed and I need to add few more functionality that are available in newer versions.
So I started using kinetic-v4.0.1.js.
I made a sample file and it is working fine but few functions like saveImageData();,DetectionType.etc. are not working in 4.0.1 as they have been updated and instead of saveImageData(), createBufferImage() is the new function.
I am redoing everything with kinetic v4.0.1 now.
I can't find the old example in the website that was using createBufferImage() for image event detection as it has been updated to 4.3.3
So anyone having any old example that help in pixel detection/image detection with 4.0.1
How about searching from archived internet contents, archive.org
http://web.archive.org/web/*/http://html5canvastutorials.com
I am modifying the version of the android version of the 2d texture example from OpenGl ES2.0 programming guide to change the fragment shader. this is written in pure Java and doesn't use the NDK.
The vanilla example works just fine on my phone, but when I change the shader code it no longer works. This is because my modified shader doesn't compile (obviously), but I can't find the cause of the problem as glGetShaderInfoLog returns an empty string.
I've done a search on this issue, and apparently, as of Jul 22nd, it was a known issue, but I was wondering what ways there are of getting around it. One post I found said they had written an NDK wrapper for the function, but being new to Android development I don't really know how to do this.
You're suffering from a bug. I worked around by using the old GL ES 2.0 bindings to get a functioning glGetShaderInfoLog. Like this:
import com.badlogic.gdx.backends.android.AndroidGL20;
...
AndroidGL20 gl2 = new AndroidGL20();
Log.e(TAG, gl2.glGetShaderInfoLog(shader));
I still use the standard GLES20 wrapper library for everything else, so this was simple to drop into my codebase. The two wrappers apparently can coexist without any problems.
Just incase anyone does find this question as they have encountered the same problem, the only way I have found to "get around it" is to compile the shader with another App (such as Rendermonkey). Not ideal, but it got me further in my project!
I had the same problem.
Make sure you have the following in ApplicationManufest.xml:
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
Call this after initializing a GLSurfaceView
glSurfaceView.SetEGLContextClientVersion(2);