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 11-Jun-2011 16:16:13

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

file image and random in AR

1) It is possibile while using AR, have on the live webcam a two-dimensional image file (for exemple test.png)?
2) If yes, how can we choose randomly between the three image files to be included on the live webcam?


thanks

Offline

#2 11-Jun-2011 16:22:39

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

Re: file image and random in AR

Hi gius,

1 - you can create a square mesh and apply the picture with change texture plugIT

2 - I dont understand the question ^^

Offline

#3 11-Jun-2011 16:32:36

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

Re: file image and random in AR

Hi arkeon,
It is possible to import a picture (test.png) and insert it on the live webcam in AR mode?

thanks

Offline

#4 11-Jun-2011 16:37:54

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

Re: file image and random in AR

ok

- create a square plan in blender, sketchup or any 3D modeler
- apply a material on it with a default picture
- export to openspace

- import the mesh in OpenSpace3D
- assign the marker on this object and adjust the size to make it fit with the marker
- apply a change texture plugIt on the plan material
- with the random plugIT make the links change the texture path (ou can set the texture path relative to the scol partition in the link parameter)

Offline

#5 15-Jun-2011 12:40:35

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

Re: file image and random in AR

Game description:
on the live webcam there is a cube, loads a random texture (they are numbers),
if the marker loads a cube with the same number written on the texture is fine.

I have developed:
I create: get object number
I create: random output texture
Link: Scenes get object number -> Scene random output texture.Input
I create: change texture 1 and change texture 2
Link: Scene random texture output Out1 -> Scene change texture 1.Change
Link: Scene random texture output Out2 -> Scene change texture 2.Change

but get object number never changes at random textures, where am I wrong?

thanks

Last edited by gius (15-Jun-2011 12:40:58)

Offline

#6 16-Jun-2011 00:27:05

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

Re: file image and random in AR

Hi,

i'm really not sure of what you are trying to do smile

you are trying to change any objects with a random texture ? right ?

1 on different material by object
2 random input plugIT for each material
3 change texture plugIT for each material
4 each corresponding random output -> change texture with the url or file location (from scol partition) of the bitmap in link parameter

Offline

#7 16-Jun-2011 10:59:43

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

Re: file image and random in AR

I want to change a texture in object of the game beginning in AR.
I think I have done the steps right but does not change randomly no textures.
The screenshot is at this link
http://kktc.jimdo.com/

It is correct that?

thanks

Offline

#8 16-Jun-2011 14:12:24

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

Re: file image and random in AR

Hi,

If I understand, you want to change randomly texture of your cube when your game is starting right ? smile
If it's true, you should use the misc/on_init PlugIt. You link the event Init on the input action of your random output inst.

On your picture, you use Get_Object PlugIt with the event Object. But you have to call the action Get_Object to launch the Object Event.

Hope that helps you. smile

Offline

#9 16-Jun-2011 14:34:23

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

Re: file image and random in AR

Hi Tenshikris, thanks for your help!

it's true! I want to change randomly texture of my cube when my game is starting.


1) on init inst -> link -> get object number?

If it's true: not work

2) on init inst -> link -> random output inst?

If it's true: not work

where am I wrong?

thanks

Offline

#10 16-Jun-2011 14:41:12

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

Re: file image and random in AR

The second choice is better than the first smile

2) on init inst -> link -> random output inst
= You link the event "Init" on the "Input" action of your random output inst.

If it's doesn't work, have you put your object in your change_Texture PlugIt ?
(Other : It's difficult to know if it's doesn't work on a random function big_smile maybe you have randomly the same number)

Offline

#11 16-Jun-2011 19:41:29

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

Re: file image and random in AR

I have tried, but it does not work,
no random choice of textures,
I tried with another object, and an image file to be imported,
The screenshot is at this link
http://kktc.jimdo.com/


Where am I wrong?

thanks

Offline

#12 17-Jun-2011 10:18:32

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

Re: file image and random in AR

Humm.... It seems difficult to know where you are wrong with this screenshot.
Can you send more informations ? (others screenshots, your xos file or your project directory for example) smile

In your project, you can remove get_object_number plugit.

Offline

#13 18-Jun-2011 10:18:52

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

Re: file image and random in AR

Hi Tenshikris ,
there is a link in this project, I tried but the random texture does not work.

http://kktc.jimdo.com/app/download/5178 … 1308388294

thanks

Last edited by gius (18-Jun-2011 13:46:07)

Offline

#14 20-Jun-2011 09:32:04

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

Re: file image and random in AR

Hi,

Thank you. That helps me to understand your problem. smile
In fact, you don't have pass texture on your objects so you can't apply a texture on them.
And you don't have selected a picture to apply on objects...

I'm not sure that you want to do.

1 - If you want to change color of the first "operazione", you can use material/material_color PlugIT.
2 - If you want to change texture of the first "operazione", you have to put a picture in your change_texture PlugIt.
3 - If you want to show ramdomly "operaziones", you can use object/hide PlugIT.

I will make you an example of what you want smile

Offline

Board footer

Powered by FluxBB