since curling the fingers of your
right hand produces a counter clockwise circle with your thumb indicating the
normal vector.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in th
will be as well.
More advanced versions subdivide only the longest edges, but they are much more
complex without alot more benefit.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include
-1
subtris [0,3,2], [3,1,2]
> 2
> / \
> / \
>/ 3
> / \
> / \
> 0---1
subtris [0,1,3], [0,3,2]
> 2
> / \
> / \
>3 \
> / \
> / \
> 0---1
subtris [0,1,3], [1,2,3].
Doug Gehring
e index that points to which
> geometry of the Shape3D was picked. How do I get this index?
This is stored as part of the PickIntersection, since it is specific to the
intersection. Use PickIntersection.getGeometryArrayIndex().
PickIntersection.getGeometryArray() will return the
nges.
The tarball is about 200K, so I won't post it here. Contact me directly if you
are interested.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the m
that uses floating point
coordinates will improve the problem.
> But the bigger problem occures when i have a scene with
> aOrientedShape(QuadArray geometry):
> -the points in the background don't move anymore when i rotate the view
> -much more points are displayed
This is a bug, can you
ith holes. Isolate your problem into a small test case submit it as a
bug.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST&
able
even though they are in a large array.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, sen
get the intersection in 1.1.3?
You may be able to use the source to the 1.2 picking utilities to make some
better utilities for 1.1. You'll have to deal with 1.1 not having the PickCone
and PickCylinder classes, but oth
play until after processStimulus() has returned.
See the updated Test.java for an example of this. Search for "updateBehavior".
Doug Gehringer
Sun Microsystems
Test.java
> From: Norihito Hiruma <[EMAIL PROTECTED]>
> > From Doug Gehringer <[EMAIL PROTECTED]>
> > When making many changes to the scene graph outside of a behavior there
> > is no way for Java3D to know when you are done and Java3D will probably
> > update befo
o move back
translate.x = x1;
translate.y = y1;
translate.z = z1;
temp.set(translate);
// combine the translation with the previous transformation
trans.mul(temp, trans);
Doug Gehringer
Sun Micros
dge-on, which is why it
disappears.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
aviors register a WakeupOnBehaviorPost with
a null behavior and the "reset" postId. Calling Behavior.postId() with
the "reset" postId will make processStimulus() be called on the behaviors
with a WakeupOnBehav
> I want to assure you Sun is committed to Java 3D. It's a crucial piece
> of our Java platform strategy that's on its 3rd release since
> introduction 2 years ago. If you saw Sun's product announcement
> yesterday, you would have seen Java 3D prominently featured. Products
> like Facet Decisio
> From: "Andrew R. Thomas-Cramer" <[EMAIL PROTECTED]>
>
> I can confirm this approach works. I implemented it to display a surface graph
> with both colors and wire-frame.
> To be more specific about the Z value, you'd need to set the polygon offset
for
> the wire-frame _less_ than that for the fi
nt to turn off rendering for
the subgraph.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, s
> From: Dean Iverson <[EMAIL PROTECTED]>
>
> Is it safe to update a live scene graph (assuming the appropriate
> capabilities are set) from inside a Canvas3D mouse/keyboard event handler?
Yes, it is safe. If you make several changes to the scene graph the changes may
show up in different frames
er with more z resoulution (24 bits instead of 16 bits) will
help, but a back/front ratio of 10 with objects in the back half of the z
range is going not look z-buffered no matter what you do.
Doug Gehringer
Sun Microsystems
=
the best results for your
graphics card.
Doug Gehringer
Sun Microsystems
PolygonOffset.java
may not be correct for some data.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
o is
less than 3000 to avoid this effect. You may need to make this ratio even
smaller if you have objects that are very close together near the back plane.
Note that this is a property of the mathmatics used for viewing 3D objects, so
that this problem is common to all 3D graphics libraries, not
> From: Zak <[EMAIL PROTECTED]>
>
> I am trying to set up a routine that will check for movement of an object. I
want to be able to tell the location(coordinates of an object) relative to the
screen.
>
> How can I make it check all the time for changes in the object?
Try using the attached uti
after you delete the reference
to your matrix, you may have an unintended reference to the matrix that you
still need to get rid of. An excellent tool for tracking down this kind of
problem is OptimizeIt, available at http://www.optimizeit.com. The heap analyzer
in OptimizeIt can be used to track down all
riment, try setting your vertex colors to the same color you specify
in your Material. The result should be the same picture as without vertex
colors.
If you continue to see unexpected colors, isolate your problem into a small test
case and send it in as a bug.
Doug Gehringer
Sun Microsystems
=
rry for any confusion that this may
have caused (I gave Doug some bad information).
--
Kevin Rushforth
Java 3D Team
Sun Microsystems
[EMAIL PROTECTED]
>Date: Tue, 30 Jan 2001 11:59:40 -0800
>From: Doug Gehringer <[EMAIL PROTECTED]>
>Subject: Re: [JAVA3D] HELP! Shad
> How can I swap the way the mouse moves? Whenever I move it left it (the
> object ) goes right. I want it to go the way the mouse does...
Check the flags. The mouse behaviors have flags which invert the action.
Doug Gehringer
Sun Micros
it
> > > Date: Tue, 30 Jan 2001 11:20:42 -0500
> > > From: Shawn Kendall <[EMAIL PROTECTED]>
> > > Subject: [JAVA3D] Texture memory use of GIF vs. RGB
> > > Comments: To: Kelvin Chung <[EMAIL PROTECTED]>, Paul Byrne
> > <[EMAIL PROTECTED]>,
splays OK. I now attempt to double the size of the text using:
>
> frontText.setRectangleScaleFactor(2.0f);
> frontText.setString("New string");
>
> But the text now completely vanishes.
The rectangle scale factor starts out at 1/256. To double the size of the
> From: Zak <[EMAIL PROTECTED]>
>
> I am trying to make my own canvas and extending Canvas3D. This is the code.
>
> public class Globe3DCanvas extends Canvas3D{
>
> public Globe3DCanvas(java.awt.GraphicsConfiguration c){
>
> }
Add the line:
super(c);
as the first line of the constructor
xtures into a single image and then use the texture coordinates to
select between the textures.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signo
o of 32K on a 24 bit depth buffer and a ratio
of 8M on a 32 bit depth buffer.
All this makes me think that 3000 is probably a pretty good limit for a 24-bit
depth buffer, which would make the equivalent ratio on a 32 bit depth buffer be
e scenegraph really lends
> > itself to fairly static environments. If you need to make changes
> > frequently, seems like there is a fairly stiff penalty.
I'd put it that making frequent changes requires careful coding to prevent
memory bloat. Garbage collection is an improvment
he speed of picking.
Experiment with different numbers of geometry per shape to come up with the best
balance for your application.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and includ
bjects for each pick. Use these to find the
specific faces and verticies that were picked.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signo
et up the image
java.net.URL bgImageURL = // URL for your image
TextureLoader bgTexture = new TextureLoader(bgImageURL, this);
// Create a background with the static image
Background bgImage = new Background(bgTexture.getImage());
bgImage.setApplicationBounds(bounds);
Dou
call:
PickTool.setCapabilities(shape3d, PickTool.INTERSECT_TEST);
Use the INTERSECT_COORD flag if you want to get the coordinates of the picked
point and INTERSECT_FULL if you want to get all of the intersection info, for
example, the normal, color or tex coord at the picked
Hi Kevin,
Your response is a bit cryptic. Do you mean:
it is possible, see the javadoc for how
it is possible, the information can be inquired and you can do it
yourself
it is possible, but not yet implemented. Look for it in J3D 1.2 beta
You may want to cl
ht example. The BoundingBox for the
Shape3D is calculated and made slightly larger to make it more likely that
the shape can be picked. This is not a perfect fix, but it is the best we
can do until Java3D 1.2 is here.
Java3D 1.2 beta and later will have improved picking functionali
and asking the
user "is this the one you wanted?".
You also could transform the eye point and the line points to VWorld coordinates
and try to figure out which is closest. This is non-trivial, but let me know if
you want to try it and I can lay out the pieces you'll need.
Doug Gehri
enerally set up to display objects in the -1 -> 1
range around the origin.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTE
o put it into a TransformGroup and use
a scaling transform. Other ways to change the apparent size of your scene are
to move the view platform closer to your scene (i.e. get the observer closer to
your scene) or to use a smaller field of view on your view (i.e. have the
observer look at the scen
ch allows J3D to wait until the changes are made
before displaying a new frame.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTER
> From: Ronald Petty <[EMAIL PROTECTED]>
>
> I just installed java and the 3d api, now my video card is in like 256
> color(32 meg diamond viper). I went to control panel and set it back and
> nothing changes even if I reboot. Any idea ?
Neither the Java or J3D installs should have any effe
ometry.Primitive docs are there in
both the compressed tar file and ZIP versions of the doc downloads.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the messa
> From: "Adam Belmont
>
> I recently tried running my java 3d application in a Jdk 1.2.2 Hotspot Engine
> VM on Windows 98.
>
> The thing that I noticed is dynamic rotations (from a
> MouseRotateBehavior) will pause , for 1/2 sec and then continue. But ,
> the pausing is pretty frequent , about e
gt; Am I doing something wrong? Or is this a known problem?
This is a known problem. Picking points using a PickRay is almost impossible.
J3D 1.2 will have a solution soon. In the meantime, check out
http://tintoy.ncs
- you may be able to find an implementation out there
somewhere.
Doug Gehringer
Sun Microsystems
> From: <[EMAIL PROTECTED]>
> Subject: Re: [JAVA3D] Creating a cube with GeometryInfo
>
> Although I haven't tried your example, I'm pretty sure, that it deals with
Here is a utility class for doing local to window transformations. The tricky
part is dealing with perspective views, since J3D does not return the
perspective transformation matrix.
This should give the same results as the Canvas3d.*VworldToPixel*() methods
coming in J3D 1.2 beta.
Doug
two frames to be sure your changes are on the screen, in 1.2 you should
only need to wait one frame.
You'll want to use the Object wait/notify methods to halt and restart the loop
thread.
Doug Gehringer
Sun Microsystems
==
oords. Note that changes to to the local to VWorld
transform for the ViewPlatform have the opposite effect as changing the tranform
on the object: scaling by 1/10 on the ViewPlatform makes the object appear 10x
bigger.
Doug Gehringer
Sun
s from back to front automatically is
being considered for J3D 1.2.
Doug Gehringer
Sun Microsystems
import java.applet.Applet;
import java.awt.BorderLayout;
import java.awt.event.*;
import java.awt.GraphicsConfiguration;
import com.sun.j3d.utils.applet.MainFrame;
import com.sun
n data and then use a
mesh simplification algorithm to reduce the number of triangles.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JA
> From: "Andrew R. Thomas-Cramer" <[EMAIL PROTECTED]>
> > From: Doug Gehringer <[EMAIL PROTECTED]>
> >
> >> In a possibly related question, what do the scale components of the
> >> ViewingPlatform transform mean?
> >
> >Two
e a common problem. I'll look into what it
will take to make this work with the SimpleUniverse code.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the messa
rdinate(), setColor(), etc calls, but the memory usage
won't suffer.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST&qu
ouldn't
appear multiple times. If the problem is from a Behavior such as a LOD or
Billboard, then the correct solution is for the loader to clone the tree, and we
need to fix that bug.
Send me your VRML (if possible) and we'll see what we can find.
Doug Gehringer
Sun Microsystems
=
> From: Daniel Selman <[EMAIL PROTECTED]>
> The only occasions that I have seen a white rectangle displayed for a Text2D
> was when I kept increasing the point size. If I set the point size very high
> (like 400) the text will fail to render and result in a white rectangle.
>
This sounds like th
rom your UI event handling code.
-- If you are making several changes, then you may want to use
Behavior.postId() to group your changes into a single frame.
This example makes a single change, but it shows the general concept.
Doug Gehringer
Sun Microsystems
== CUT HERE and s
ngle appearance, making the change directly is
probably what you want.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST&qu
J3D the front and back distances can have different policies, use
the same policy (i.e. View.VIRTUAL_EYE) when determining this ratio.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and in
the same frame. Other than that, there is no
advantage or disadvantage to making scene graph changes from any particular
thread.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include
sed by my Volume Rendering demo.
Doug Gehringer
Sun Microsytems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send em
In
this case, the algorithm is: determine the lit color of each vertex of the
polygon and then draw a shaded line between the vertices. But this is really a
special case of rendering polygons, not really a way of lighting lines.
Doug Gehringer
Sun Microsystems
is,
trace back the BG reference to it's root and look for the bad reference.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-
-buffer.
Using a frame buffer with more z resoulution (24 bits instead of 16 bits) will
help, but a back/front ratio of 10 with objects in the back half of the z
range is going not look z-buffered no matter what you do.
Doug Ge
away.
Doug Gehringer
Sun Microsystems
> Date: Fri, 19 Nov 1999 13:32:53 -0800
> From: Blaine Bell <[EMAIL PROTECTED]>
> Subject: [JAVA3D] Test Case!!! Re: Render Order
> To: [EMAIL PROTECTED]
>
> Here is a simple test case. Two cubes, the view that you see when the
>
PickMouseBehavior is layered on top of PickObject, how does it not behave the
way that you expect?
Doug Gehringer
Sun Microsystems
> Subject: [JAVA3D] HELP: Picking
>
> I'm trying to do picking without extending PickMouseBehavior, but I
> haven't been able to get it to wo
> I am having a problem in picking lines...
In the short term, try the pickingExt utilites at the www.j3d.org site. Much
better pick code is coming in J3D 1.2 beta.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, s
> From: Shawn Kendall <[EMAIL PROTECTED]>
>
> Doug Gehringer wrote:
>
> > > I am having a problem in picking lines...
> >
> > In the short term, try the pickingExt utilites at the www.j3d.org site.
Much
> > better pick code is coming in J3D 1.2 b
k for the "Single Value Decomposition"
alorithm in a computational math book.
If you just want to get these values, see the Transform3D get() methods. These
will return the scale, translation and quanternion rotation for a Transform.
Doug Gehringer
===
nt use of memory, but again I run out of memory.
The real data usage is still in the doubles in the PointArray.
>
> I'm working on an Integraph TZD 2000 GL2 450MHz workstation with 384Mb of
> RAM, so memory shouldn't be a problem.
384 MB will be enou
gt; returned value from pickAny()?
This is really a Java language question. The return value from a method can be
ignored without errors or warnings. I don't know why. It does come in handy
sometimes, but it can also lead to not checking the error status for some
methods as
s for the children of the group.
The Volume Rendering demo at the www.j3d.org uses lots of OrderedGroups, but I
suspect that you'd be better off experimenting with a small test program instead
of wading into all that co
constant across different graphics boards, so the same polygon offset values
should work for more boards.
Doug Gehringer
Sun Microsystems
/*
* @(#)PolygonOffset.java 1.48 99/05/20 14:07:00
*
* Copyright (c) 1996-1998 Sun Microsystems, Inc. All Rights Reserved.
*
* Sun grants you ("Lice
> From: Matthew Cairns <[EMAIL PROTECTED]>
>
> Exception: com.sun.j3d.loaders.vrml97.impl.ParseException: Unknown node type:
> Separator
Separator is a VRML 1.0 node type. The loader is for VRML 2.0 files. You need
to update your files to the 2.0 format.
Doug Gehringe
> the constructor for PointArray is as follows:
> PointArray(int vertexCount, int vertexFormat)
>
> I want to make an extension for PointArray, but can't figure out how to
> make the constructor.
>
> I'm extending it as ParticleArray for a particle system project.
> Particle extends Point3d an
on the Transform3D will just change the value of the
Transform3D. You then need to copy that Transform3D to the TransformGroup using
TransformGroup.setTransform().
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email
an either measure the
actual size, or assume a 0.25mm / pixel size and set the
width = 2048 pixels * 0.25 mm/pixel * 1m / 1000mm = 0.512m
height = 768 pixels * 0.25 mm/pixel * 1m / 1000mm = 0.192m
Doug Gehringer
Sun Microsystems
;
view.setBackClipPolicy(View.VIRTUAL_EYE);
double frontDist = 0.1; // <-- set this to what you need
view.setFrontClipDistance(frontDist);
view.setBackClipDistance(frontDist * 1000.0);
Adjust frontDist to make your picture look righ
lement PointArray for
> its geometry??
Sorry to sound like a broken record, but the J3D 1.2 beta release (coming very
soon) has this functionality. The pick utilities will return the individual
point which was picked, along with all kinds of other useful info.
Doug Ge
nt > 2) {
Node test = sgp.getNode(nodeCount - 2);
if (test instanceof BoxID) {
yourBox = (BoxID) test; // success
}
}
I may be off-by-one on my indicies to getNode(), but hopefully you get the idea.
Doug Gehringer
SunMicrosystems
===
the
axe larger and larger (accompanied by an appropriate sound, etc as the axe
hits).
Hope this helps,
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the mes
You want to move your back clip distance back. Careful not to move it too far
though. You want to make sure that
back clip distance / front clip distance
Is > 1000 or you can loose depth buffer resolution.
Doug Gehringer
Sun Microsystems
> From: Mojtaba Hosseini <[EMAIL
> From: Tim Bray <[EMAIL PROTECTED]>
> At 09:40 AM 1/24/00 -0800, Doug Gehringer wrote:
> >You want to make sure that
> >
> >back clip distance / front clip distance
> >
> >Is > 1000 or you can loose depth buffer resolution.
>
> Er, sh
ike what happens when the front clip plane is too close to the eye.
If (back clip distance / front clip distance) > 1000, then objects get mashed
together in the depth buffer, leading to the kind of artifacts you are seeing.
Doug Ge
s not
scaled/rotated around the origin, but its better than the MouseZoom behavior.
I'll see if I can improve on this sometime soon,
Doug Gehringer
Sun Microsystems
/*
* %Z%%M% %I% %E% %U%
*
* Copyright (c) 1996-1999 Sun Microsystems, Inc. All Rights Reserved.
*
* Sun grants you (&
the intersections of the PickRay with your polygons for your MC point.
Hope this helps,
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff
Try using the attached class. It keeps track of the transformations and has a
method to transform from local coordinates to window coordinates.
It can probably be simplified using the
Canvas3D.getPixelLocationFromImagePlate() method in J3D 1.2 beta (just
released).
Doug Gehringer
Sun
ther much.
Can you send us your modified PickTest demo?
Thanks
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST&q
roto at line 14926 with
the PROTO definition body in lines 57-14919.
Doug Gehringer
Sun Microsytems
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".
's
and their parent BG's. You might want to just subclass TransformGroup and
add a field which holds the parent.
J3D doesn't allow you get the parent of a live scene graph to allow J3D to
optimize the scene graph, but it seems like a ALLOW
> To do smoke you'll need to render the points as "fuzzy" points,
Antialiased large points make good primitives for this.
Doug Gehringer
Sun Microsystems
===
To unsubscribe, send email to [EMAIL PROTECT
mentations
2) OrientedShape3Ds. These are new in J3D 1.2 beta1 and should be
faster than using Billboards since the orientation is managed by
J3D "directly" rather than through a Behavior.
Doug Gehringer
Sun Microsytems
> From: "Casteel, Don" <[EM
.
Sounds like a perfect use for Billboards or OrientedShape3Ds. J3D will take
care of making the labels always point the right direction.
Doug Gehringer
Sun Microsytems
===
To unsubscribe, send email to [EMAIL PROTECTED] and in
-x axis), since
that transformation would require -1 scaling along the x axis and the billboard
transform is rotation only. +z out and +y up implies +x is to the right as long
as there are no negative scales in the transformation.
Doug Gehringer
Sun Micorystems
=
possible to add a caching mechanism to the VrmlLoader, but it does not
exist yet. Contact me directly if you are interested in working on this. It
should not be to difficult, but you'll have to make changes to the Vrm
create
> non-convex polygons. I tried setting the polygonAttributes to
> polygon_lines, but then there was no fill, and the internal triangles showed
> up.
You can use a separate Shape3D which shares the same Geometry object. On one you
have a fill Appearance and the other a l
> From: Doug Gehringer
> > From: "Dvorak, Daniel J." <[EMAIL PROTECTED]>
> > Subject: [JAVA3D] polygon with border
> > To: [EMAIL PROTECTED]
> >
> > Is there any easy way to add a border (say, 2 pixels wide) to a filled
> > polygon witho
Here is my latest development jarfile. It matches the latest CVS source. If
your part still fails to load, send me the part and I'll figure out what is
going wrong.
Doug Gehringer
Sun Microsystems
vrml97.jar.gz
1 - 100 of 132 matches
Mail list logo