![]() |
Avatar-Format-Recommendation for Vizard
Hi,
we are just playing with Kaydara which uses the Filmbox (.fbx) format. We can import it into 3D Studio Max and export it into a VRML-File. The Avatar moves but the shading does not seem to be right (looks kind of 2Dimensional). What format would you recommend to import it into vizard, looking a bit more 3dimensional? Thanks, have a great weekend, Johannes |
|
Hi,
Did you get the email (about a week ago)? No problem if you do not get to it right now, just want to make sure you got it. Right now I have the hopefully short question about vectors and translate, from time to time I get the following error using object.translate commands and vectors: tempVector1=glider.initialVelocity*timeElapsed print 'tempVector1',tempVector1 tempVector=vizmat.Vector(objects.get(viz.POSITION) +tempVector1) print 'tempVector',tempVector objects.translate(tempVector) tempVector1 [0.000000, 0.000000, 0.895308] tempVector [0.000000, 0.997500, 0.853729] Traceback (most recent call last): File "050632_GoodXX.py", line 1942, in ontimer moveGliderEven(gliderObj) File "050632_GoodXX.py", line 1332, in moveGliderEven for objects in greyBallBasket: AttributeError: Vector instance has no attribute '__float__' Had a similar problem yesterday, but worked around it.. If I have a positionVector ballPositionVector and want to access the values (x,y,z). so I use ballPositionVector[0],ballPositionVector[1],ballPositionVector [2] and want to generate a new vector out of these I get the error below. Why that? print self.ballPositionVector,self.ballPositionVector[0] self.x=self.ballPositionVector[0] print 'self.x',self.x self.y=self.ballPositionVector[1] self.z=self.ballPositionVector[2] self.actualPos=viz.Vector(self.x,self.y,self.z)#ac tual Position File "050629_GoodXXSteve.py", line 316, in initializeValues self.actualPos=viz.Vector(self.x,self.y,self.z)#ac tual Position File "C:\Program Files\Vizard25\vizmat.py", line 379, in __init__ elif type(x) == type([]): AttributeError: Vector instance has no attribute '__float__' Exception exceptions.AttributeError: "Ball instance has no attribute 'velocityXArrow'" in |
When you use a vector to translate an object you need to do the following:
Code:
object.translate(vector.get()) When creating vectors you can pass it individual values or a list or another vector: Code:
vector = viz.Vector(0,1,2) |
I looked at your model and it seems like all you need to do is enable modulation on the object:
Code:
pixie1.appearance(viz.MODULATE) |
1 Attachment(s)
Hi,
thank you for the answer. 1. Avatar: the line you wrote helps with the shading but the shading does not seem to be affected by the lightning of the room anymor meaning it does not matter if the avatar is below the table or on the table, the shading stays the same?! Should I rather use another format? 2. Most important problem: I'm using a modified version of the mouse-navigation from the post "Mouse problem" (steve is a research assistant here). I experience one problem when I try to rotate (with tab and mouse-button). When I start rotating, my view jumps, which is not nice. (see attached code, import the file as a module in any existing scene). Initialize in the scene-file with view = viz.get(viz.MAIN_VIEWPOINT) Navigation=SNNewBoth.SNNewBoth(view) 3. For an explanation of a vector-addition problem (physics topic: relative motion) I developed the following animation. Right now I have to start each motion seperately with a key (a, b, c). If I want them to start automatically after each other, I guess I have to do something like with Code:
def mykeyboard(key): 4. Sometimes when I use object.alpha(0.4) I have problems with the rendering of the scene. Funny things happen e.g. the color of fieldlines is black instead of red, or transparent arrows cut wholes in the wall. Guess I will have to make some screenshots sometimes to show what I mean. Thank you, Johannes |
Hi,
1) Vizard does not currently have shadow lighting, so the shading of objects stays the same regardless of what other objects are between it and the light source. 2) The problem is that mouse navigation is enabled on the main viewpoint. So the jumpiness is caused by the default mouse navigation fighting with your mouse navigation over control of the viewpoint. 3) You should probably use the vizact library for this. Create an action that perfroms the first two animations, and use a callback to deteremine when to perform the last part. Code:
#Create the action once |
1) Thank you.
Quote:
view = viz.get(viz.MAIN_VIEWPOINT) Navigation=SNNewBoth.SNNewBoth(view) It even happenes also, when default mouse navigation is off. It seems to be related to the y-coordinate of the view not beeing zero. e.g. if you try to change the line in your example above from self.__view.translate(0,0,-10) to self.__view.translate(0,1,-10) you will experience the jumping. [\B] 3) Thank you, I will try that. 4) alpha: We have thrown it out, but if it happens again I will send you a Screenshot. I guess both of your guesses make sence, the complexity (I experienced it also a few months ago with field lines. )d |
All times are GMT -7. The time now is 05:09 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC