I have a similar issue as in this post, using the same model, also loaded with the Collada loader.
The windows of the car are not displayed as transparent in three.js. You cannot see through them.
After digging through the three.js object data structures, it looks like the material for the window has opacity = 1 and transparent = false set on it.
I tried both with the release and with the dev version of three.js, as advised in the above referenced post but without any luck.
I also tried setting the opacity to 0.3 and transparent to true by hand in the material object (in debugger) and the transparency appears ! (although with some flickering).
Any idea what is wrong ? Is it a Collada loader problem ?
UPDATE: same problem on a much simpler model:
screenshot of the problem
link to the SketchUp model
Thank you
Martin
I just tried this and it's working for me. I took the model from open3dhub and imported it into ThreeFab and then exported it to a jsfiddle(source). I still see the flickering (that's a separate problem). This is on three.js from master.
I still do not know if this is a ColladaLoader bug, a SketchUp issue or a bizarre feature of the Collada spec but I found an easy enough workaround:
Edit the Collada file by hand, find the tag and set its value by hand to 0.3 or anything you want instead of 1.
Not perfect but workable.
Related
I'm just starting out in ARjs myself. I found an issue that I'm confused on how to solve. My gltf model won't show unless it's on scale 5x and it only showed partially as in the left top corner on the actual model. My assumption is from the position, but I'm not sure how to approach this?
I already saw the https://github.com/jeromeetienne/AR.js/issues/299 thread solution, but it didn't work.
You didn't share your code so it's really hard to know what is the problem there. From what you are describing I would try scaling your object down and not up. If you only see small parts of it on a 5x scale, I guess you were inside the object this entire time. Try scaling it down to ~0.1 and see if it works. Also, make sure your model is positioned to 0,0,0 (or just don't specify the position at all ass this is the default). Another thing I think you should try is our platform echoAR. You can upload your models and easily have an ARjs experience. Just follow the docs.
I have a problem with 3D model in SceneKit. I also use maxstARobjec After updating to iOS 12 it's start looking brighter than before (SCREENSHOTS WITH THE SAME ISSUE HERE)
I use 2 light node, without autoenablesDefaultLighting.
And one more fact about this issue: when I hide all lights the model (which must be black) is grey like it's has extra light...
Sorry for my bad language, and I very need your help!
I solve the same issue by convert .obj file to .scn files in Xcode, and use this scenes as nodes. Editor -> Convert to SceneKit file format (.scn)
screenshot
I've loaded a model into my scene (.scn) and when zero-ing the model out, it seems to be at a 90 degree angle on the x-axis (even though the inspector says 0).
This is incorrect, but strangely when the running the scene on the emulator the model loads in the correct position.
Has anyone experienced this before? It's rather annoying.
Yes! This is a common thing to experience.
Depending on where you made your model, blender, sketchup, 3dsmax, etc.
Some programs use a "Y-up Axis" that means that the Y axis is up. However, SceneKit uses a "Z-up Axis".
The reason it appears differently when running your app is because in your ".xcaccets" folder, or whatever it is called, you have "always convert to z-up axis" checked.
I'm not quite sure how to convert it before editing in Xcode's editor, but perhaps, you could use write(to:options:delegate:progressHandler:) to export the corrected version out of SceneKit for non-eye-sore Z-up editing.
Hope This helps!
I'm getting some weird effect on my terrain on iOS devices. In editor, it looks fine; on device it shows the light like the image below. The textures on the terrain are using the built in standard. I have verified that the metallic property is set to 0. I have Tried changing the material, the probes, all are not fixing the issue. Looking to see if anyone has experienced a similar issue or have a lead; I can work on a test. Using unity 5.3.5p5
I couldnt open this image but to my understanding you have a problem with terrain material.There is a several ways to solve this problem
1-) Be sure click the "Static" box on inspector window.
2-) Increase "Pixel light count" from Edit > Project Settings > Quality in normal time that variable is be arranged to 4 but I prefer 8 or 10 test it.
3-)Be sure about lights.Look their lighting Mode Realtime,Mixed and Baked They should be same for great scenes
After this tips if you scene is still broken delete terrain material and create a new terrain material.Good luck
If it's fine in editor then it might be an issue with your builds. Might try checking your quality settings to see if there are some lighting or shadow settings turned down. Go to Edit->Project settings->Quality and make sure the settings you have under the quality level and quality settings look appropriate for you build target (ios).
I've been writing a little planet generator using Haxe + Away3D, and deploying to HTML5/WebGL. But I'm having a strange issue when rendering my clouds. I have the planet mesh, and then the clouds mesh slightly bigger in the same position.
I'm using a perlin noise function to generate the planetary features and the cloud formations, writing them to a bitmap and applying the bitmap as the texture. Now, strangely, when I deploy this to iOS or C++/OSX, it renders exactly how I wanted it to:
Now, when I deploy to WebGL, it generates an identical diffuse map, but renders as:
(The above was at a much lower resolution, due to how often I was reloading the page. The problem persisted at higher resolutions.)
The clouds are there, and the edges look alright, wispy and translucent. But the inside is opaque and seemingly being rendered differently (each pixel is the same color, only the alpha channel is changed)
I realize this is likely something to do with how the code is ultimately compiled/generated in haxe, but I'm hoping it's something simple like a render setting or blending mode I'm not setting. But since I'm not even sure exactly what is happening, I wouldn't know where to look.
Here's the diffuse map being produced. I overlaid it on red so the clouds would be viewable.
Bitmapdata.perlinNoise does not work on html5.
You should implement it by yourself, or you could use pre-rendered image.
public function perlinNoise (baseX:Float, baseY:Float, numOctaves:UInt, randomSeed:Int, stitch:Bool, fractalNoise:Bool, channelOptions:UInt = 7, grayScale:Bool = false, offsets:Array = null):Void {
openfl.Lib.notImplemented ("BitmapData.perlinNoise");
}
https://github.com/openfl/openfl/blob/c072a98a3c6699f4d334dacd783be947db9cf63a/openfl/display/BitmapData.hx
Also, WebGL-Inspector is very useful for debugging WebGL apps. Have you used it?
http://benvanik.github.io/WebGL-Inspector/
Well, then, did you upload that image from ByteArray?
Lime once allowed access ByteArray with array index operator, even though it shouldn't on js. This is fixed in the lastest version of Lime to avoid mistakes.
I used __get and __set method instead of [] to access a byte array.
Away3d itself might be the cause of this issue too, because the code of backend is generated from different source files depending on the target you use.
For example, byteArrayOffset parameter of Texture.uploadFromByteArray is supported on html5, but not on native.
If away3d is the cause of the problem, which part of the code is causing the problem? I'm not sure for now.
EDIT: I've also experienced a problem with OpenFL's latest WebGL backend. I think legacy OpenFL doesn't have this problem. OpenFL's sprite renderer was changing colorMask (and possibly other OpenGL render states) without my knowledge! This problem occured because my code and OpenFL's sprite renderer was actually using the same OpenGL context. I got rid of this problem by manually disabling OpenFL's sprite renderer.