XYZ index

XYZ vrml editor

(Before you work at your world you should put all the resources (textures,ec..) in a folder on your disk.
For this tutorial put 2 textures and 1 midi file in a folder
The textures are for a house , so they are one for the wall ()and one for the roof() you can save them from this page , the midi is for some music in the world , you can choose the one you like.

From the file menù:click new to make a new file and from the file menù save it in the same folder where your resources are, for the file name choose house.wrl click save and then ok.

The project we have now is to make a landscape with a street and some houses, if we should build each house it will take long time, so we can make now one house and save it , then we can use the house we made as object.

So let's build a house. the world is now empty and we can add a shape to begin , in the position (red) text field write 0 0 0 , this is the position where the new shape will be added , 0 0 0 means the center of the world , the virtual world is measured with 3 values for the 3 dimensions , you can test the 3 dimensions adding some objects to the world in different positions.

Then click on the box button(blue) ,a box is added in the position 0 0 0.
Now we can modify the box to make the walls of our house.
But the box isn't still really there , we can see it but it's a illusion,we shouldn't still modify it , we have to click the apply button to make it real.
When you click apply all the shapes modified or added wiil become real , then you can enter in select mode clicking the button "select mode".
In select mode then you can click on any cliccable shape and then click the modify selected button, now you can click on the box to select it, when clicked you can see written "Selected Box" near the button "modify selected", you can click on this button now to modify the cube.
A list of the fields of the shape is now on the left, there are the shape fields and some fields like transform, rotation, center that are relative to the initial position of the shape.
Depending on the geometry of the shape some other fields wiil be on the top of the form.(now we have "box" , "size 1 1 1 ")
Now you can modify values of the shape modifing the written values and clicking on "modify"
you can change as many values as you like and click on "modify" as many times as you like.
For this tutorial we need to build a house from our box, so now we have to give a texture to our wall.
In the texture combo is selected now "none" because the box hasn't a texture, change this value to "Image texture", a new field called "texture url" will appear, now click on the button on the right of the field and a dialog will open asking you to select a image for your texture, select "wall.jpg" and click "ok" , the dialog will close , now click on the modify button to see the changes you made , the cube is now painted like a wall.
but the wall is now too small, think that 1 unit in the vrml world is like 1 meter in real world , the avatars are normally high 1,75 units.
So now we will change the scale value to give the right dimension to the cube to be a wall.
Click on the scale field in the left , now you can change values in 2 ways, writing it or using the keys:
R to increase the y value
F to decrease the y value
H to increase the x value
G to decrease the x value
Y to increase the z value
T to decrease the z value
(in the 3 dimensions y is height , x is width , z is depth , (but this can change if you change your viewpoint))
To scale the cube press 3 times R and 3 times H, the cube will have now scale 4 4 1.
one meter is too much for the wall depth, so now overwrite1 with .5 or 0.5 , the scale value will be 4 4 0.5 and click on modify.
we have now one wall ready but we need 4 walls, so now you can click on "clone" , clone will duplicate the object that we are modifying.
now in the rotation field write 0 1 0 1.55 , this means that the new object will be rotated 90 degrees on the y axis , for a complete descripton of the rotation field look here .
The new wall is now rotated and we need to move it to build the house, you can move it using the translation value, the translation value can be written with 3 numbers (example 0 0 0) or moved with the keys:
Q to increase the y value
A to decrease the y value
D to increase the x value
S to decrease the x value
E to increase the z value
W to decrease the z value
(It will change the position of the shape in the 3d space from its initial point).
For the new wall press 2 times S and 2 times E so that the translation will be now -2 0 2.
The new wall is now in the right place, click again on "clone" to make the third wall.
Now click again on the translation field and press D 4 times so that the translation value will become 2 0 2 and the third wall will be at the right place.
Now we need the fouth wall, it must have a door.
click on clone again and then change the rotation value to 0 1 0 0 , the fouth wall will be rotated like the first one.
but this wall needs to be less large then the other ones because it will be on the side of the door, press 3 times the G key to decrease the x scale and the new scale will become 1 4 0.5 , write in the translation field 1 0 4 to move the column in the right place, now click on clone again, write -1.5 0 4 in the translation field and click on modify to move the second column in the right place.
Now the changes to the wall are done and you can click on "apply" to apply changes ,
Now we need a roof for the house, the roof should be a cone , so write a position in the red text field , 0 0 0 , and click on the cone button (pink).
The cone is now in the virtual world in the position 0 0 0 but it isn't a good position , so we should now cancel it, to cancel it yoy can now click on discard changes ,you ll lose all the changes you made and you will have again only the walls, like the last time you cliked on apply.
To find a good position for the cone you can look at your position, it is written in the right white on gray , there is also your rotation , looking at the values when you move you can find a good place for objects.
You can move inside the house and look at your position , it will be something like (X)0 (Y)0 (Z)3 so now the cone can be added in your position but a little bit higher (Y) for example 0 3 3.
Ok, the cone is in a good position , we can modify it , so click on apply to really add the cone to the world .
Now click on selection mode , click on the cone until you can see written "selected cone" and then click on modify selected.
Now we have all the values we need to modify the cone.
Select "image texture" from the texture combo in the left , in the texture url field click on the button and select the texture "roof.jpg", now click on ok and then on modify.
The cone is now red and we can scale and translate it to make the roof.
When you are changing tranlation and scale of a shape it 's useful that you move around the shape to see it from different positions.
You can also change the navigation mode , right click on the 3d screen and select "Movement"--> "Examine" to look aroud the shape easily , then you can again select "Walk" to have a normal movement.
Write in the scale field 7 2 7 and in the translation field 0 0 -1, click on modify, look around the house , if you don't like the roof position you can change it as many times as you like.
To make a roof similar to the chinese houses click on clone , press Q , G , T and this again 4 times.
The house is now ready , if you want you can add other shapes to this house.
Click on apply and then on save from the file menù.
Overwrite house.wrl
Now from the file menù click "new" an empty world is open.
from the tools menù click on "add random mountain landscape".
The landscape is now ready, look around and then save your world as "Myworld.wrl".
In your new world you can build a street.
add a box in the position 0 0 0 and then click on apply.
now click selection mode and click on the new box, click on modify selected.
Choose a color for the street, in the field diffusecolor click on the button and choose a color clicking when you like it.
now click on modify and the box will become the color you choose.
now press H and keep it preesed until the street will be long enough (35 units) press Y 2 times to make the street large 3 units, write 0.2 in the y value, the scale will be now 33 0.2 3 , click on modify and then apply .
You are walking now on your new street.
Now we can add some houses to it, you must find a good place for the houses now , go around and look at your position , now try , click on the browse button cyan and select house.wrl , write a postion and test it clicking the object cyan button , if the position isn't good click on discard changes , write a new positon and click again on object, try the position 0 1 -6.
The house is a good object so you can add it to the objects menu , you ll use it again easily.
Open the menù your objects and click on add an object to the menù , select house.wrl in your folder and click on open and then ok.
Write in the red position field -7 1 -6 Open again your objects menù --> Add an object to the world --> house.wrl
Write in the red position field -14 1 -6 Open again your objects menù --> Add an object to the world --> house.wrl
Write in the red position field 7 1 -6 Open again your objects menù --> Add an object to the world --> house.wrl
Write in the red position field 14 1 -6 Open again your objects menù --> Add an object to the world --> house.wrl
Now you have 5 houses near the street, click on apply if you like them.
Try now to click selection mode and select one roof of one house, you can change material for all the roof cloned from fìthe first and you can instead change position for each cone, remember this when you clone objects or add them to the world.
Now we can add a nice sky to our world, but before adding a background look at the frame rate, it is near your position and rotation, fps:...., this is how many frames the browser can render in one second, if this number become too low the people that will visit your world will see it very slowly.
If your world is very big and complcated often look at the frames per second.
Now click on background from the modify menù , write 0 0 1 in the skycolor field , and click on test , the sky is now blue ,
Now try to select roof.jpg in the backurl , fronturl , lefturl , and righturl fields, click on test and the sky looks like mars, you can use textures for the background, realistic skyes ....
cancel now the roof.jpg from all fields and write [] in each field , only the skycolor must be 0 0 .3 , so now we have a dark blue sky, click on test and then ok.
For more informations on the background node in vrml you can look here
Now let's add a little fog, from the menù modify click fog.
go far from your houses 30 units and write in the color field 0 0 .3 ( to make a nice fog you should use the same color of the background)
now test the visiblity range , it can be 0 (no fog) 10 (you can see 10 units around) 100 (you can see 100 units around) ecc...
40 can make you see the houses when you are close to them but you can't see the mountains, 1400 can make you see the houses perfectly and faraway the foggy mountains, when you find the right value click ok.
For more informations on the fog node in vrml you can look here
Click on apply now.
now you can add a viewpoint to the world, write the viewpoint name in the yellow text field and click on the viewpoint, the viewpoint will be added in your actual viewpoint.
Try now to move , then right click the 3d browser and click viewpoint --> and your viewpoint's name.
Now we 'll add to the world a magical glass sphere floating in the air.
Add a sphere in the position 0 1 6,
click on apply and then on selection mode, click on the sphere and then on modify selected.
in the diffuse color field write .5 .5 .9 or select a blue.
in the specular color field write .6 .6 1 or select a cyan
in the shininess value write .1
Click on modify and look at the sphere now.
Now write in the transparency field .5 and click on modify again.
The sphere should look like glass now.
click on make animable, the externalproto for animation has been saved in the same folder of your world, keep it always in the same folder, the shape is now ready for the animation but it can't be modified anymore.
Now you can click on animation.
in the time field write the seconds of your animation for example 15 , in the loop field write TRUE if your animation will begin again and again after the end, write FALSE if the animation will stop after play once.
Now write TRUE.
in the translations , rotations and scales fields you can write for each frame these values.
Let's try: in the frame2 clik record, in the frame 1 change scale in 1 4 5 , change your position and click on record in frame 3( this will record your actual position and rotation)change the scale value in 1 3 1 , in the 4th frame write 0 2 0 in translation , 0 1 0 1 in rotation , 3 1 3 in scale , now click on test, the animation will move the sphere from the frame 1 to the frame 2 in 2 seconds, 4 frames in 8 seconds and then the 1st frame again, for a total time of 10 seconds as you wrote, then loop is TRUE and so the animation plays again.
you can test an animation as many times as you like... after you click ok the animation can't be changed again , so be sure.
The sphere should be now floating in the air.
click on apply.
We can now try to edit the source code.
select a roof of a house, click selection mode and select it.
now from the menù tools click on view selected node in nodes tree, here there are many of the nodes inside the vrml world.
You have to look for the one where is written Selected
for example:
+-->> +-->> +-->> Shape(Cone) - _Shape_9
(Selected)+-->> +-->> Transform - clonato_29
+-->> +-->> +-->> Shape(Cone) - _Shape_9
This is the transform node parent of the selected shape it's name is clonato_29 and the shape inside it is the cone that you selected.
Now click on edit with vrml pad from the tools menù and click on edit vrml source in vrmlpad, vrml pad will open with the source of your world.
in the source code look for clonato_29 transform node, change it's scale value to 10 2 10 for example, then click on load document from vrmlpad.
The roof that you selected is now bigger then before because you changed the value in the source code.
Modifying the source code you will be able to increase much the posibilities.
You can add interactive behaviours, many kind of elaborate shapes , many kind of materials only editing the source code.
Now we 'll add some music to the world.
Add a sphere in any position and click apply , then click selection mode , click on the sphere and then click on modify selected.
in the texture field choose movie texture , in the field texture url select the midi file, now click on modify and listen to the music playing from your 3d world.
We can hide now the sphere clicking A until it goes underground.
now we can save our world in multiuser mode, so that the people that visit it will have avatar and chat.
From the file menù click on save in blaxxun frameset, then select a directory where all the files will be saved, you should choose the same directory where all your resources are .
Choose a title for the world , this title will be in the list of all the opened chats.
Then write the url where all these files will be, like: http://www.yoursite.com/yourfolder/ then you ll have to upload all the files in that folder.
choose a file name , a welcome message , then you can add more paramenters for the blaxxun fameset, each paramenter must be in one line, like:
vrmldefavatar http://www.dhyan.it/avatars/alien.wrl
...parameter...... ......value.....
ecc...
then click on ok and all this files will be saved in the directory you choosed, now you will only have to upload them to your site and then you and your visitors can open your 3d chat.l
After you clicked ok then close the frameset dialog.
the last thing we need is a nice picture of our new world:
Click on save screenshot from the file menù, find a good position, write the image file name and click on save, now try another position and
write another name and click on save, then click on back to normal window to have the window in a normal state again.
This is the screenshot:



indice ultime notizie || indice || english home page || vrml || ricerca || Visual basic || Spazio web || links || cartoline || chat || flash || musica || videogiochi || note || video || arte || videogiochini || donazioni

menu
                                       E-mail - Indice - chat
Cerca