PDA

View Full Version : A few questions with GLscene



Whitt
26-05-2008, 10:46 AM
Hi,

my project idea seems to be going ok, although I have hit some problems with GLscene that I am stuck with. If you could help me with these issues I would be very apreciative.

1) Is it possible to pass a 3D array to the terrain renderer to be processed, rather than using a bitmap HDS

2) is it possible to directly dictate the coordinate of each corner of a cube, so as to make elongated cubes?

3) How does the BSP system differ than the use of polygons and cubes?

4) when create a cube during run time by
cube:=TGLcube(dummycube1.addnewchild(tglcube))

how can you refer to each indivial cube i.e. the 3rd or 20th cube?


5) And for a non glscene question, is it only and Delphi 7 and below which are incompatible with vista or are all version of delphi 2003 etc.. incompatilble?

Many thanks for the help!

Whitt

Brainer
26-05-2008, 02:43 PM
Hello! :D



1) Is it possible to pass a 3D array to the terrain renderer to be processed, rather than using a bitmap HDS

Yip, it is possible, yet I have never done it before. The best example of this is demo called synthterr.


2) is it possible to directly dictate the coordinate of each corner of a cube, so as to make elongated cubes?

I don't really understand your question, but if you want to make cuboids, just scale the cube using Scale property. Set it fx. to (1.0; 3.0; 2.0).


3) How does the BSP system differ than the use of polygons and cubes?

Here (http://en.wikipedia.org/wiki/Binary_space_partitioning)


4) when create a cube during run time by
cube:=TGLcube(dummycube1.addnewchild(tglcube))
how can you refer to each indivial cube i.e. the 3rd or 20th cube?

You can simply name each of the cubes and then select them by their names. Or use this:

var
I: Integer;
TheCube: TGLCube;
begin
TheCube := nil;
for I := 0 to GLDummyCube1.Count -1 do
if (GLDummyCube1.Children[I] is TGLCube) then
if (I = 2) then
begin
TheCube := (GLDummyCube1.Children[I] as TGLCube);
break;
end;

if Assigned(TheCube) then
TheCube.Material.FrontProperties.Diffuse.Color := clrRed;



5) And for a non glscene question, is it only and Delphi 7 and below which are incompatible with vista or are all version of delphi 2003 etc.. incompatilble?

I once had D7 working under Vista, so it seems that it's compatible. :)

Whitt
30-05-2008, 05:34 PM
Thanks for the ideas and answers, sorry it took a while for me to reply stuck in hotel rooms without net access.

I shall keep playing round with the functions of custonHDS. Regarding the bsp question. I was a little confused about how the portal demo in the meshes folder actual works. Could someone explain the processes running?

My project places buildings according to a 2D array. I am struggling with the inside of the buildings and the portal demo is interesting but I don't understand how it works.

One last question how do you texture different parts of the cube i.e. the top or sides?

Thanks for the help, GLscene is a great tool that I am slowly getting used. So any ideas will be great, I will post a few pics of my project when I get a moment.
Whitt

Whitt
30-05-2008, 05:35 PM
Thanks for the ideas and answers, sorry it took a while for me to reply stuck in hotel rooms without net access.

I shall keep playing round with the functions of custonHDS. Regarding the bsp question. I was a little confused about how the portal demo in the meshes folder actual works. Could someone explain the processes running?

My project places buildings according to a 2D array. I am struggling with the inside of the buildings and the portal demo is interesting but I don't understand how it works.

One last question how do you texture different parts of the cube i.e. the top or sides?

Thanks for the help, GLscene is a great tool that I am slowly getting used. So any ideas will be great, I will post a few pics of my project when I get a moment.
Whitt

Brainer
30-05-2008, 06:18 PM
Regarding the bsp question. I was a little confused about how the portal demo in the meshes folder actual works. Could someone explain the processes running?

This (http://en.wikipedia.org/wiki/Portal_rendering) should be helpful.



One last question how do you texture different parts of the cube i.e. the top or sides?

As you can read in the file GLObjects.pas:


// TGLCube
//
{: A simple cube object.<p>
This cube use the same material for each of its faces, ie. all faces look
the same. If you want a multi-material cube, use a mesh in conjunction
with a TGLFreeForm and a material library. }


And looking forward to the screenshots! :)