Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (290)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Why does it  (Read 2687 times)
0 Members and 1 Guest are viewing this topic.
Offline Java Cool Dude

Senior Member




Java forever


« Posted 2003-10-31 04:51:52 »

mad flicker when I try to use the function view.getTransform().lookAt(...) to move around my 3D world?
Besides when I change the location of the eye, the effect lasts even less than a second before it gets back to where it was + more flickering...
Grrrrrr Angry
Offline Java Cool Dude

Senior Member




Java forever


« Reply #1 - Posted 2003-10-31 06:27:37 »

lookAt(new , new , new) strangely fixed it... Roll Eyes
Offline Yuri Vl. Gushchin

Senior Member




Speak Java!


« Reply #2 - Posted 2003-10-31 07:55:14 »

Strange...

BTW, I had similar behavior when my changes to lookAt() were not synchronized with rendering thread, so the eye position was changing in the mid of rendering pass (your instance of View can be used for such sync).

Yuri

Yuri Vl. Gushchin
JProof Group
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline DavidYazel

Junior Member




Java games rock!


« Reply #3 - Posted 2003-11-03 18:51:01 »

He is right.

Lookat unfortunely modifies the input parameters.

David Yazel
Xith3D Project Founder
http://xith3d.dev.java.net

It may look complicated, but in the end it is just a bunch of triangles
Offline Java Cool Dude

Senior Member




Java forever


« Reply #4 - Posted 2003-11-03 19:10:02 »

Quote
He is right.

Lookat unfortunely modifies the input parameters.


Can you fix that Sir Smiley
Offline Yuri Vl. Gushchin

Senior Member




Speak Java!


« Reply #5 - Posted 2003-11-04 15:33:56 »

I even don't know [read: don't think] it should be fixed because of it will introduce synchronization calls in the rendering pass.

I believe it should be done on application level [at least for now].

Yuri

Yuri Vl. Gushchin
JProof Group
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #6 - Posted 2003-11-06 03:40:57 »

Should thread local storage be used to avoid synchronzation?

Offline abies

Senior Member





« Reply #7 - Posted 2003-11-06 08:27:54 »

If this is synchronization issue, I think we should consider more strict rules about what can and what cannot be done at what point.

For me, calling ANY scenegraph method from anything other than rendering thread is major offense. This includes direct modification of values from AWT event thread. AWT listener should only enqueue actions/events which will be processed later by main rendering thread - be it in Behaviour, or just before/after renderOnce in main loop.

In java3d, it was possible to change scenegraph from event thread, because all access was done through synchronized messages, which where processes later by rendering thread. In xith3d, with direct access to everything, I think it should be the first big advice for any programmer - do not touch scenegraph from event thread.

Artur Biesiadowski
Offline kevglass
« League of Dukes »

JGO Kernel


Medals: 54
Projects: 20


Mentally unstable, best avoided.


« Reply #8 - Posted 2003-11-06 08:50:13 »

Absolutely!

Could this be enforced this via some checking on the current Thread (compare to the rendering Thread). An assert would seem to be ideal here, assert if you're making modifications from any thread other than the rendering thread?

Kev

Offline Jens

Senior Member




Java for games!


« Reply #9 - Posted 2003-11-06 09:17:41 »

I completely agree here and will include this in the tutorials.

Xith3D Getting Started Guide (PDF,HTML,Source)
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline endolf
« League of Dukes »

JGO Coder


Medals: 4
Projects: 1


Current project release date: sometime in 3003


« Reply #10 - Posted 2003-11-06 10:10:15 »

I agree, one of the things I learned from doing java3d was to use behaviors for *everything* that touched the scenegraph, I have a TransformGroupUpateBehavior (or something like that) so I can set a transform during a frame render and  it won't take effect untill the bahvior fires inbetween the next frames.

Endolf

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Get high quality music tracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (63 views)
2013-05-17 21:29:12

alaslipknot (72 views)
2013-05-16 21:24:48

gouessej (103 views)
2013-05-16 00:53:38

gouessej (100 views)
2013-05-16 00:17:58

theagentd (110 views)
2013-05-15 15:01:13

theagentd (100 views)
2013-05-15 15:00:54

StreetDoggy (145 views)
2013-05-14 15:56:26

kutucuk (168 views)
2013-05-12 17:10:36

kutucuk (167 views)
2013-05-12 15:36:09

UnluckyDevil (176 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.118 seconds with 21 queries.