Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 4
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 3383 times and has 3 replies Next Thread
neerajmourya
Newbie



India
Joined: May 19, 2010
Post Count: 9
Status: Offline
Reply to this Post  Reply with Quote 
can anyone help me to know the midpoint of field of view

Hello everyone,First of all sorry for my english as i am learning English.
I am trying to write a plugin for yafaray export. i have a problem. Yafaray calculates the direction of camera using two points in the scene. one is the position of camera itself and other point is used to determine the direction. i can get position of camera using getX(), getY(), and getZ() method of Camera class in Sweethome3d. but how can i get the other point.
There is a getFieldOfView() method in Camera class. if i can get mid point of field of view then problem may solve. but how to calculate the midpoint.

Thanks in advance
[May 25, 2010, 10:29:08 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9420
Status: Offline
Reply to this Post  Reply with Quote 
Re: can anyone help me to know the midpoint of field of view

You should compute the direction from the yaw and pitch angles of the camera.
See PhotoRenderer.java to help you compute the matching direction.

The source code of PhotoRenderer and OBJWriter classes should help you to see how to build the Yafaray data matching Java 3D nodes.
I hope you'll be able to get a nice plug-in... smile
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[May 25, 2010, 12:28:06 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
neerajmourya
Newbie



India
Joined: May 19, 2010
Post Count: 9
Status: Offline
Reply to this Post  Reply with Quote 
Re: can anyone help me to know the midpoint of field of view

Thanks PuyBaret for reply.

The resources you provided proved helpful for me. I also got solution to my problem under the PhotoRenderer.java:

// Set the point the camera is pointed to
Point3 target = new Point3(
camera.getX() - (float)(Math.sin(yaw) * pitchCos),
camera.getZ() - (float)Math.sin(pitch),
camera.getY() + (float)(Math.cos(yaw) * pitchCos));
Vector3 up = new Vector3(0, 1, 0);
transform = Matrix4.lookAt(eye, target, up);

I am trying to understand more these classes.

thanks again.
[May 25, 2010, 1:34:21 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
db4tech
Advanced Member



UK
Joined: May 3, 2010
Post Count: 223
Status: Offline
Reply to this Post  Reply with Quote 
Re: can anyone help me to know the midpoint of field of view

Hi neerajmourya,

Do you have any progress information on your Yafaray export plug-in?
As an end user I would be very interested in seeing any Sweet Home Yafaray rendering results.

db4tech
[Jun 12, 2010, 12:12:01 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

  Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads  
© Copyright 2024 Space Mushrooms - All rights reserved