AS3 - ERROR In Applying Texture To Object With Alternativa3D 8 - texture-mapping

I use the Alternativa3D 8 library / tool. I have a problem when applying texture to a 3D model.
I am coding with Actionscript 3 in Flash to make a player (or displayer?) of 3D objects (of .3ds format), which loads the 3D model and texture, and should give result of a "home". When I use the 3D model code in my program, I get the result of a "cube".
I want to get a result like : http://alternativa.ueuo.com/a1.png (used only 3d model and 1 texture).
but I have this result : http://alternativa.ueuo.com/a2.png, why?

Related

THREE.js glTF loader (binary) does not display vertex colors?

I have a model with precomputed vertex colors. If I generate glTF file and load it using THREE.GLTFLoader, I can call scene.overrideMaterial = new THREE.MeshBasicMaterial({vertexColors: THREE.VertexColors}) to convert the default material from MeshStandardMaterial to MeshBasicMaterial. The precomputed colors are then displayed correctly.
If however I generate a binary glTF (*.glb) file and override the material properties, I have to call scene.add(new THREE.AmbientLight(0xffffff) to add ambient lighting to the scene; otherwise, the display is black.
Is this a deficiency with glTFLoader, or am I (more likely) missing something?
Your first example (replacing the original materials) appears the way you expect because THREE.MeshBasicMaterial is an unlit/shadeless material type. From the three.js documentation, it "is not affected by lights", and doesn't require lights to appear onscreen.
When you don't replace the material, the default material created by THREE.GLTFLoader is usually THREE.MeshStandardMaterial, which is a physically-based rendering (PBR) material. Because it is physically-based, it requires lighting to appear onscreen. For best results, especially with metallic materials, you may need an environment map for realistic lighting.
It's also possible to create a glTF model that contains unlit materials (or THREE.MeshBasicMaterial) by default, but based on the results you describe it doesn't sound like your glTF model was authored that way.

How to load 3d model with .obj and .mtl file in Vuforia Augmented Reality iOS sdk

I am developing ios app in which i have to show object scanned by Augmented Reality. For this i am using Vuforia ios Sdk for rendering my 3D object model.
But issue is i am not aware of how to load .obj and .mtl extension file in ios sdk for 3d model.
Thanks in advance and appreciate all answers.
Rendering 3D model has nothing to do with Vuforia - you draw what you want, probably with OpenGL. In one of their sample they do demonstrate showing a 3D teapot model on the detected target. If you have your own obj model, convert it to a header file (there are tools for that) in order to have the model values in the proper arrays (vertices, texCoords and normals), like in the example (look at the 'Teapot.h" file). I was using this tool some time ago: obj2opengl

Opencv with blender or opengl?

I am new to opencv,I did a project with opencv,
My project is tracking object with stereo camera,so I find where is the object and I want to represent it in (blender or with opengl or another one),so my situation is that I have point 3d in YML file and I want to represent them . I dont know what I will use ,can any one help me ??
Its possible to do in Blender, but for your simple purpose Opengl should be enough. To get started with Modern Opengl check this list of contents: link
In opengl, before drawing anything you must "send" data (vertices) to your GPU. One part of this process is called Vertex Buffer Object. (its very simple after your program by yourself). When you use VBO, you can specify what type of data you have: STATIC or DYNAMIC. Dynamic means that you (the artist) will change the data over time, the position of each vertex might change. And that is what you want.

using three.js can I place a viewport in a scene between near field and far field

I am unsure if what I am trying to achieve is possible using three.js
What I aim to do is place the viewport within the frustum.
I want to create a 3d environment in which objects can appear between the viewport and the camera.
So if I move the camera then it appears that the object is rendered in 3d in front of the screen - i.e. the generated parallax gives the impression that it is projected out of the screen when things move.
I just can't find a way to do it. I am certain I did it a number of years ago in flash, I thought I would try three.js and webGL.

Problems with some textures in XNA

I have made a model using Sketchup, and have tested rendering it using Blender and it looks great.
However loading it in XNA has two problems.
1. One of the textures becomes see-thru not entierly transparent but items below on the inside of the model is visible (this is not the case in blender).
2. I have a rounded part on the model that is divided into smaller parts and the texture gets out of sync (the posisioning is all wrong).
I have tested exporting the model to 3ds and then use blender to save it as fbx (to eliminate any problems with Sketchup).
I have also tried using AutoDesks FBX Converter, same problems =(
I'm using myModel.Draw(World, View, Projection); to render the model.
Any suggestions?
/Jimmy
1)Sounds like a backface culling issue try this
device.RenderState.CullMode = CullMode.None; (try the CW and CCW variants)
also make sure the depth buffer is enabled
2) This may be similar problem to an issue I had with blender when you copy the bones try the gModel.CopyBoneTransformsTo(transforms); as well as gModel.CopyAbsoluteBoneTransformsTo(transforms);

Resources