collada

having trouble drawing coloured vertices using shader in opengl to draw data read in from COLLADA file

。_饼干妹妹 提交于 2020-01-17 01:55:32
问题 ok so this is the code I use to put the vertex array and buffers onto the graphics card. void Mesh3D::InitializeBuffers(GLuint program) { float largestPos = findLargestPosition(&col->vectorGeometry); std::cout << "largestPos is: "; std::cout << largestPos; std::cout << "\n"; int loc; vaos = new GLuint[nVectorGeometry]; glGenVertexArrays(nVectorGeometry, vaos);//The vertex array object stores the array of vertice indexes used to find the vertex in the buffer vertex buffer object.. vbosPosition

Select Collada objects by mouse Click in Three.JS

北慕城南 提交于 2020-01-15 04:15:10
问题 I need to select Collada objects in Three.JS by mouse click. I know that I can select object based on their id and I saw some samples that user can interact with Geometry defined objects (here). But I need to have access to the objects in Collada format. 回答1: Assuming that dae_scene is a COLLADA scene returned from the ColladaLoader, here's what you can do to check for intersection: var toIntersect = []; THREE.SceneUtils.traverseHierarchy(dae_scene, function (child) { if (child instanceof

Can't display 3d file from cache directory

寵の児 提交于 2020-01-13 19:00:56
问题 Can you please help me determine the problem here? It seems that I can't display the 3d file from cache directory. I'm having this error SceneKit IO: error, COLLADA files are not supported on this platform. The zip file im saving in the cache directory contains .dae file and .png for the texturee. With Scene Kit you can: Import COLLADA 3D objects and build scenes composed by cameras, lights, and meshes. https://developer.apple.com/library/mac/documentation/3DDrawing/Conceptual/SceneKit_PG

threejs collada model location

淺唱寂寞╮ 提交于 2019-12-25 04:43:27
问题 I have been working on THREEJS framework to render *.dae models. There are several dae models. I have a problem with the location of the models. When I render them, each model has a different location. I set their location dae.position.set(0,0,0); but unfortunately, it doesn't work perfectly. For example, for one model I have to set the location as dae.position.set(-2, -31, 6.5); and then model is on the location(0,0,0). I check it with AXES axes.position.set(0,0,0); . Do you have any idea,

Collada model faces not displaying correctly in three.js

人走茶凉 提交于 2019-12-23 13:08:07
问题 After importing a collada model into three.js, some of the model's faces are only visible from the inside of the model and not from the outside. How can I fix the problem with the faces in question? Is it possible to have the model's faces visible from both sides? 回答1: The reason it doesn't work properly is because your file has this double_sided flag set: <effect id="material_3_4_0-effect" name="material_3_4_0-effect"> <profile_COMMON> ... <extra> <technique profile="GOOGLEEARTH"> <double

Update Collada (.dae ) file code from A-Frame or JS

久未见 提交于 2019-12-23 05:16:14
问题 I load collada (.dae) file in A-Frame. Its loaded fine. But now i have to update that file from user input like color, etc.. How to update the code inside the .dae file from html, js or A-Frame This is the Loaded A Frame code : <a-scene> <a-assets> <a-asset-item id="box" src="box.dae"></a-asset-item> </a-assets> <a-entity id="collada" collada-model="#box"></a-entity> <a-entity id="cmr" position="0 1 5" rotation="0 0 0"> <a-camera> <a-cursor color="#2E3A87" > </a-camera> </a-entity> </a-scene>

3d animation from cinema4d to blender

心已入冬 提交于 2019-12-23 03:39:22
问题 I need to import a mesh animation from Cinema4D into Blender . I tried to do that using Collada.The Collada 1.3 importer doesn't seem to do anything, the Collada 1.4 importer seems to work, but the animation didn't get imported into Blender. After reading this post: Problem solved! In case anyone comes in here looking for the answer, I spoke to Otomo via email and he kindly explained that the problem lies in the .dae file being exported incorrectly from C4D. I hope Otomo doesn't mind me

COLLADA: Inverse bind pose in the wrong space?

耗尽温柔 提交于 2019-12-20 12:09:10
问题 I'm working on writing my own COLLADA importer. I've gotten pretty far, loading meshes and materials and such. But I've hit a snag on animation, specifically: joint rotations. The formula I'm using for skinning my meshes is straight-forward: weighted; for (i = 0; i < joint_influences; i++) { weighted += joint[joint_index[i]]->parent->local_matrix * joint[joint_index[i]]->local_matrix * skin->inverse_bind_pose[joint_index[i]] * position * skin->weight[j]; } position = weighted; And as far as

How integrated is Collada to OpenGL ES

孤街醉人 提交于 2019-12-13 17:04:45
问题 All over where I read about the Collada file format I see some hint as to how integrated Collada is to OpenGL ES - or the other way. How integrated is it really? I suspect not, but are there functions that directly work with Collada files? - or even parts of Collada files? Or do I need to create my own parser from the ground up? 回答1: You need to create your own parser, OpenGL or OpenGL ES doesn't have any model/mesh loading functionality, that's the developer's responsability. 回答2: I think

Three.js - Drag Collada Files

北战南征 提交于 2019-12-13 05:59:05
问题 My objects are moving on the XZ axis through drag and drop. Unfortunately the collada files doesn't act like them... Here is my code: var container; var camera, controls, scene, renderer; var objects = [], plane; var raycaster = new THREE.Raycaster(); var mouse = new THREE.Vector2(), offset = new THREE.Vector3(), INTERSECTED, SELECTED; init(); animate(); function init() { container = document.createElement( 'div' ); document.body.appendChild( container ); camera = new THREE.PerspectiveCamera(