PDA

View Full Version : Spheric skydome for panorama


disbeat
04-26-2013, 10:31 AM
Hi,

I am wondering if anyone as tried to use a spheric environmental map instead of the cubic one refered in the help.

Thanks,
Marco Simões

farshizzo
05-06-2013, 09:57 AM
Vizard comes with a few models that use a panoramic 2d image to create a sky dome, instead of a cube map. Have a look at the sky_day.osgb and sky_night.osgb models in the resources folder. Both those models were created with 3ds Max.

disbeat
05-07-2013, 03:02 AM
Hi farshizzo,

Thank you a lot for your reply!

I looked into those models, but still I'm having troubles achieving my goal.

I cannot import osgb files into 3ds max (I think...) so I tried to do some attempts to texture over those model directly in vizard.

I could not get the result I was hoping for...

I'm attaching one example of panorama I'm trying to use. Could you give me some feedback on how to proceed?

Thank you a lot!

-- Marco Simões

farshizzo
05-09-2013, 09:10 AM
You will need to create your own model with the proper UV coordinates.

The sample image you provided looks like it can be applied to a standard cylinder. Try the following code:import viz
import vizshape

viz.go()
viz.fov(60)

panorama = viz.add('panorama.jpg')
cyl = vizshape.addCylinder(radius=100,height=200,slices= 100,flipFaces=True,top=False,bottom=False)
cyl.texture(panorama)
viz.link(viz.MainView,cyl,mask=viz.LINK_POS)