WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-05-2009, 07:43 AM
Boerske Boerske is offline
Member
 
Join Date: Oct 2009
Location: Zurich
Posts: 6
imported 3DModel - Color Write - Problem

Hi there,

I am quite new in developing 3D worlds.

few days ago I discovered the <node3d>.Color_Write function in vizard which makes objects disappear but still interaction with my scene. So finally I could handle my goal, letting moving objects of my scene disappear behind a part of my background (a photorealistic 360° panorama).
As an example: There is a tree in my background and I want this tree occluding another moving object in my scene. Therefor I put a "dummy object" in front of this tree and use the "disable color_write function". The result will be that it seems that this tree is occluding the object but in reality the dummy object is doing the job.

So far so good. Everything works out fine as long as I use pre installed objects of vizard(e.g. wall.wrl).
But in the end I will need to use my own created "3d dummy objects" which will have excatly the contour of the background object.

I decided to creat these very simply dummy objects with blender.

My promblem is now that when I import these objects from blender the "Color_Write" function does not work any more. I think I messed up the 3DObject settings or something went wrong with the import process.

Is there somebody out there who can help me with that?
What do I have to take care of?
What settings does the 3D object need? (e.g. solid, mesh, texture,colour, other settings)
What is actually the best import format so that these characteristics do not get lost wile exporting them from blender and importing them into vizard?

Thx a lot for your help
Philipp
Reply With Quote
  #2  
Old 10-08-2009, 12:21 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Are you using node.disable(viz.COLOR_WRITE) to disable color write? This should work on any node3d object. Can you post a sample model or email it to support@worldviz.com.
Reply With Quote
  #3  
Old 10-08-2009, 02:46 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Your model seems to work fine for me. Here is the script I used to test it out:
Code:
import viz
viz.go()

viz.add('tut_ground.wrl')

model = viz.addChild('testtree.lwo')
model.drawOrder(-1) #Ensure model is rendered to depth buffer before other models
model.disable(viz.COLOR_WRITE)

import vizcam
cam = vizcam.PivotNavigate()
cam.centerNode(model)
cam.setDistance(model.getBoundingSphere().radius*5)
cam.rotateUp(10)
Reply With Quote
  #4  
Old 10-09-2009, 07:38 AM
Boerske Boerske is offline
Member
 
Join Date: Oct 2009
Location: Zurich
Posts: 6
Cool it works now.
Thx
It was the "node.drawOrder(-1)" line what made the difference.
what does this exactly do? As a newbie I do not really understand why it is important that the model is rendered before others....
for the future - if i load more of these specific models do they all need this specific drawOrder function???

Anyway, thank you very much helping me at this problem.
Regards
Phil
Reply With Quote
  #5  
Old 10-09-2009, 10:18 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The object you want to have occlude other objects must be rendered to the depth buffer first. The default draw order of objects is 0, so setting the draw order to -1 ensures it is rendered before other objects.
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
view problem nlfrnassimi Vizard 3 03-11-2009 08:33 PM
export problem bazelaisr Vizard 2 05-28-2008 10:19 AM
5DT Data Glove 5 Ultra Problem bjgold Vizard 1 08-08-2006 04:08 PM
problem with female animations vmonkey Vizard 1 10-07-2005 10:36 AM
sound problem alaa Vizard 7 09-02-2005 01:13 PM


All times are GMT -7. The time now is 04:54 AM.


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