WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-03-2008, 12:31 AM
digitaldarklord digitaldarklord is offline
Member
 
Join Date: Jul 2008
Location: Baarn
Posts: 9
Send a message via MSN to digitaldarklord Send a message via Skype™ to digitaldarklord
Collision trouble

Greetings

I have trouble with viz.MainView.collision( viz.ON ) in combination with shaders

This works with the standard skydome.

But...

If I add another sky routine see the code snippet below
Yes and I know how to turn it on ;-)
# sky old style
env = viz.add(viz.ENVIRONMENT_MAP,'sky.jpg')
sky = viz.add('skydome.dlc')
sky.texture(env)
sky.disable(0x3000) #Disable clip plane on sky

# new style
#Add sky model
#sky = viz.add('sky.osg')

#Add textures
#horizon_tex = viz.add('horizon.png')
#horizon_tex.wrap(viz.WRAP_S,viz.CLAMP_TO_EDGE)
#horizon_tex.wrap(viz.WRAP_T,viz.CLAMP_TO_EDGE)
#cloud_tex = viz.add('clouds.png')
#cloud_tex.wrap(viz.WRAP_S,viz.REPEAT)
#cloud_tex.wrap(viz.WRAP_T,viz.REPEAT)

#Apply textures to sky
#sky.texture(horizon_tex,'',0)
#sky.texture(cloud_tex,'',1)

#Add shaders
#sky_vp = viz.add('sky.vp')
#sky_fp = viz.add('sky.fp')

#Apply shaders to sky
#sky.apply(sky_vp)
#sky.apply(sky_fp)

#viz.clearcolor(viz.GRAY)
#viz.fov(70,1.3)
#sky.translate(0,-400,0)
#CLOUD_SPEED = 1.0

When calling this routine is messes up the collision detection. I changed nothing added only the routine above called it from the timer so I am lost

Part 2 of this question.
In my app I created a helicopter flying a maze with a searchlight. So I added a nightmode with affect and uneffect. If you are in the light bundle the sky lights up also with this shader. bizar...

See the screenshots what I mean with this
Attached Thumbnails
Click image for larger version

Name:	skyday.jpg
Views:	760
Size:	144.0 KB
ID:	266   Click image for larger version

Name:	skywhat.jpg
Views:	679
Size:	89.0 KB
ID:	267   Click image for larger version

Name:	collision.jpg
Views:	695
Size:	111.1 KB
ID:	268  

Last edited by digitaldarklord; 09-03-2008 at 12:35 AM.
Reply With Quote
  #2  
Old 09-05-2008, 08:04 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,466
Thanks for the post. Sorry we have not been able to give you an answer yet. We have had a busy few days but we we will try to respond early next week.
Reply With Quote
  #3  
Old 09-08-2008, 05:16 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,466
Sorry, I am not quite clear on your question. When you say that collision detection is messed up what exactly is happening.
Reply With Quote
  #4  
Old 09-12-2008, 11:43 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Your intersection tests might be conflicting with the sky model. Try disabling intersections tests on the sky using the following code:
Code:
sky.disable(viz.INTERSECTION)
Reply With Quote
  #5  
Old 09-15-2008, 05:46 AM
digitaldarklord digitaldarklord is offline
Member
 
Join Date: Jul 2008
Location: Baarn
Posts: 9
Send a message via MSN to digitaldarklord Send a message via Skype™ to digitaldarklord
To define it more clearly. When I use the code as posted here# the collsion is not working or something. When we use this code to generate nice moving clouds etc. The user is able to walk trough objects. (about a meter or so. If I use the more simple skydome code. The collision works normal. So my conclusion it has to do with the code as posted. Because I did not change anything else

Thanks
Reply With Quote
  #6  
Old 09-15-2008, 05:50 AM
digitaldarklord digitaldarklord is offline
Member
 
Join Date: Jul 2008
Location: Baarn
Posts: 9
Send a message via MSN to digitaldarklord Send a message via Skype™ to digitaldarklord
Second part question

When I create a search light on the helicopter and let it travel in the room in the xyz grid. I see something strange happening. The light also lights up the skydome.

I do not understand it because I created the unaffect on in
sky.unaffect
Reply With Quote
  #7  
Old 09-16-2008, 04:04 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,466
Is it possible for me to view the complete code and load up this world here. You can email me at loomis@worldviz.com and I can give you directions for uploading.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Collision detection with haptic pen mjabon Vizard 3 01-17-2008 06:35 PM
linked object collision pgagolf Vizard 1 04-19-2007 01:27 PM
Collision with avatars and scene not working JvdBosch Vizard 12 09-14-2006 06:01 PM
collision events trigger Eunice Vizard 1 01-03-2006 10:39 AM
Walking avatars --> collision detection? sjroorda Vizard 3 10-13-2005 04:47 AM


All times are GMT -7. The time now is 01:13 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC