Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology
Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered
You are not logged in.
you could for the mesh, but the names will not have all the same size, so you will need different plane sizes.
but for the material this is not possible, since one material instance is based on the material resource.
if you change the material texture it will be changed for all clients not only the one you want.
and if you draw the name on the texture get from the material resource, this will be the same.
so you need a different material and a different texture for each client name.
and for the mesh this way should be cleaner too.
Offline
Aaaah, I begin to see arkeon.
Last edited by hebdemnobad (22-Jan-2014 16:22:02)
Offline
How do you set the scale of the plane? Or does the plane change in size automatically to display the texture?
Offline
no you have to set the plane size.
[width Height]
SO3PlaneCreate : create a plane as a SO3_OBJECT.
Prototype: fun [SO3_SCENE S S [F F] [I I] [F F]] SO3_OBJECT
Parameters:
SO3_SCENE : current scene
S : group name
S : plane name
[F F] : width and height
[I I] : plane segmentation X and Y (1 default)
[F F] : UV tile (U and V, 1.0 default)
Returns:
SO3_OBJECT : Plane created if success, NIL otherwise
Offline
no you have to set the plane size.
[width Height]SO3PlaneCreate : create a plane as a SO3_OBJECT.
Prototype: fun [SO3_SCENE S S [F F] [I I] [F F]] SO3_OBJECT
Parameters:
SO3_SCENE : current scene
S : group name
S : plane name
[F F] : width and height
[I I] : plane segmentation X and Y (1 default)
[F F] : UV tile (U and V, 1.0 default)
Returns:
SO3_OBJECT : Plane created if success, NIL otherwise
How would you have os3d rescale the plane for longer strings to be the same size?
Offline
let G2DgetStringSize font text -> [width height] in
return the size of the string in pixel, you can use it to multiply a pixel / 3D unit ratio of your choice for example
Offline
Thx arkeon..... how do I determine the plane's height and width in pixels in order to multiply a pixel / 3D unit ratio?
Offline
for example :
let 10 -> margin in
let 0.01 -> ratio in //1px for 1 centimeter
let G2DgetStringSize font text -> [tw th] in
let tw + (margin * 2) -> tw in
let th + (margin * 2) -> th in
let [((itof tw) *. ratio) ((itof th) *. ratio)] -> planesize in
Offline
for example :
let 10 -> margin in let 0.01 -> ratio in //1px for 1 centimeter let G2DgetStringSize font text -> [tw th] in let tw + (margin * 2) -> tw in let th + (margin * 2) -> th in let [((itof tw) *. ratio) ((itof th) *. ratio)] -> planesize in
Thx arkeon, but doesn't the ratio change depending on distance from camera shell to the plane.
Last edited by hebdemnobad (23-Jan-2014 14:42:49)
Offline
haaaa sure.
but if you want that then the name should be simply display on a 2D bitmap ^^ on the screen.
not on a 3D object.
there is a function to get a 3D object position on the 2D screen in pixel.
let SO3ViewportGetPixelPositionFromWorldPos viewportstr.V3D_viewport (SO3ObjectGetGlobalPosition obj) -> spos in
Offline
haaaa sure.
but if you want that then the name should be simply display on a 2D bitmap ^^ on the screen.
not on a 3D object.there is a function to get a 3D object position on the 2D screen in pixel.
let SO3ViewportGetPixelPositionFromWorldPos viewportstr.V3D_viewport (SO3ObjectGetGlobalPosition obj) -> spos in
so instead of painting a plane, I would paint a 2d bitmap onto the screen.... and SO3ViewportGetPixelPositionFromWorldPos would give me the x and y coodrindates of the remote_bot shell depending on its xyz location.....maybe this is a better approach and more efficient from in terms of cpu/gpu usage....
before I get into this method, what happens when the bitmaps overlap each other? will two names, for example 'iri' and 'arkeon', overlap together and appear as one is combined with the other, or will only one of them display?
Last edited by hebdemnobad (23-Jan-2014 15:31:32)
Offline
I will stay on http://www.ifam.net/openspace/remote_bo … index.html if you want to chat about this
Offline
the widgets have priority order parameter.
the bitmap would just overlap the other.
ok, I'll look at the api and plugit(s) to see how I create and paint widgets. this is the way I will go.
Offline
ok have look the picture plugIT for example
I will do that thx.
Offline
arkeon i can't find documentation of SO3ViewportGetPixelPositionFromWorldPos on redmine or via a google search....where would that be?
Offline
Ho it must be that I didn't update the online doc
will make this now
thx
does the function return?
[I I]
Last edited by hebdemnobad (25-Apr-2014 15:38:42)
Offline
yes
I've updated the online documentation here : http://redmine.scolring.org/projects/so … 73db78108d
Offline
yes
I've updated the online documentation here : http://redmine.scolring.org/projects/so … 73db78108d
Thx
Offline