LouiZeForum

3D vrml
 
HomeHome  FAQFAQ  SearchSearch  RegisterRegister  MemberlistMemberlist  UsergroupsUsergroups  Log in  3Dchats / forums3Dchats / forums  

Share | 
 

 VRML Viewer and JAVA

View previous topic View next topic Go down 
AuthorMessage
MyKel_D
10/20


Number of posts : 41
Age : 49
Localisation : Richfield, Utah USA
Registration date : 2011-11-15

PostSubject: VRML Viewer and JAVA   Tue 15 Nov - 23:36

I have just read two books:
"JAVA for 3D and VRML Worlds", and "Late Night VRML 2.0 with Java"
with in them there is some sample codes:

Code:

#VRML V2.0 utf8
Transform {
  children [
    DEF TS TouchSensor {} # TouchSensor
    Shape {
      appearance Appearance {
        material DEF SphereColor Material { diffuseColor 1 0 0 } # red
      }
      geometry Sphere {}
    }
  ]
}

DEF ColorScript Script {
  [color=red]url "ChangeColor.class"[/color]
  eventIn SFBool clicked
  eventOut SFColor newColor
  field SFBool on FALSE
}
# Routing
ROUTE TS.isActive TO ColorScript.clicked
ROUTE ColorScript.newColor TO SphereColor.set_diffuseColor

OOPS forgot the class .java file
Code:
import vrml.*;
import vrml.field.*;
import vrml.node.*;

public class ChangeColor extends Script {

  private SFBool on;      // status of on-off
  float red[] =  { 1, 0, 0 };      // RGB(Red)
  float blue[] = { 0, 0, 1 };      // RGB(Blue)
  private SFColor newColor ;

  public void initialize() { 

    newColor = (SFColor) getEventOut("newColor");
    on = (SFBool) getField("on");
  }

  public void processEvent(Event e) {
    ConstSFBool v = (ConstSFBool)e.getValue();

    if(v.getValue()){
      if (on.getValue()) {
        newColor.setValue(red);    // set red to 'newColor'
      } else {
        newColor.setValue(blue);    // set blue to 'newColor'
      }
      on.setValue(!on.getValue());  // = !on.getValue();
    }
  }
}

the line in question is the url. When using Sony's Community place Browser this code worx well...
When tryed inside of either BlaxxunContact or BS_Contact it does NOT worx, the console tells me that "JAVA has been disabled"
The real problem is that the Sony CP browser wont view my VRML files (maybe too big or the vast use of PROTO/EXTERNPROTO) ??
Back to top Go down
View user profile http://evelynsgemz.sytes.net
alain
fondateur
fondateur


Number of posts : 22810
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: VRML Viewer and JAVA   Wed 16 Nov - 0:19

wow !! for the moment I feel difficult all that for my small brain , LOL , sorry .

But I will study all that ,
but tomorrow , because it is very late here in France ...

If I dont succeed to answer , I will try to find some friend whao has a bigger brain Smile

Merci to trust on LouiZe , MyKel , and WELCOME !!!

_________________
http://mixed3d.net/
Back to top Go down
View user profile
alain
fondateur
fondateur


Number of posts : 22810
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: VRML Viewer and JAVA   Wed 16 Nov - 1:49

I will learn more tomorrow ,

but ,

may be


http://tecfa.unige.ch/guides/vrml/java/vrml3.html

the java has to be "compiled" ?????


Quote :
Enregistrez ce fichier sous le nom "ChangeColor.java" dans le répertoire "bin" du JDK.

Ouvrez une boite MS-DOS (menu démarrer, programmes, Commandes MS-DOS) et déplacez vous (par la commande "cd" suivie du nom du répertoire) pour arriver dans le répertoire "bin" du JDK. Tapez la commande :

javac ChangeColor.java

_________________
http://mixed3d.net/
Back to top Go down
View user profile
alain
fondateur
fondateur


Number of posts : 22810
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: VRML Viewer and JAVA   Wed 16 Nov - 16:39

following the instructions to compile ,
I got that Sad

What a Face


_________________
http://mixed3d.net/
Back to top Go down
View user profile
alain
fondateur
fondateur


Number of posts : 22810
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: VRML Viewer and JAVA   Wed 16 Nov - 18:22


BTW the old Floppy Guide is still online ,
ex , here

http://rvirtual.free.fr/programmation/VRML/tuto_eng/


That covers the questions , ex :


Quote :
In order to create a usable class out of our NewScript example, we perform the following steps. Save the source

code into a file called NewScript.java

(it's important that it has the same name as the class defined in it - also, each source file can only contain

one class). Then, run the following command:

javac -target 1.1 NewScript.java
This should run the compiler (assuming it's installed right) and create a file for you called NewScript.class

etc etc

I will try to get time to take a look at ....

_________________
http://mixed3d.net/
Back to top Go down
View user profile
alain
fondateur
fondateur


Number of posts : 22810
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: VRML Viewer and JAVA   Wed 16 Nov - 18:38

ahah !!

I discovered one thing !!!

I checked a wrl from the Floppy Guide ....
By hazard the tut52.wrl

witch comes with SineGen.class

Opening it with BS contact or blaxxun contact ,
I get the same error
( and nothing happens - it is suposed to be a slider -)

Quote :
Java support for Script node not implemented.
Can't load Script node URL

But opening it with instantreality , that works !!!!


Check it , MyKel , you will see ....


***
btw we have a fan of instantreality , here ,
jacinto :

http://closed.forumactif.com/t2305-instantreality?highlight=instantreality

And also ,Pyth , of deepMatrix , of course ...

_________________
http://mixed3d.net/
Back to top Go down
View user profile
MyKel_D
10/20


Number of posts : 41
Age : 49
Localisation : Richfield, Utah USA
Registration date : 2011-11-15

PostSubject: Re: VRML Viewer and JAVA   Thu 17 Nov - 0:44

alain;
thank you for your help in this matter. I went to Instantreality website and tryed to download the viewer and when finished it stated the it was reported unsafe.
Do you have a way for me to get the viewer or shall I just trust the MSI?? would love to play around with this one and see if it fits my needs.
Thank you so very much again.
Back to top Go down
View user profile http://evelynsgemz.sytes.net
alain
fondateur
fondateur


Number of posts : 22810
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: VRML Viewer and JAVA   Thu 17 Nov - 1:04

I had no troubles installing it ,

I read now
Quote :
System Requirements
Instant Player has the following minimum system requirements:

Intel processor, 1GHz
Windows 2000, XP or Vista
512MB of RAM
150MB of available hard-disk space
A powerfull graphics board with OpenGL drivers. We recommend NVIDIA and ATI boards. Intel shared memory boards work, but their performance is not optimal for large 3D scenes.
Warning: Currently, the Instant Player installer needs at least Microsoft Installer 3.0 installed on your machine. This software is part of Service Pack 2 for Windows XP. In the unlikely event that it is not yet installed on your machine, you can download it from Microsoft. Search for "Windows Installer Redistributable".

Download
When you didn't already get the Instant Player installer from another source, you first have to download it from the Instant Reality website. Go to the following address: http://www.instantreality.org/downloads/

The size of the download is round about 36MB.

When the download finishes successfully, you should have the Instant Player Installer on your hard disk.

and it is late for me now in France , to check more ,
but for sure you can trust on the software

_________________
http://mixed3d.net/
Back to top Go down
View user profile
alain
fondateur
fondateur


Number of posts : 22810
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: VRML Viewer and JAVA   Thu 17 Nov - 1:07

ps , as I know that deepmatrix use it , I now check
the page I made on MixED about all that ,
and see ,
there are links about instant reality ...


I hope that helps too

http://mixed3d.free.fr/spip/?cat=53

_________________
http://mixed3d.net/
Back to top Go down
View user profile
MyKel_D
10/20


Number of posts : 41
Age : 49
Localisation : Richfield, Utah USA
Registration date : 2011-11-15

PostSubject: Re: VRML Viewer and JAVA   Thu 17 Nov - 1:41

yes Thank You very very much just installed it and will check out all the options and see if it fits Very Happy
Good Night and get some sleep Smile
Back to top Go down
View user profile http://evelynsgemz.sytes.net
MyKel_D
10/20


Number of posts : 41
Age : 49
Localisation : Richfield, Utah USA
Registration date : 2011-11-15

PostSubject: Re: VRML Viewer and JAVA   Mon 21 Nov - 23:17

havent played much with Instant Reality but did find out that one cannot use EXTERNPROTOS Sad Prolly will switch everything to BS_Contact and do as much as I can within the EAI instead of the JAVA API. again Sad
Back to top Go down
View user profile http://evelynsgemz.sytes.net
MyKel_D
10/20


Number of posts : 41
Age : 49
Localisation : Richfield, Utah USA
Registration date : 2011-11-15

PostSubject: Re: VRML Viewer and JAVA   Mon 28 Nov - 23:58

changed url back to EvelynsGEMz.sytes.net
Back to top Go down
View user profile http://evelynsgemz.sytes.net
alain
fondateur
fondateur


Number of posts : 22810
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: VRML Viewer and JAVA   Tue 29 Nov - 0:18

I wonder with witch program you build your world , MyKel.
Just curious how you build all these PROTOS .....

_________________
http://mixed3d.net/
Back to top Go down
View user profile
MyKel_D
10/20


Number of posts : 41
Age : 49
Localisation : Richfield, Utah USA
Registration date : 2011-11-15

PostSubject: Re: VRML Viewer and JAVA   Tue 29 Nov - 4:10

My Friend; Most of my code is hand coded, It is built from scratch. the few IndexFacesets that I do use are created in AC3D then exported to vrml. But most of my objects are hand built on the VRML 97 spec. Now if I could just get Justin Couch and Bernie Roehls' Server and client JAVA to work- I'd be doing something maybe Very Happy
Back to top Go down
View user profile http://evelynsgemz.sytes.net
alain
fondateur
fondateur


Number of posts : 22810
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: VRML Viewer and JAVA   Tue 29 Nov - 12:28

From scratch ? ahah you are a hero !

Well , about "Justin Couch and Bernie Roehls' Server" ,
I re visited Google and I found very intersting things !!!


1 - I jumped there



https://ece.uwaterloo.ca/~broehl/vrml/lnvj/

so I have found all that :

https://ece.uwaterloo.ca/~broehl/vrml/lnvj/cdrom/


I installed the CPBUREAU.exe , from Sony Corporation,
but I have no idea what to do with that LOL .
Except I can run it .....


I will try to get time to read the stuff....

2 - I jumped too here


http://bernieroehl.com/


and it is very funny , because may be you know that I moved recently to unity3d, MyKel,
and I see that Bernie too !

http://bernieroehl.com/Demos

( What is interesting too is that our dear friend Thyme is very involved these times into speech stuff...
( with his seamless3d soft )

http://bernieroehl.com/demos/speech_demo.html

BTW , Other demo

http://bernieroehl.com/demo3d/index.html

*****

well , scuse to be a bit out of your topic,

but may be we will share about this sony server....Now I have it
( really ??? I dont know , LOL , I understand nothing of what to do with Smile


ps :

I jumped too to all that


Quote :
http://www.frontiernet.net/~imaging/games_with_java3d.html

http://www.frontiernet.net/~imaging/Nasa_3d_animation.html


http://www.frontiernet.net/~imaging/H-Anim_Avatars.html

http://www.frontiernet.net/~imaging/sourcecode/stickChickMinimal.wrl

I will try to explore .....

_________________
http://mixed3d.net/
Back to top Go down
View user profile
MyKel_D
10/20


Number of posts : 41
Age : 49
Localisation : Richfield, Utah USA
Registration date : 2011-11-15

PostSubject: Re: VRML Viewer and JAVA   Wed 30 Nov - 20:25

Very Happy my goodness; had a whole paragraph written and hit a wrong button and "POW!!!!!" vanished into the ozone. Hopefully I can come close to what was written.
First I'd like to thank you for all you are doing to aid me in my endeavors. At one time there were many more within the 3D Chat Comms, that would discuss these things but as somehow I have offended them (including those on the AC3D forums) One day someone will let me know how I did insult them and why you are the only one that will have these discussions.
Very Happy no I am no hero; just a student trying to learn what was missed during the years locked in a box(7 of them) Thank you for the links to Mr. Roehl's new stuff, after reading the book he helped write, it is a goodness to see his new stuffs; hopefully one day it will be within me to make him, Taranus, Arsene, yourself and Sandrine proud and have a working site.
At this time I must pause; and go back to the other Server and Client contained in "JAVA for 3D and VRML Worlds" Here is a SS of the problem- it is my opinion that it is my inexperience with NetBeans 7.0.1

then; after this is solved; I can continue on to the better client written by Mr. Roehl.


Last edited by MyKel_D on Wed 4 Jan - 1:13; edited 1 time in total
Back to top Go down
View user profile http://evelynsgemz.sytes.net
alain
fondateur
fondateur


Number of posts : 22810
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: VRML Viewer and JAVA   Wed 30 Nov - 22:47

Hey MyKel !
when I have more than 2 sentences to post I always write them on notepad before posting on the forum , LOL

Smile

Btw I am ashame to not have such tips to tell you about Netbeans, or other stuff ,
and I am a bit ashame too that all old guys disappeared from this forum and other ones ,
they were able to help you .

But that's life , I hope you good luck ,
you will win Smile

_________________
http://mixed3d.net/
Back to top Go down
View user profile
MyKel_D
10/20


Number of posts : 41
Age : 49
Localisation : Richfield, Utah USA
Registration date : 2011-11-15

PostSubject: Re: VRML Viewer and JAVA   Mon 2 Jan - 22:18

Problem--> this got fixed.


Last edited by MyKel_D on Wed 4 Jan - 1:14; edited 1 time in total
Back to top Go down
View user profile http://evelynsgemz.sytes.net
alain
fondateur
fondateur


Number of posts : 22810
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: VRML Viewer and JAVA   Mon 2 Jan - 22:42

the ScreenshotErrors.jpg is missing ,
but I am happy you fixed some stuff Smile

Happy New year , and thanx to continue to let us know how all taht is going Smile

Good luck

_________________
http://mixed3d.net/
Back to top Go down
View user profile
MyKel_D
10/20


Number of posts : 41
Age : 49
Localisation : Richfield, Utah USA
Registration date : 2011-11-15

PostSubject: Re: VRML Viewer and JAVA   Mon 2 Jan - 22:57

alain wrote:
the ScreenshotErrors.jpg is missing ,
but I am happy you fixed some stuff Smile

Happy New year , and thanx to continue to let us know how all taht is going Smile

Good luck

Thank you; sorry about the image being gone Sad it is gone gone SadSad

Does anyone have (or will you allow me to see) an actual usage of a HUD PROTO - and maybe a 2dlayer usage, I'd like to see if it is what am looking for for the UI. Would like to build a MMORPG type of UI if possible. OR Do I need to make a JAVA application and do it there??
Back to top Go down
View user profile http://evelynsgemz.sytes.net
alain
fondateur
fondateur


Number of posts : 22810
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: VRML Viewer and JAVA   Mon 2 Jan - 23:40

I remember first my old crappy experiment ,
but that worked with blaxxun

http://dumenieu.free.fr/vrml/hudeve/hudgesturesles22.wrl

Code:
 EXTERNPROTO HUD[
eventIn   MFNode   addChildren
eventIn   MFNode   removeChildren
exposedField   MFNode   children
field   SFVec3f   bboxSize
field   SFVec3f   bboxCenter
]
["urn:inet:blaxxun.com:node:HUD",
"http://www.blaxxun.com/vrml/protos/nodes.wrl#HUD"]

_________________
http://mixed3d.net/
Back to top Go down
View user profile
alain
fondateur
fondateur


Number of posts : 22810
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: VRML Viewer and JAVA   Mon 2 Jan - 23:57

and about layers 2d

http://www.parallelgraphics.com/developer/products/cortona/extensions/layers

_________________
http://mixed3d.net/
Back to top Go down
View user profile
MyKel_D
10/20


Number of posts : 41
Age : 49
Localisation : Richfield, Utah USA
Registration date : 2011-11-15

PostSubject: Re: VRML Viewer and JAVA   Tue 3 Jan - 1:17

again thank you thank you for all your help. Don't get much time to play in this area but each time gets me closer to my goal Very Happy
Back to top Go down
View user profile http://evelynsgemz.sytes.net
Sponsored content




PostSubject: Re: VRML Viewer and JAVA   Today at 15:14

Back to top Go down
 
VRML Viewer and JAVA
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» fastStone Image Viewer
» Erreur java affichage didacticiel fourni avec E-Anim
» Net framework et Java
» [/résolu] problème avec java à l'instalation :-/
» Problème avec Java

Permissions in this forum:You cannot reply to topics in this forum
LouiZeForum :: NEWS .../...HELP-
Jump to: