[Logo]
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing  
[Register] Register / 
[Login] Login 
Achieving better surface material quality  XML
Forum Index » Alternativa3D 5
Author Message
jukko


Joined: 03/06/2008 14:34:09
Messages: 8
Offline

Hey Sjoerd,

thanks for your reply and sorry for my bad english!

No, i don't want to have all planes on exact same size on my screen, even though they have different coordinates....therefor i don't nedd a 3D-engine!
My problem is...
i create a plane: var tPlane : Plane = new Plane(75,75, 2, 2, false);
and set a WireMaterial: tPlane.setMaterialToAllSurfaces( new WireMaterial(1, 0xFF0000));
and set the plane may be 100 px away from the camera. The plane should be displayed smaller than 75x75 pixels on my screen now, right!? But the plane is much bigger than 75x75 pixels... I think i have to set the plane nearly 300 pixels away, to have a size of 75x75 px.
But in my opinion, if i creates a plane with the size above, the plane should have exactly this size when its setted to the cameras location and if i'm moving the cam backwards..the object/plane should always be smaller than 75x75 px ..or? Did i understood something wrong?

This message was edited 1 time. Last update was at 22/07/2008 14:28:58

mike


Joined: 01/06/2008 00:00:06
Messages: 786
Offline

It is better to see something one time than to hear about it hundred of times Ok, there's a picture to illustrate what happens with objects' size when they are projected from 3d space on a 2d screen. As you can see, if an object is closer to camera than camera's focal plane, then size of the object's projection gets larger. In other case, when an object is farther from camera than camera's focal plane, the projection gets smaller than object is.
So, answer on your question:
The plane should be displayed smaller than 75x75 pixels on my screen now, right!?

is "it depends" It depends on what size of the camera's focal length is and where (relative to the camera) the plane is placed.
[Thumb - camera.gif]
 Filename camera.gif [Disk] Download
 Description
 Filesize 2 Kbytes
 Downloaded:  157 time(s)

makc

[Avatar]

Joined: 02/06/2008 12:19:17
Messages: 1704
Offline

Peter Pan wrote:in my opinion, if i creates a plane with the size above, the plane should have exactly this size when its setted to the cameras location and if i'm moving the cam backwards.
you are mistaken about what camera location means. your logic applies to camera focal plane, not camera itself - the camera location is in front of its focal plane (hence anything between camera and its focal plane will be larger than 100%).

Mikhail Fominykh wrote:It is better to see something one time than to hear about it hundred of times
It is better to have a tutorial for this.

This message was edited 1 time. Last update was at 22/07/2008 19:13:16

[WWW]
jukko


Joined: 03/06/2008 14:34:09
Messages: 8
Offline

Ah yes, ok! I forgot the stuff with the focal length...
Now i understand what happends...thanks a lot!

May be to explain what i'm trying to do...
I want to create a small racing game, but my cars have to much poly's...around 8thousand i think! I tried to load that objects, but this was a bit to much...

Now i'm thinking about a solution to display a nice car. What i did, i rendered these cars in 360° view (all 10°) and wanted to use a plane with this rendered image as an animated Bitmap. These Planes faces always to the camera object and the texture shows the right bitmap from the cameras direction... i think thats a little bit dirty, but right now i have no better idea!

If anyone has an idea how to solve the problem, don't be shy and post it! I would be very thankful...

Chris

PS: I know that my english is not very easy to understand..sorry, i'm trying my best!
makc

[Avatar]

Joined: 02/06/2008 12:19:17
Messages: 1704
Offline

http://forum.alternativaplatform.com/posts/list/74.page#496
[WWW]
 
Forum Index » Alternativa3D 5
Go to:   
Powered by JForum 2.1.8 © JForum Team