[Implemented] 3D need some functions

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Anonymous

[Implemented] 3D need some functions

Post by Anonymous »

We need new fucntions for the 3D

like this :

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

    EntityLookAt()
    NodeLookAt()
Lykaestria
User
User
Posts: 76
Joined: Wed Sep 17, 2008 3:10 am
Location: New Zealand

Post by Lykaestria »

Maybe also:

GetEntityPitch()
GetEntityYaw()
GetEntityRoll()
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

I know this as Pan, Tilt, Roll.
bye,
Daniel
User avatar
Comtois
Addict
Addict
Posts: 1431
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Post 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 ?
Please correct my english
http://purebasic.developpez.com/
User avatar
Comtois
Addict
Addict
Posts: 1431
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Post 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.
Please correct my english
http://purebasic.developpez.com/
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Post 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.
EdzUp[SD]
Enthusiast
Enthusiast
Posts: 104
Joined: Thu Jun 26, 2008 10:53 pm
Location: Banstead, UK

Post 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.
User avatar
Comtois
Addict
Addict
Posts: 1431
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Post 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).
Please correct my english
http://purebasic.developpez.com/
PMV
Enthusiast
Enthusiast
Posts: 727
Joined: Sat Feb 24, 2007 3:15 pm
Location: Germany

Post 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
Post Reply