Skip to main content

[JAVA3D-INTEREST] Static gradient background

2 replies [Last post]
Anonymous

Greetings all-

I am trying to create a grey-to-white gradient as a background for a
Java3D-based modeling application. The background cannot rotate (that is,
the colors should remain static and not shift, no matter the point of view),
and performance cannot be significantly impacted.

Note: I've got some bouncin' graphics hardware (NVidia Quadro FX 3000), so
when performance is too slow for me, it almost definitely is too slow on
almost *any* machine. ;-)

I've tried the following methods of implementation:
1. Background with an image: resulted in too high a performance impact for
1600x1200 resolution.
2. Custom Canvas3D subclass in mixed-mode rendering, image drawn on canvas
through Java2D: again too slow
3. Background with unit sphere geometry, gradient image texture mapped onto
the interior of the sphere: sufficient performance, but when I use the
OrbitBehaviour and rotate the ViewPlatform (ViewingPlatform?) rather than
the model itself, the background colors shift as I look at different parts
of the model.
4. Billboard to modify a TransformGroup in the Background geometry, so it
always faces forward: didn't work at all - the background must modify the
matrix to override the Billboard's TG modifications somehow - else I
bolloxed it up.

The obvious route, of course, would be to insert a TransformGroup above the
model's root BranchGroup and use Mouse{Scale|Rotate|Zoom} to modify that
transform group instead of the model's. However, I would prefer to keep
using the OrbitBehavior - it does pretty much what I want from a geometry
modeling perspective. Perhaps I am just being annoyingly stubborn too. ;-)

Thanks in advance,
-Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
izelker
Offline
Joined: 2004-11-02
Points: 0

Mark,

Was you able to create static gradient background with sufficient performance? I need to do the same for my app.

Thanks a lot,
Ilya

Mike Pilone

Mark,

Just some ideas:
- Use a 1x1024 image and let it tile in the background.
- Use a bill board and disable depth testing and use an ordered group to
ensure that it is rendered first.

I'm not sure of the performance impact, but just some ideas.
-mike

> -----Original Message-----
> From: Mark Strasser [mailto:mstrasse@nycap.rr.com]
> Sent: Thursday, November 18, 2004 7:56 PM
> To: Java3D Interest List
> Subject: [JAVA3D-INTEREST] Static gradient background
>
> Greetings all-
>
> I am trying to create a grey-to-white gradient as a background for a
> Java3D-based modeling application. The background cannot rotate (that is,
> the colors should remain static and not shift, no matter the point of
> view),
> and performance cannot be significantly impacted.
>
> Note: I've got some bouncin' graphics hardware (NVidia Quadro FX 3000), so
> when performance is too slow for me, it almost definitely is too slow on
> almost *any* machine. ;-)
>
> I've tried the following methods of implementation:
> 1. Background with an image: resulted in too high a performance impact
> for
> 1600x1200 resolution.
> 2. Custom Canvas3D subclass in mixed-mode rendering, image drawn on
> canvas
> through Java2D: again too slow
> 3. Background with unit sphere geometry, gradient image texture mapped
> onto
> the interior of the sphere: sufficient performance, but when I use the
> OrbitBehaviour and rotate the ViewPlatform (ViewingPlatform?) rather than
> the model itself, the background colors shift as I look at different parts
> of the model.
> 4. Billboard to modify a TransformGroup in the Background geometry, so it
> always faces forward: didn't work at all - the background must modify the
> matrix to override the Billboard's TG modifications somehow - else I
> bolloxed it up.
>
> The obvious route, of course, would be to insert a TransformGroup above
> the
> model's root BranchGroup and use Mouse{Scale|Rotate|Zoom} to modify that
> transform group instead of the model's. However, I would prefer to keep
> using the OrbitBehavior - it does pretty much what I want from a geometry
> modeling perspective. Perhaps I am just being annoyingly stubborn too. ;-
> )
>
> Thanks in advance,
> -Mark
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
> For additional commands, e-mail: interest-help@java3d.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net