Scolring - Forum

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.

#1 6-Jun-2011 13:33:56

gius
Member
Registered: 5-Jun-2011
Posts: 53

texture

Hello everyone,
I would like to add in the ar_piano.xos, on the cubic the texture (file .png).
What is the most basic mode?

thanks

Offline

#2 6-Jun-2011 14:53:55

Tenshikris
Scol Language & OS3D developer
Registered: 11-Apr-2011
Posts: 20

Re: texture

Hi,

In the ar_piano demo, it's not possible to add texture on cubics because material that applicated on don't have a pass texture.
But to add a texture on an object that have a pass texture, you can use material/change_texture PlugIT.
Documentation : http://www.openspace3d.com/documentatio … lugit.html
Don't forget that you have to put your png file in your scol partition ^^

Offline

#3 8-Jun-2011 11:43:39

gius
Member
Registered: 5-Jun-2011
Posts: 53

Re: texture

I would like to change in the file ar_piano.xos the cube box #11 with the cube b#84 with textures made with SketchUp.
I  imported a.scenewith with "import scene".
I put in "Set Phisics" shape and default;
I have reduced the size.
In AR_maker 1, I changed "object name" with b#84.
I saved everything but I play in live webcam of the new cube is always visible, large!
Where am I wrong?


thanks

Offline

#4 8-Jun-2011 13:48:59

Nodrev
Scol Language & OS3D developer
From: Nantes, France
Registered: 29-Dec-2009
Posts: 197

Re: texture

You have to play with the "Marker size" parameter, augmenting this value will scale down your object size.

Offline

#5 8-Jun-2011 13:54:57

gius
Member
Registered: 5-Jun-2011
Posts: 53

Re: texture

the new cube is always visible, even without the marker, where am I wrong?

thanks

Offline

#6 8-Jun-2011 14:07:29

Nodrev
Scol Language & OS3D developer
From: Nantes, France
Registered: 29-Dec-2009
Posts: 197

Re: texture

Ok, I had misread your previous message, missed the "reduce the size" line...
So, the problem is that you forgot to change the objects in the "Hide n" plugIt instances.

Offline

#7 9-Jun-2011 13:33:51

gius
Member
Registered: 5-Jun-2011
Posts: 53

Re: texture

Hello everyone,

In this link you will find the images:


http://kktc.jimdo.com/

in the first image: the original version ar_piano
in the second image: ar_piano launched when I change a cube with a cube developed by SketchUp
in the third picture: the new cube with the maker, I tried to change his position but does not move from that position.
How I can solve the problems of second and third picture?

Thanks


I am preparing a small tutorial for augmented reality and openSpace3d in Italian.

Last edited by gius (9-Jun-2011 13:51:02)

Offline

#8 9-Jun-2011 13:39:50

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: texture

Hi,

gius wrote:

I am preparing a small tutorial for augmented reality and openSpace3d in Italian.

Good ! Thanks

Offline

#9 9-Jun-2011 16:19:08

gius
Member
Registered: 5-Jun-2011
Posts: 53

Re: texture

1) in the second image: ar_piano launched when I change a cube with a cube developed by SketchUp


I solved this problem:
Selecting "Hide on Start"

2) in the third picture: the new cube with the maker, I tried to change his position but does not move from that position.

This problem I can not fix it.
I added the picture (4) http://kktc.jimdo.com/
where you can see the axes xyz are down, they are not in the center.


How can I fix this?

thanks

Offline

#10 9-Jun-2011 17:12:55

Nodrev
Scol Language & OS3D developer
From: Nantes, France
Registered: 29-Dec-2009
Posts: 197

Re: texture

You will have to change your pivot point, object is centered on it.
In Sketchup, I think that the option is named "change axes" or something like that...

Offline

#11 9-Jun-2011 17:52:45

gius
Member
Registered: 5-Jun-2011
Posts: 53

Re: texture

All solved!

thanks

Offline

#12 9-Jun-2011 21:48:32

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: texture

Hi gius

a new version of the sketchup exporter is available on http://www.openspace3d.com

Offline

#13 10-Jun-2011 09:21:31

gius
Member
Registered: 5-Jun-2011
Posts: 53

Re: texture

Hi arkeon,
a great job the new version of the sketchup exporter!

It is possible with plugIT a situation :
if (marker 1 and marker 2 and marker 3 are visible)  {
................
................
}

how?

thanks

Offline

#14 10-Jun-2011 09:27:47

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: texture

for that use a var plugIT and test it's value with if plugIts
each marker add a value 1, 2, 4
is var == 7 then all markers are setted

Offline

#15 10-Jun-2011 10:52:33

gius
Member
Registered: 5-Jun-2011
Posts: 53

Re: texture

I write what I understood:
1) AR Marker 1  I add from the "misc" choose "var"
2) Var Instance, choose "Data Type " "Int", write it as the value Value (example 1)
3) I choose "Lost" and connects AR Maker 1 and Var Instance

4) same procedure for AR Marker 2 and 3, but change the value.

5) I create a variable "sum" with the value equal to the sum of the three variables
6) Connect the variable "sum " in AR Marker 1, 2 and 3?

I'm wrong in something?

thanks

Offline

#16 10-Jun-2011 11:20:51

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: texture

You have an example of this process in the examples/advanced/sensors

Offline

#17 10-Jun-2011 12:57:13

gius
Member
Registered: 5-Jun-2011
Posts: 53

Re: texture

I have applied this procedure:

1)  I add from the "misc" and  choose "if"
2) "IF 1" , choose "Data Type " "Int", write it as the value  (example 1)
3) I choose "True" and connects AR Maker 1 and "IF 1"

4) same procedure for AR Marker 2 and 3, but change the value.

5) I create a variable "sum"  the value equal to the sum of the three variables
6) Connect the variable "sum" with "Set Value" with  "IF 1" , "IF 2" and "IF 3"


but does not work, what is wrong?

Offline

#18 10-Jun-2011 16:50:23

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: texture

like in the sensor example,

- var plugIT in Int type default value 0, call it "markerState" for example
- If plugIT int Int type default value 7, call it "If all markers found"

links :
- marker 01.found->markerState.Increment "1"
- marker 01.lost->markerState.Decrement "1"
- marker 02.found->markerState.Increment "2"
- marker 02.lost->markerState.Decrement "2"
- marker 03.found->markerState.Increment "4"
- marker 03.lost->markerState.Decrement "4"
- markerState.Modified->if all markers found.equal
- if all markers found.True -> do what you want
- if all markers found.False -> do what you want

Offline

#19 10-Jun-2011 17:52:37

gius
Member
Registered: 5-Jun-2011
Posts: 53

Re: texture

my increment and decrement are without numbers (value),
I have link
Scene.Ar maker.01 found-> markerState.Increment

but as I can the value of this link?

thanks

Offline

#20 10-Jun-2011 22:34:55

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: texture

you must set the value in link parameter (double clic on round)

Offline

#21 11-Jun-2011 10:06:21

gius
Member
Registered: 5-Jun-2011
Posts: 53

Re: texture

The procedure to insert value in the link is:
- Click on the number on the  link,
- open the windows "Edit links",
- click on the link of the string (for example: Scene.Ar maker.01 found-> markerState.Increment),
- just so it can insert the value.

thanks

Offline

#22 12-Jun-2011 12:26:55

gius
Member
Registered: 5-Jun-2011
Posts: 53

Re: texture

I wish with "if true" to move a cube  in specific positions xyz.
The cube is set to "Set position" at x = 1 y = 1 z = 1 in Scene tree.

if all markers from found.True  -> I connect with "object position" with links "set position" x = 0 y = 0 z = 0
if all markers from found.False -> I connect with "object position" with links "set position" x = 1 y = 1 z = 1


but does not work.

Where am I wrong?

thanks

Offline

#23 12-Jun-2011 14:18:34

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: texture

link param for x y z is "0 0 0" without quotes
if your objet is moved by a marker you must disable the marker bdefor setting it's position

Offline

#24 12-Jun-2011 17:52:33

gius
Member
Registered: 5-Jun-2011
Posts: 53

Re: texture

in my game:
if there are 3 marker (Marker 1 - Marker 2 - marker 3) we see a cube (cube test 1)
The cube is set to "Set position" at x = 0 y= 0 z=0  in Scene tree.

- var plugIT in Int type default value 0, call it "markerState" for example
- If plugIT int Int type default value 7, call it "If all markers found"

links :
- marker 01.found->markerState.Increment "1"
- marker 01.lost->markerState.Decrement "1"
- marker 02.found->markerState.Increment "2"
- marker 02.lost->markerState.Decrement "2"
- marker 03.found->markerState.Increment "4"
- marker 03.lost->markerState.Decrement "4"
- markerState.Modified->if all markers found.equal

menu - object - object position  - position X Y Z Favorite
menu -  object - object position  - position X Y Z Reset

- if all markers found.True -> object position Favorite
- if all markers found.False -> object position Reset

but does not work

Where am I wrong?

Offline

#25 12-Jun-2011 19:17:10

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: texture

when you say "it doesn't work" what's wrong ? what the object do ?, what it should do against that ?

Offline

Board footer

Powered by FluxBB