Comments (7)
The stanford bunny doesn't have any texture coords since the model was created via scanning. You could bring it into Blender and try some of the texturing tools.
from ofxbullet.
ok. thx.
what about the penguin in the OF sample 3DModelLoaderExample.
I used the penguin.ply and the penguin.jpg
loaded both in and use
in setup
texture.load("penguin.jpg");
texture.getTexture().setTextureWrap( GL_REPEAT, GL_REPEAT );
mesh.load("penguin.ply");
in draw
texture.getTexture().bind();
bunnies[i]->draw();
texture.getTexture().unbind();
but a model never appears, and the app starts hanging when pressing key == 'b'
???
from ofxbullet.
A lot of 3D models use 0 -> 1 texture coordinates. So try calling
ofDisableArbTex();
texture.load("penguin.jpg");
ofEnableArbTex();
And after the mesh.load call, print out the number of tex coords on the mesh to make sure it has texture information.
from ofxbullet.
Thanks.
Still no luck. Maybe you can take a look?
I put together my OF 0.10 copy of your example.
https://www.dropbox.com/s/tsfwj4pxa45l6gu/SoftBodyMeshExample.zip?dl=0
ofDisableArbTex();
texture.load("penguin.jpg");
ofEnableArbTex();
mesh.load("penguin.ply");
ofLog()<<"mesh.getNumTexCoords() "<<mesh.getNumTexCoords();
ofLog()<<"mesh.getNumIndice() "<<mesh.getNumIndices();
[notice ] mesh.getNumTexCoords() 11486
[notice ] mesh.getNumIndice() 21348
from ofxbullet.
from ofxbullet.
Thanks again.
I went ahead and made a OF 0.9.8 project.
https://www.dropbox.com/s/mky2g7ykeflfjvc/SoftBodyMeshExample_0-9-8.zip?dl=0
You are right that the penguin has 4 times more vertices.
So I tried the squirrel. It's hard to tell if it texture maps ok, since it is super small in the app.
I guess I will have to find a ok sized model + it's texture.
Does the texture need to have a specific size, or would any image work?
in OF 0.9.8
[notice ] mesh_bunny.getNumTexCoords() 0
[notice ] mesh_bunny.getNumIndice() 5388
[notice ] mesh_penguin.getNumTexCoords() 0
[notice ] mesh_penguin.getNumIndice() 21348
[notice ] mesh_squirrel.getNumTexCoords() 402
[notice ] mesh_squirrel.getNumIndice() 1701
in OF 0.10
[notice ] mesh_bunny.getNumTexCoords() 0
[notice ] mesh_bunny.getNumIndice() 5388
[notice ] mesh_penguin.getNumTexCoords() 11486
[notice ] mesh_penguin.getNumIndice() 21348
[notice ] mesh_squirrel.getNumTexCoords() 402
[notice ] mesh_squirrel.getNumIndice() 1701
from ofxbullet.
from ofxbullet.
Related Issues (20)
- gl matrix function in new oF Version( 0.8.0 ) HOT 1
- raycastTest error in iOS HOT 3
- issue building on ios HOT 5
- TODO - GLDebugDrawer::drawLine should draw using VBO HOT 2
- Problems with 3D models in Android HOT 6
- won't compile with of_v0.8.0 xcode3.26 / gcc-4.2 HOT 3
- Potential Visual Studio Change/Fix HOT 2
- Doesn't compile on OF0.8.0 HOT 4
- Doesn't compile with xcode 6 HOT 20
- XCode6 iOS8 compile issue of 0.8.4 HOT 2
- Xcode 6.1 "EXC_BAD_ACCESS" with ofxBulletSimpleExample and others HOT 3
- OF 0.9.0 will require rebuilding the bullet library HOT 10
- SoftBodyMeshExample is missing data folder and model HOT 1
- Loss of object color between oF 0.9 RC1 and latest build HOT 1
- Unknown Error 0x800700c1, Visual Studio 2015 HOT 5
- Quaternion problem at create function of shapes HOT 2
- Not compiling OF098 Ubuntu 16.04 HOT 1
- Bullet3? HOT 12
- Compiling for windows/code::blocks, but crashing at startup HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ofxbullet.