Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Please help somebody!!!

2 views
Skip to first unread message

mahendra soni

unread,
Jan 9, 2003, 8:17:06 PM1/9/03
to
Hi there, i have a big big problem that i just can't seem to solve and have
wasted countless hours over!!

Basically I have created a complex shape in Lightwave.

Now, i can't the appearance of objects in a scene.

Is there any way to get a Shape3D from this lws or lwo files. Or Obj files
(can export in lightwave). Is there any way to get the shape3d with normal
indices, texture mapping already defined. So i can change the textures of
objects afterwards.

I've tried using the j3dLwoParser and using the getShape3d method, but this
does not work!

Has anyone successfully loaded complex geometry into java successfully, with
the ability to interactive with thh shape afterwards.

If anyone can help, then i would be truly grateful.

thanks nehal soni


P. Flavin

unread,
Jan 10, 2003, 10:21:56 AM1/10/03
to

VRML ( .wrl ) is the best supported format for Java3d.

Sun wrote VRML loaders for Java3d used in the
Java3d FlyThru Demo, the Nasa FastScript program,
and I've used them, Selman used them in his Java3d
book and Java sample programs and they have been
used in 3d Games:

Load VRML, play games, pick objects, run Mars a Mars Rover
----------------------------------------------------------
http://www.frontiernet.net/~imaging/games_with_java3d.html
http://www.frontiernet.net/~imaging/terrain_rendering.html

Other VRML loaders for Java3d exist ( and they support
image textured objects ).

Can you export to VRML ?

Your options greatly increase once you've exported to VRML.

The VRML Picking Demo loads VRML and the Java program
traverses the scenegraph, but I haven't tried changing
the texture after the scenegraph has been created.

I'm not saying it can't be done, I haven't tried.

You probabably should first export the model as VRML
then try loading it with the Sun VRML Loaders
( the old Web3d.org loaders ) or the new ones,
probably trying Sun's Java3d FlyThru first,
then move on from there.

More people are working with VRML & Java3d then
Lightwave & Java3d.

http://groups.google.com/groups?dq=&hl=en&group=comp.lang.java.3d&selm=mapT9.2481%24tx.131351%40newsfep1-gui.server.ntli.net


Another Java3d VRML Loading program was poster earlier:


Free VRML Editor / Viewer ( MJB World ) free source code
--------------------------------------- ( Java / Java3d )
| 3D World Simulation ...
|
| everything you need to know about 3D simulations
| and models ... theory about 3D modeling, animation
| and physics, and there are tutorials and a working
| a Java3D editor to allow you to build and experiment
| with 3D worlds:
|
http://www.martinb.com/mjbWorld/index.htm
|
http://groups.google.com/groups?dq=&hl=en&threadm=avehbu%24jri%241%40news.uni-stuttgart.de


-- Paul, Java Developer & Web Animator.
--------------------------------------
"Imaging the Imagined: Modeling with Math & a Keyboard"

Nehal Soni

unread,
Jan 10, 2003, 3:10:28 PM1/10/03
to
Thank you very much, i will download the loader from j3d org and see how
things go

"P. Flavin" <anim...@rochester.rr.com> wrote in message
news:oyBT9.2877$2z1....@twister.nyroc.rr.com...

Andrea

unread,
Jan 11, 2003, 12:10:38 PM1/11/03
to
"P. Flavin" <anim...@rochester.rr.com> wrote in message news:<oyBT9.2877$2z1....@twister.nyroc.rr.com>...

Maybe I've misunderstood the question, but I have always been able to
take .obj files and convert them to vrml since Lightwave version 5.0.
Newtek had a pluggin that you could download from thier website. The
current version of lightwave, and or the upgrade already has a vrml
pluggin. I use it from the layout. As far as textures go,if you need
to change a texture map,just change the url of the texture map to
another file. I am inept at programming,so this is the most easy for
me. So basically what Paul is saying,is if you are working with
Lightwave, convert to VRML, then convert the VRML to Java3D?
Andrea

Nehal Soni

unread,
Jan 12, 2003, 10:55:49 AM1/12/03
to
Yes, VRML can be exported in the the version of Lightwave i have, 7.0. The
problem with obj files is that you cannot export information about textures,
since only different materials can be used. So all you get is the geometry.

I havent actually tried the VRML loader for Java, but i did export a scene
and found the texutre coordinates and indices are saved in the wrl file.
This is promising news so far. in the meantime, hoever, i will focus on the
laoder and undersatand how to use it and see how successful the scene looks
in java 3d. The only information that seems to be lacking in the wrl file is
the normal coordinates and indices. However i can use a normal generation in
java3d, in good faith that it will generate normals for me successfully.

"Andrea" <roger...@msn.com> wrote in message
news:a4e42b5e.0301...@posting.google.com...

Andrea

unread,
Jan 15, 2003, 10:17:13 AM1/15/03
to
"Nehal Soni" <ns...@le.ac.uk> wrote in message news:<avs366$al2i$1...@rook.le.ac.uk>...

> Yes, VRML can be exported in the the version of Lightwave i have, 7.0. The
> problem with obj files is that you cannot export information about textures,
> since only different materials can be used. So all you get is the geometry.
>
> I havent actually tried the VRML loader for Java, but i did export a scene
> and found the texutre coordinates and indices are saved in the wrl file.
> This is promising news so far. in the meantime, hoever, i will focus on the
> laoder and undersatand how to use it and see how successful the scene looks
> in java 3d. The only information that seems to be lacking in the wrl file is
> the normal coordinates and indices. However i can use a normal generation in
> java3d, in good faith that it will generate normals for me successfully.
> > > | everything you need to know about 3D simulations
> > > | and models ... theory about 3D modeling, animation
> > > | and physics, and there are tutorials and a working
> > > | a Java3D editor to allow you to build and experiment
> > > | with 3D worlds:
> > > |
> http://www.martinb.com/mjbWorld/index.htm
> > > |
> > >
> http://groups.google.com/groups?dq=&hl=en&threadm=avehbu%24jri%241%40news.un
> i-stuttgart.de
It would be nice if lightwave made a pluggin converter for
JAVA3D,since it would help a lot of world builders in that format. As
far as vrml goes, I've been texturemapping objects in the modeler,and
in the layout, and as long as I'm using the right image file format,
and putting the images in the same directory as the world file, and
making sure that the texture url is pointing at those texture
files,everything seems to work fine.
:)
Andrea
http://www.andrearogers.com

mahendra soni

unread,
Jan 15, 2003, 1:39:00 PM1/15/03
to
Yeh it would!!

Ok, i've followed the advice to use VRML97. I have Lightwave 7.0. I export
the scene as VRML 97. I have used Xj3d and CyberVRML97 loaders.

These are the only two loaders i can find for VRML97. Running the loaders,
inluding the VRML browsers for Java3d included with them, whilst running i
get a bundle of exeptions, out of memory errors, triangulation loops!
etc..there are too many to mention!

So far then i have had little hope in loading VRML. I am afraid i am
beginning to lose faith in loading in java3d and java3d as a whole!!

I wonder, has anyone had success in creating a fairly complex scene in
Lightwave 7.0 (for example a kitchen) and exporting this as a VRML 97 file
and running it with Java 3d successfully. I;m 100% sure it can be done, and
some one out there has done so with success, Mr Flavin and Andrea are my
only source of hope at the moment!! Can any of you do this? If so please let
me know

Thanks

Nehal

"Andrea" <roger...@msn.com> wrote in message

news:a4e42b5e.03011...@posting.google.com...

Justin Couch

unread,
Jan 15, 2003, 5:31:39 PM1/15/03
to
mahendra soni wrote:
> Yeh it would!!
>
> Ok, i've followed the advice to use VRML97. I have Lightwave 7.0. I export
> the scene as VRML 97. I have used Xj3d and CyberVRML97 loaders.

We can't help that authoring tools output poor quality, and in a lot of
cases,
non-conformant VRML. All we can do is bitch at them to get things fixed
properly. Xj3D in particular is very stringent in its enforcement of
both X3D and VRML97 specifications. If there is even the slightest thing
wrong with the file, we'll make it known and refuse to run the content.
I can't speak for Satoshi, the author of CyberVRML but I suspect that is
all you are running into.

> These are the only two loaders i can find for VRML97. Running the loaders,
> inluding the VRML browsers for Java3d included with them, whilst running i
> get a bundle of exeptions, out of memory errors, triangulation loops!
> etc..there are too many to mention!

Sounds like you are using M6 of Xj3D then, which is a good start. We're
probably generating more verbose error messages than we need to, but if
you spent a little time looking at what each exception, you'll find the
far majority of them are non-important. We're being overly verbose
because we're still in development and we don't want to summarise out
bits of information that might be important during the debugging. As for
OOM, that's your problem. If you're loading large files, like Lightwave
puts out, then you have to make sure that the VM has enough memory to
play with in the first place using the -Xm arguments (for sun's JVM
anyway, others will have their own).

--
Justin Couch http://www.vlc.com.au/~justin/
Java Architect & Bit Twiddler http://www.yumetech.com/
Author, Java 3D FAQ Maintainer http://www.j3d.org/
-------------------------------------------------------------------
"Look through the lens, and the light breaks down into many lights.
Turn it or move it, and a new set of arrangements appears... is it
a single light or many lights, lights that one must know how to
distinguish, recognise and appreciate? Is it one light with many
frames or one frame for many lights?" -Subcomandante Marcos
-------------------------------------------------------------------

Joerg Scheurich aka MUFTI

unread,
Jan 16, 2003, 5:55:32 AM1/16/03
to
> We can't help that authoring tools output poor quality, and in a lot of
> cases,
> non-conformant VRML. All we can do is bitch at them to get things fixed
> properly.

You can point users to VRML optimisers/checkers like chisel/vorlon....

http://ovrt.nist.gov/chisel.html
http://www.trapezium.com/index.htm

so long
MUFTI
--
... unix Killing the input queue owner
(aus einem IRIX syslog)

Andrea

unread,
Jan 16, 2003, 7:45:16 AM1/16/03
to
"mahendra soni" <mahend...@ntlworld.com> wrote in message news:<bVhV9.2695$K63.1...@newsfep1-gui.server.ntli.net>...

> Yeh it would!!
>
> Ok, i've followed the advice to use VRML97. I have Lightwave 7.0. I export
> the scene as VRML 97. I have used Xj3d and CyberVRML97 loaders.
>
> These are the only two loaders i can find for VRML97. Running the loaders,
> inluding the VRML browsers for Java3d included with them, whilst running i
> get a bundle of exeptions, out of memory errors, triangulation loops!
> etc..there are too many to mention!
>
> So far then i have had little hope in loading VRML. I am afraid i am
> beginning to lose faith in loading in java3d and java3d as a whole!!
>
> I wonder, has anyone had success in creating a fairly complex scene in
> Lightwave 7.0 (for example a kitchen) and exporting this as a VRML 97 file
> and running it with Java 3d successfully. I;m 100% sure it can be done, and
> some one out there has done so with success, Mr Flavin and Andrea are my
> only source of hope at the moment!! Can any of you do this? If so please let
> me know
>
> Thanks
The memory problems are baffling. I've crossposted this to the
lightwave newsgroup in hopes that someone there can solve those
issues.

How big is your scene? How many lights,how many polygons. 98% of the
time the vrml97 export tool parses the vrml exactly as I want it to.
However, I have to remember to check the embed object button,
otherwise it will write all the objects in the scene as seperate
objects and the scene will be blank.

Also it will write out the animation for bones,morphs, and IK, as a
vrml file,but those won't really parse in the vrml browser. Here is
what I would consider a huge vrml file with big textures and high
polygon count,and sound that I built in lightwave and exported via the
vrml97 export tool.

http://www,andrearogers.com/vrml/seascape/seascape.wrl

:)
Andrea
http://www.andrearogers.com

mahendra soni

unread,
Jan 16, 2003, 8:57:02 AM1/16/03
to
Well, the scene I have is quite complex. Okay, basically, what i am trying
to do is create a kitchen in Lightwave. Put this in Java3d somehow, with a
loader (that will work!!) and then interact and make modifications to it.

The scene at its most complex (i.e. fancy sinks, ovens, all the handles,
bevels etc.) is 28'162 polygons. When i export this as a VRML file its size
is about1.5 mb. I think your Seascape model (very nice by the way) is a bit
more complex perhaps. I will try and use Chisel to "clean up" my VRML, maybe
lightwave is not doing it the best way.

"Andrea" <roger...@msn.com> wrote in message

news:a4e42b5e.0301...@posting.google.com...

mahendra soni

unread,
Jan 16, 2003, 9:09:07 AM1/16/03
to
Oh yeh, as an object file it loads perfectly! Only problem, no textures and
no materials are loaded!! Which is a real blow, can i traverse the scene get
the object and somehow get the Shape3d and alter its apperance. Only probelm
is there are not any texture coordinates. Unless, VRML files do save the
texture coordinates and indices, can i extract these and add them to these
object files.

I will not give up on VRML however, i will get it to load successfully!!

"mahendra soni" <mahend...@ntlworld.com> wrote in message

news:PSyV9.545$XO4....@newsfep1-gui.server.ntli.net...

mahendra soni

unread,
Jan 16, 2003, 9:17:28 PM1/16/03
to
Okay, I've downloaded CosmoPlayer and exported my VRML sene, and need to get
away from Java for a while!! I need to see some results!! he he, i have to
say Lightwave and VRML do a good job.

Okay so the scene isnt exactly Lightwave, but some simple shading, decent
lighting, textures are all seen in the cosmo viewer. So if cosmos can do it
why can't Java 3d. Or are there too many limitation in Java to get decent
results!!

I am thinking of taking Andrea's appraoch to using a less programming
method. Maybe i could write a parser that edits the VRML file and changes
the file location of textures. Well this is my last resort, be better if i
can load the scene and manipulate it on the fly.

I wonder has anyone had the exact results in Cosmo in Java as well, if you
knw any loaders other than xj3d and cybervrml i will be happy to know. By
the way i get a "triangulation loop" error using xj3d, something to do with
indexed arrayd, well it doesnt load geometry! The VRML loaders for java3d
have so far been disappointing. Are there any other avenues for making an
interactive 3d application in java3d using VRML or Lightwave.

"mahendra soni" <mahend...@ntlworld.com> wrote in message

news:82zV9.562$XO4....@newsfep1-gui.server.ntli.net...

Joerg Scheurich aka MUFTI

unread,
Jan 17, 2003, 9:14:29 AM1/17/03
to
> I wonder has anyone had the exact results in Cosmo in Java as well, if you
> knw any loaders other than xj3d and cybervrml i will be happy to know.

VRwave is a open source VRML broswer written in java, but is using local
C/OpenGL code. It also do not have a "real" browser plugin (only a plugin
for doing EAI).

http://www.iicm.edu/vrwave

so long
MUFTI
--
Thu Jun 21 09:50:15 2001 [emerg] Error while opening the workers
(Apache Logmessage)

mahendra soni

unread,
Jan 17, 2003, 9:26:37 AM1/17/03
to
Thanks, i'll see how this goes. Just one last thing, if anyone has any idea
what these errors mean when i load a wrl file (works in cosmos) in the xj3d
browser:-

Error: Failed to load
Endless loop in triangulation detected
IndexedLineStripArray: stripVertexCounts element less than 2

"Joerg Scheurich aka MUFTI" <rusm...@helpdesk.rus.uni-stuttgart.de> wrote
in message news:b09345$881$1...@news.uni-stuttgart.de...

0 new messages