WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-08-2016, 10:10 PM
rajnishv rajnishv is offline
Member
 
Join Date: Jan 2016
Location: Kalina,Sanatcruz(East),Mumbai,Maharashtra,India
Posts: 94
Smile Regarding creation of a 3D Models Menu

Hi Jeff,
This is Rajnish here from Xenium,request you to assist me for the following.

Problem Statement:I want to create a menu containing 3D models.
This menu will get triggered on wand event(I have achieved).
At run time i have to load models dynamically on wand event from the 3D menu appearing on screen.
Pls assist me how to create 3D models menu,selecting a Model (small 3D model) with give me immersiveness and depth in the menu as well containg the models.
Reply back jeff.
Reply With Quote
  #2  
Old 03-09-2016, 07:15 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
In the following example, each model is added to a sub-panel on the main vizinfo panel. Each time one of the sub-panels is selected, a model is added to the world:

Code:
import viz
import vizinfo
import vizact
import vizdlg
import random

viz.go()

piazza = viz.addChild('piazza.osgb',scene=1)

avatarPanel = vizinfo.InfoPanel('Add an avatar',align=viz.ALIGN_LEFT_BOTTOM,fontSize=22,icon=False)
avatarFiles = ['vcc_male.cfg','vcc_female.cfg','vcc_male2.cfg']
avatars = []
avatarPosition = [[-4.5,0,9],[-2.2,0,7.3],[-4.3,0,12],[-3,0,16.7],[4,0,21.8],[2.3,0,19.8],[4.1,0,14.7],[4.3,0,11.9],[4.5,0,9],[2.2,0,7.3]]

def avatarPicked(avatar,filename):

    pos = avatarPosition.pop()
    euler = [random.randint(180,360),0,0]
    avatarClone = avatar.clone(pos=pos,euler=euler)
    
    if len(avatarPosition) ==0 :
        avatarPanel.visible(viz.OFF)
        print 'All the avatars have been added'
    
for i,filename in enumerate(avatarFiles):
    
    avatar = viz.addAvatar(filename, scale=[45]*3, euler=[i*90,0,0])
    avatar.addAction(vizact.spin(0,1,0,45))
    avatar.enable(viz.DEPTH_TEST, op=viz.OP_ROOT)
    avatar.state(1)
    avatars.append(avatar)
    subPanel = vizdlg.Panel(layout = vizdlg.LAYOUT_VERT_CENTER, border= False)
    subPanel.setMinSize([100,0])
    subPanel.addItem(avatar)
    avatarPanel.addItem(subPanel,align=viz.ALIGN_CENTER)
    vizact.onbuttonup(subPanel, avatarPicked, avatar, filename)
Reply With Quote
  #3  
Old 03-10-2016, 05:18 AM
rajnishv rajnishv is offline
Member
 
Join Date: Jan 2016
Location: Kalina,Sanatcruz(East),Mumbai,Maharashtra,India
Posts: 94
Reagdring 3D Menu and Menu should look like a 3D View Perpective to any user.

Hi Jeff,
Thanx for the help for the last post.
The exact way what i want to achieve a 3d menu view like this(carousel menu consisting 3D models):
Pls refer below link:
You may think of that instead of image there are moldes in carousel:

http://www.creattor.com/files/27/389...eenshots-2.jpg

I m trying my best to get it ,but there is nothing on forum.
Pls assist me how to proceed.
Pls give any idea.
Waitinf or ur reply.
Reply With Quote
  #4  
Old 03-11-2016, 12:35 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You can use texture quads placed in the world and update their positions when selections are made. Use viz.pick to help with selections. To fix the quads to the view, set their reference frame to viz.RF_VIEW:

Code:
import viz
viz.go()

viz.addChild('dojo.osgb')

positions = [0.3,0,1],[0,0,1.5],[-0.4,0,2]
lake = viz.addTexture('image2.jpg')

for position in positions:
	quad = viz.addTexQuad(pos=position,scale=[0.3]*3)
	quad.texture(lake)
	quad.setReferenceFrame(viz.RF_VIEW)
	quad.disable(viz.DEPTH_TEST)

Last edited by Jeff; 03-11-2016 at 12:42 AM.
Reply With Quote
  #5  
Old 03-11-2016, 04:05 AM
rajnishv rajnishv is offline
Member
 
Join Date: Jan 2016
Location: Kalina,Sanatcruz(East),Mumbai,Maharashtra,India
Posts: 94
Thumbs up Reagdring 3D Menu and Menu should look like a 3D View Perpective to any user.

Jeff,
Thanx a lot,for ur kind help,and because of you i am improving day by day..
Thanx for ur help..

Thanx & Regards:

Mr.Rajnish Vishwakarma
(Mobile Apps,Augmented Reality&Virtual Reality)
Customer of World Viz:-Xenium Digital Pvt. Ltd,Mumbai
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
3d models in vizard 5 pralka Vizard 3 06-22-2015 03:52 PM
Light Baking in 3DS Max causing models to render with seams and transparent faces dproeder Vizard 1 09-17-2013 06:45 PM
Higher Quality Models apanza Vizard 1 01-23-2012 11:21 AM
visibility of a menu clowenth Vizard 1 08-05-2010 06:36 PM
Loading OSG models and orientation Joran Vizard 4 06-18-2009 05:43 AM


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


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