Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plane rendering #3

Closed
dbarkar opened this issue Feb 21, 2012 · 4 comments
Closed

Plane rendering #3

dbarkar opened this issue Feb 21, 2012 · 4 comments

Comments

@dbarkar
Copy link
Contributor

dbarkar commented Feb 21, 2012

I was trying to add a plane from Blender:
o Plane
v -0.000001 -1.000000 -1.000000
v -0.000001 -1.000000 1.000000
v 0.000001 1.000000 1.000000
v 0.000001 1.000000 -1.000000
f 1 4 3
f 1 3 2

But I couldn't draw it on screen. Then I downloaded RajawaliTutorial1 project and replaced Sphere to Plane and still I see no plane on screen. Maybe I'm doing something wrong or there is a bug in rendering?

@MasDennis
Copy link
Member

Hi Denis,
It's always a good idea to export the normals as well.
When a plane is invisible it is helpful to set double sided to true (BaseObject3D.setDoubleSided(true)).
Let me know if this works :-)
Cheers,
Dennis

@dbarkar
Copy link
Contributor Author

dbarkar commented Feb 21, 2012

Thanks for hint about normals :) But RajawaliTutorial with Plane instead of Sphere still doesn't work, even with setDoubleSided(true).
You can look at modified project at http://dl.dropbox.com/u/16718016/RajawaliTutorial1-Plane.zip

@MasDennis
Copy link
Member

The problem here is that the plane is lying flat, face up. The camera's y position is 0, so you don't see the plane.
Try adding this line mPlane.setRotX(-90);

@dbarkar
Copy link
Contributor Author

dbarkar commented Feb 22, 2012

You right! I should better look at Plane creation code. Thanks for your help! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants