Re: Direct->Object Graphics Help! [message #30482] |
Tue, 30 April 2002 17:36  |
Muks Raju
Messages: 6 Registered: April 2002
|
Junior Member |
|
|
Helloo thanks a lot for the help. It works great.
Rick Towler wrote:
> Unless you need to do something special, you can use xobjview to do this.
> You can export to VRML under the file menu.
>
> myobj = OBJ_NEW('IDLgrPolygon',v,POLYGON=p)
> oModel = OBJ_NEW('IDLgrModel')
> xobjview, oModel, /block
> obj_destroy, [myobj, oModel]
>
> As for exporting VRML models in general, wireframe and solid vrml models
> export fine but you might run into problems with transparent polygon models.
> Also, for solid polygons, make sure that the vert_colors property is set to
> a scalar (or not set at all).
>
> And don't listen to the trolls in the group that will tell you that VRML "is
> so, like 1990's". They are all living in a 2d world. :)
>
> -Rick
>
> "Muks Raju" <mpraju@umich.edu> wrote in message
> news:3CCF0BE2.19E32D59@umich.edu...
>> Hello
>> I have been given a program which draws some 3D figures using
>> direct graphics..using Shade_Volume and then PolyShade. Now I need to
>> get the 3D model into a VRML file so i need to use object graphics.
>> Could anyone tell me if the following is right ....v is the array of
>> vertices and p the array of polygons obtained from Shade_Volume.
>>
>> myobj = OBJ_NEW('IDLgrPolygon',v,POLYGON=p)
>> oModel = OBJ_NEW('IDLgrModel')
>> oView = OBJ_NEW('IDLgrView')
>> oWin = OBJ_NEW('IDLgrWindow')
>> oModel->Add, myobj
>> oView->Add, oModel
>> oWin->draw,oView
>>
>> ovrml = OBJ_NEW('IDLgrVRML',FILENAME='solar.wrl',QUALITY=2)
>> ovrml->Draw,oview
>>
>> Thank you very much in advance for any help you can provide or any hints
>> towards a better way to do this.
>>
>> Regards
>>
>> Muks
>>
>>
|
|
|