VRML odd problem

This is a discussion on VRML odd problem within the vrml forums in Programming Languages category; Hello, I'm new to VRML and I have to make a small VR scene for my project at college. I have the following code: #VRML V2.0 utf8 WorldInfo { title "Avion" } Viewpoint { position 0.0 0.0 5.0 description "Entry view" } NavigationInfo { type [ "EXAMINE", "ANY" ] headlight TRUE } Background { skyColor [ 0.5 0.5 1.0 ] groundColor [ 0.0 0.7 0.0 ] } # AVION DEF Avion Transform { children [ # TRUP DEF Trup Transform { children [ Transform { scale 1.9 0.3 0.4 children [ DEF Sfera Shape { appearance Appearance { material Material ...

Go Back   Application Development Forum > Programming Languages > vrml

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 04-12-2008, 08:12 AM
Sourcerer
Guest
 
Default VRML odd problem

Hello, I'm new to VRML and I have to make a small VR scene for my project
at college. I have the following code:

#VRML V2.0 utf8

WorldInfo {
title "Avion"
}

Viewpoint {
position 0.0 0.0 5.0
description "Entry view"
}

NavigationInfo {
type [ "EXAMINE", "ANY" ]
headlight TRUE
}

Background {
skyColor [ 0.5 0.5 1.0 ]
groundColor [ 0.0 0.7 0.0 ]
}

# AVION
DEF Avion Transform {
children [
# TRUP
DEF Trup Transform {
children [
Transform {
scale 1.9 0.3 0.4
children [
DEF Sfera Shape {
appearance Appearance {
material Material {
diffuseColor 1.0 1.0 1.0
}
}
geometry Sphere { }
}
]
}
]
}
# END TRUP
# MOTOR
Transform {
translation -1.3 0.6 0.0
children [
DEF Motor Transform {
children [
# PROPELER
Transform {
children [
DEF Propeler Transform {
children [
# KRAK
Transform {
translation 0.0 0.05 0.0
children [
DEF Krak Transform {
children [
Transform {
scale 0.015 0.055 0.015
children [ USE Sfera ]
}
]
}
]
}
# END KRAK
Transform {
translation 0.0 0.0 -0.05
rotation 1.0 0.0 0.0 1.571
children [ USE Krak ]
}
Transform {
translation 0.0 0.0 0.05
rotation 1.0 0.0 0.0 1.571
children [ USE Krak ]
}
Transform {
translation 0.0 -0.05 0.0
children [ USE Krak ]
}
]
}
]
}
# END PROPELER
Transform {
translation -0.3 0.0 0.0
scale 0.3 0.075 0.075
children [ USE Sfera ]
}
]
}
]
}
# END MOTOR
# REP
Transform {
translation -1.5 0.25 0.0
rotation 0.0 0.0 1.0 -0.8
scale 0.5 0.2 0.075
children [ USE Sfera ]
}
# END REP
# KRILO
Transform {
translation 0.0 -0.05 1.1
rotation 0.0 1.0 0.0 -0.5
children [
DEF Krilo Transform {
children [
Transform {
scale 0.4 0.05 1.5
children [ USE Sfera ]
}
]
}
]
}
# END KRILO
Transform {
translation 0.65 -0.05 1.15
scale 1.5 1.5 1.5
children [ USE Motor ]
}
Transform {
translation 0.0 -0.05 -1.1
rotation 0.0 1.0 0.0 0.5
children [ USE Krilo ]
}
Transform {
translation 0.65 -0.05 -1.15
scale 1.5 1.5 1.5
children [ USE Motor ]
}
]
}
# END AVION

This executes well. However, adding just one more Transform inside the main
transform's children (DEF Avion Transform { children [ ... [HERE] ... ] })
crashes my system when I run the script and I have to restart it. I'm using
Windows XP and IE7. Here's the actual transform I'm trying to add:

Transform {
translation -1.5 0.25 0.0
rotation 0.0 1.0 0.0 -0.5
scale 0.2 0.1 0.7
children [ USE Sfera ]
}

What's wrong with this?

--
"Let's see what's out there. Engage."
Jean Luc Picard, Star Trek: TNG, Encounter at Farpoint
http://pinpoint.wordpress.com/
Reply With Quote
  #2  
Old 04-12-2008, 08:27 AM
Sourcerer
Guest
 
Default Re: VRML odd problem

<snip>

I'm using Cortona VRML Client 4.2 (release 93).

--
"Let's see what's out there. Engage."
Jean Luc Picard, Star Trek: TNG, Encounter at Farpoint
http://pinpoint.wordpress.com/
Reply With Quote
  #3  
Old 04-12-2008, 10:08 AM
Sourcerer
Guest
 
Default Re: VRML odd problem

Odd gets weird. The following manages to draw two spheres (one large, one
small):

#VRML V2.0 utf8

WorldInfo {
title "Suncev Sustav"
}

Viewpoint {
position 0.0 0.0 40.0
description "Entry view"
}

Background {
skyColor [ 0.0 0.0 0.0 ]
groundColor [ 0.0 0.0 0.0 ]
}

Transform {
children [
Transform {
children [
Shape {
appearance Appearance {
material Material {
diffuseColor 0.84 0.86 0.042
}
}
geometry Sphere {
radius 6.96
}
}
]
}

Transform {
translation 50.0 0.0 0.0
children [
Shape {
appearance Appearance {
material Material {
diffuseColor 0.0 0.5 0.75
}
}
geometry Sphere {
radius 0.63
}
}
]
}
]
}

And the following does not (system crashes again, needs to be switched off
and booted again):

#VRML V2.0 utf8

WorldInfo {
title "Suncev Sustav"
}

Viewpoint {
position 20.0 0.0 40.0
description "Entry view"
}

Background {
skyColor [ 0.0 0.0 0.0 ]
groundColor [ 0.0 0.0 0.0 ]
}

Transform {
children [
Transform {
children [
Shape {
appearance Appearance {
material Material {
diffuseColor 0.84 0.86 0.042
}
}
geometry Sphere {
radius 6.96
}
}
]
}

Transform {
translation 50.0 0.0 0.0
children [
Shape {
appearance Appearance {
material Material {
diffuseColor 0.0 0.5 0.75
}
}
geometry Sphere {
radius 0.63
}
}
]
}
]
}

What's the difference? I set the viewpoint position to 20.0 0.0 40.0
instead of 0.0 0.0 40.0

VRML doesn't seem to like me.

--
"Let's see what's out there. Engage."
Jean Luc Picard, Star Trek: TNG, Encounter at Farpoint
http://pinpoint.wordpress.com/
Reply With Quote
  #4  
Old 04-12-2008, 10:23 AM
Sourcerer
Guest
 
Default Re: VRML odd problem

Hm, nevermind. I downloaded the new version, switched to OpenGL rendering
(instead of DirectX) and now it works.

--
"Let's see what's out there. Engage."
Jean Luc Picard, Star Trek: TNG, Encounter at Farpoint
http://pinpoint.wordpress.com/
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 03:06 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.