When I load *.USDZ file in ARSCNView place object above my head. even I tried through apple provide sample demo “Handling3DInteractionAndUIControlsInAugmentedReality”.
I notice one thing is *.USDZ file formate content vast size bounding box by compare *.SCN file.
one more thing is .USDZ file place proper position in QLPreviewController. how can I achieve dynamic normalise *.USDZ file without scale property change.
Thanks in advance.
With usdz model, need set scale = 0.005 before add to plane.
I found solution in GitHub: https://github.com/shu223/ARKit-Sampler
Related
Is it possible in BLENDER version 2.82a to adjust the texture so that the corners of the tower are not moved up or down so that they fit correctly? Sorry for the bad English I use the translator. I'm attaching pictures. Thank you for the advice.I am a beginner.
yes it is possible. But you would need a seamless texture so it can repeat itself over the object. This is what happens when I copy and paste the texture multiple times next to each other:
The seams are clerly visible.
And any instructions for proper mapping? I've looked at the tutorials everywhere, but somehow I can't
I am working on pytesseract. I want to read data from Driving License kind of thing. Presently i am converting .jpg image to binary(gray scale) format using opencv but i am not accurate result. How do you solve this? Is there any standard size of image?
Localize your detection by setting the rectangles where Tesseract has to look. You can then restrict according to rectangle which type of data is present at that place example: numerical,alphabets etc.You can also make a dictionary file for tesseract to improve accuracy(This can be used for detecting card holder name by listing common names in a file). If there is disturbance in the background then design a filter to remove it. Good Luck!
I am using a .dae file to create my SCNNode. The quality of my 3D object looks perfect when opening with the .dae file editor, or preview app, but it looks so poor on the SCNNode (screenshot's pixelated lines).
Does this issue have any solution or improvement? Is there any parameter I should set to fix that?
Is your .dae file all those little bits and pieces modelled as objects? If so, I think you need to turn on Anti-Aliasing, that should solve this.
By default, this is turned off on iOS for performance reasons:
https://developer.apple.com/library/mac/documentation/SceneKit/Reference/SCNView_Class/#//apple_ref/occ/instp/SCNView/antialiasingMode
I am able to export meshes created in Blender for use in SceneKit by using the COLLADA/.dae format - however no textures show up on iOS device.
Also, Preview on OS X won't open any COLLADA file exported from Blender - yet the sidebar preview does show the mesh. What are the options needed at export to make this work?
Create a scnassets folder first (not required but useful)
Create a folder on your desktop and give it an extension of ".scnassets"
Put your collada(.dae) file along with any textures you will be using in it.
Drag the folder into your project and save as copy like usual.
Click on your scnassets folder and you will see a checked box (if not check it) for converting to a "y" up axis.
Assigning textures to your scene model
Click on your collada(.dae) file inside your project in xcode.
You should see your scene and on its left side a list of cameras, lights, materials, and such. This is your scene tree.
Open the materials tab and click on one of your materials.
On the right hand side in the inspection window click on the blue ball shaped icon(Material inspector) to view the diffuse, specularity, and such of that one material.
Click on the diffuse tab and when it opens you should have an option of colors and your textures within your project. Select the texture you used on your model within 3d program. As long as you UV unwrapped them properly in your 3D program, they should apply instantly within your scene view.
What if I want to change my material after loading my scene? Glad you asked!
To do this we must use entryWithIdentifier method of SCNSceneSource class. I am going to use swift here because it is awesome! Here we go...
Get the url of your scene(.dae) like so...
let url = NSBundle.mainBundle().URLForResource("YourFolder.scnassets/yourScene", withExtension "dae")
Now lets put that url to use...
let source = SCNSceneSource(URL: url, options: nil)
Click on your .dae and under Scene Graph is list of items one of which is your geometry. It will have a tee kettle just to the right of it signifying so. We are going to use its name here. Let say your geometry's name is Geo. Use it like so...
let yourGeometry = source.entryWithIdentifier("Geo", withClass: SCNGeometry.self) as SCNGeometry
Now we have a source attatched to a SCNNode called yourGeomerty. Lets create a new material with a UIColor like so...
let newMaterial = SCNMaterial()
newMaterial.diffuse.contents = UIColor.redColor()
Finally we will switch out the old material with the newMaterial like so...
yourGeometry.geometry.replaceMaterialAtIndex(0, withMaterial: newMaterial)
Play around with it and other indexes if you have more than one material. You can also use the UIImage class to use another texture instead of a color.
TIP
If you want to add to or delete something from your scnassets folder, navigate to your project folder to do so and not xcode. This took me a while to figure out so thought I would save everyone the trouble.
Collada files don't embed textures, they only have references to them. Make sure that your textures are reachable from the collada file when you open it in Preview and make sure to include the textures in the app bundle when building an app.
3 things I had to do to make it work.
Make sure images are packed in the .blend file (this is an option in UV editor)
when you export, the file will not automatically include the uv's or the materials. there is a checkbox to include the UV's and Materials in the DAE. I missed this as well when doing it.
This one you only need if your putting in a playground. The dae isn't quite applized, but i was able to use their scntool in the developer tools to export a dae that is. here is a sample command line that i used.
./scntool --convert ~/Documents/Art/BlenderArt/tableandappleUV.dae --format c3d --output ~/Documents/Table5.dae
notice the c3d format. use that and your playground can now also recognize the dae. (One other note: if you want to used the dae in the playground you need to put in resources folder of the playground)
I am learning how to animate a sprite, so the sprite sheet image is foud online. Problem is that I also need the plist file, which I don't have. I tried Zwoptex, but seems not work.
Any one got any idea? Thanks.
Zwoptex works just fine. It does output a .plist file for cocos2d perfectly.
I am using the Mac version. Go to Publish settings, and there you should see the output location for the .plist file. Now, when ready, click Publish. It will output both the texture and the coordinates in the locations that you set in Settings. And it works.
You can also go for the Texture Packer to create the Sprite Sheets as well.
For Tutorial with Spritesheet from Ray Wenderlich Demo, you can use to the Resources and play with the Sprite sheet Animations. It would help you to learn making the Animations.
Regarding already created sprite sheet you need the plist from who-so-ever have created the Sprite Sheet
OR
you need to create the chunks using Photoshop and create a newer Sprite Sheet.
All I can suggest these options.
On thing you CAN do if you already have a png or gif file is to download something like Paint.NET, make it transparent similar to this link here. Then, you can use Texture Packer as mentioned above to split the sprites. Texture Packer can see the images, but only when it is transparent.
After that, you can then recreate the sprite sheet.