Page 1 of 1

[Implemented] 3D need some functions

Posted: Mon Sep 22, 2008 12:21 pm
by Anonymous
We need new fucntions for the 3D

like this :

  • GetCameraPicth()
    GetCameraYaw()
    GetCameraRoll()
    idem For entity & nodes

    EntityLookAt()
    NodeLookAt()

Posted: Fri Sep 26, 2008 1:47 am
by Lykaestria
Maybe also:

GetEntityPitch()
GetEntityYaw()
GetEntityRoll()

Posted: Fri Sep 26, 2008 6:29 am
by DarkDragon
I know this as Pan, Tilt, Roll.

Posted: Fri Sep 26, 2008 10:12 am
by Comtois
Ok i copy here all my whishlist :)

- 1 - Script particule

- 2 - MaterialName
i have found an old code in C++ using ogre.

in the script material there is :
material Chess/White
{
technique
{
pass
{
ambient 0.1 0.1 0.1
diffuse 0.9 0.85 0.55
specular 0.7 0.7 0.7 64
shading phong
}
}
}

material Chess/Black
{
technique
{
pass
{
ambient 0.05 0.05 0.05
diffuse 0.0 0.0 0.0
specular 1 1 1 20
shading phong
}
}
}
in the code i can read this

Code: Select all

  if (mColour == Player::SIDE_WHITE) 
    mEntity->setMaterialName("Chess/White");
  else
    mEntity->setMaterialName("Chess/Black");
it would be nice if we could change on the fly material of an entity (using script)

- 3 - Lib Math 3D

http://www.ogre3d.org/docs/api/html/cla ... 1Math.html

here are many interesting things, a lot of intersect funtions.

- 4 - GetOrientation() , GetDirection().

Would be nice if we have more informations about camera, entity, node, etc.
like GetOrientation() , GetDirection().

- 5 - Node

Ok we can attach an entity to a node, is it possible to add particule ? camera ? Sound ?

Posted: Wed Oct 01, 2008 7:40 am
by Comtois
- 6 - EntityDebug()

We have WorldDebug(), it is usefull, but in an editor i would like to show wich entity is selected and only this one. is it possible to add this ?

- 7 - Drawing line 3D
something like this :
LineXYZ(x1,y1,z1,x2,y2,z2, Color)
Line3D(x,y,z,width,height,depth,Color)

- 8 - Rendering of a camera on a texture
This can be use to create mirror effect.

- 9 - Spline
See the demo Camera Tracks. Usefull for moving a camera or an entity.

Posted: Thu Oct 09, 2008 1:37 pm
by djes
You writed about the new ogre
* AttachNodeObject() - Can be a node, sound, billboard, entity, camera (allow easy grouping)
But if there is #PB_Node_Entity and EntityID() for AttachNodeObject(), there isn't #PB_Node_Camera and CameraID() ?

It would be *really* useful to have the wanted Entity and Camera orientation getting/setting functions; and Entitylookat() would be a must to orient your player on a target in top view games.

Posted: Thu Oct 09, 2008 4:15 pm
by EdzUp[SD]
Something like Blitz3d's TFormPoint, TFormedX/Y/Z would be handy too :)

Also some basic
AddSurface( Mesh )
AddVertex.vertex( Mesh, Surface, X#, Y#, Z#)
AddTriangle.Triangle( Mesh, Surface, Vertex1, Vertex2, Vertex3, U, V, W )

This would mean we could create a 3d modeller in PB.

Posted: Thu Jul 09, 2009 9:27 pm
by Comtois
Comtois wrote:- 8 - Rendering of a camera on a texture
This can be use to create mirror effect.
With old version it was possible to use GrabSprite to make a copy of the screen, now how to do ? Is it possible to add :

- 10 - Rendering of a camera on a Image or a Sprite (CopyScreen3D).

Posted: Fri Jul 24, 2009 2:17 am
by PMV
Comtois wrote:- 2 - MaterialName
i have found an old code in C++ using ogre.

in the script material there is :
material Chess/White
{
technique
{
pass
{
ambient 0.1 0.1 0.1
diffuse 0.9 0.85 0.55
specular 0.7 0.7 0.7 64
shading phong
}
}
}

material Chess/Black
{
technique
{
pass
{
ambient 0.05 0.05 0.05
diffuse 0.0 0.0 0.0
specular 1 1 1 20
shading phong
}
}
}
in the code i can read this

Code: Select all

  if (mColour == Player::SIDE_WHITE) 
    mEntity->setMaterialName("Chess/White");
  else
    mEntity->setMaterialName("Chess/Black");
it would be nice if we could change on the fly material of an entity (using script)
:shock:

The OGRE-Scripts are a realy nice feature, if we can use it :mrgreen: ...
btw. on the fly changes on materials, that are loaded by a script would be
also not bad, if this is possible with OGRE.
In OGRE-Materialscripts, it is possible to use "anim_texture" instead of
"texture", so you can define a frame set of textures per textureunit. With
an animationtime of zero, ogre let the programcode change the current
frame. ... to use this feature, an additional pb-command is needed.

I have seen, that MaterialScroll() changes the scroll_anim variable, so
MaterialScroll() should named MaterialScrollAnim() and if it is possible, the
MaterialScroll() without anim would be also a good idear, i think.
MaterialRotate() the same? And then there could be a MaterialScale() ...
MaterialWaveXForm() ... and so on.

MFG PMV