POV-Ray : Newsgroups : povray.general : a simple 3ds max box not centered and resized correctly in povray : a simple 3ds max box not centered and resized correctly in povray Server Time
19 May 2024 08:37:26 EDT (-0400)
  a simple 3ds max box not centered and resized correctly in povray  
From: optima
Date: 30 May 2010 11:05:01
Message: <web.4c027d3a62f0ad8adf816feb0@news.povray.org>
Hi,

First let me tell you I am no stranger to 3dsmax or povray for 2 years I am
developing and selling a professional application built with files
imported/exported and/or used by these 2 applications and C#


I export a box (cube) in 3ds format from 3ds max (2009 64 bit)
then import it into PoseRay v3.12.2.456 then export it as box.inc file for use
in Povray.

But the box is not correctly positioned or sized in povray it's off place and
oversized. PROBLEM IS CORRECTED IF I DIVIDE BOX'S XYZ DIMENSIONS INSIDE POVRAY
CODE BY 2.54 or if I resize the box inside max to 39.37 cm instead of 100 cm.
Same thing when 100 / 2.54 = 39.37  As you know 1 inch is 2.54 centimeters.

I size the box in max to 100 cm cause in povray I scale <0.025,0.025,0.025>
then multiply with a rescale scale<50,75,60>
meaning box is 50 cm wide, 75 cm high, 60 cm deep.

Box created this way in max
-Create a box object  (aka cube) make it 100 cm in all 3 xyz dimensions
-Pivot / Affect Pivot Only / Center to object
-Move object to 0,0,0 on world position by right clicking Move toolbar icon
-exported as 3ds object

in 3ds Max System unit scale  1 unit = 1 centimeters

What setting do I need to change in max to consistenly export to the same
dimensions every time? Customize/Unit Setup/System unit scale  dont work I tried
many times. Box is a simple example I gave, some other models downloaded from
the net also results in the same erroneous condition (oversized 2.54 times) I
think Max's unit system from cm to inch is causing all this trouble but changing
units (System Unit Scale in max) and redoing everything same does not solve the
issue?

or is it PoseRay v3.12.2.456 causing the error when saving the inc file?
Sorry for such a long question, but I am really stuck for 2 days and have almost
no one else to turn to. Thank you for any input you can provide. I will deeply
appreciate all types of help. I MUST BE MISSING SOMETHING BIG.


BELOW IS THE _GEOM INC. FILE EXPORTED FROM POSERAY

//==================================================
//POV-Ray Geometry mesh list
//==================================================
//This file has been created by PoseRay v3.12.2.456
//3D model to POV-Ray/Moray Converter.
//Author: FlyerX
//Email: fly### [at] yahoocom
//Web: http://mysite.verizon.net/sfg0000/
//==================================================
//Files needed to run the POV-Ray scene:
//box_POV_main.ini (initialization file - open this to render)
//box_POV_scene.pov (scene setup of cameras, lights and geometry)
//box_POV_geom.inc (geometry mesh)
//box_POV_mat.inc (materials)
//
//==================================================
//Model Statistics:
//Number of triangular faces..... 12
//Number of vertices............. 26
//Number of normals.............. 30
//Number of UV coordinates....... 26
//Number of lines................ 0
//Number of materials............ 1
//Number of groups/meshes........ 1
//Number of subdivision faces.... 0
//UV boundaries........ from u,v=(0,0)
//                        to u,v=(1,1)
//Bounding Box....... from x,y,z=(-49.999,0.001,-50.001)
//                      to x,y,z=(50.001,100.001,49.999)
//                 size dx,dy,dz=(100,100,100)
//                  center x,y,z=(0.0009994507,50.001,-0.0009994507)
//                       diagonal 173.2051
//Surface area................... 60000
//             Smallest face area 5000
//              Largest face area 5000
//Memory allocated for geometry.. 5 KBytes
//
//==================================================


//Materials
#include "box_POV_mat.inc"

//Geometry
#declare box_unnamed_material_=mesh2{
vertex_vectors{
26,
<-49.999,0.001,49.999>,
<-49.999,0.001,-50.001>,
<50.001,0.001,-50.001>,
<50.001,0.001,49.999>,
<-49.999,100.001,49.999>,
<50.001,100.001,49.999>,
<50.001,100.001,-50.001>,
<-49.999,100.001,-50.001>,
<-49.999,0.001,49.999>,
<50.001,0.001,49.999>,
<50.001,100.001,49.999>,
<50.001,100.001,49.999>,
<-49.999,100.001,49.999>,
<-49.999,0.001,49.999>,
<50.001,0.001,-50.001>,
<50.001,100.001,49.999>,
<50.001,0.001,-50.001>,
<-49.999,0.001,-50.001>,
<-49.999,100.001,-50.001>,
<-49.999,100.001,-50.001>,
<50.001,100.001,-50.001>,
<50.001,0.001,-50.001>,
<-49.999,0.001,-50.001>,
<-49.999,100.001,49.999>,
<-49.999,100.001,49.999>,
<-49.999,0.001,-50.001>
}
normal_vectors{
30,
<0,-1,-6.122923E-17>,
<0,-1,-6.122923E-17>,
<0,-1,-6.122923E-17>,
<0,-1,-6.122923E-17>,
<0,1,0>,
<0,1,0>,
<0,1,0>,
<0,1,0>,
<0,-7.105427E-17,1>,
<0,-7.105427E-17,1>,
<0,-7.105427E-17,1>,
<0,-7.105427E-17,1>,
<0,-7.105427E-17,1>,
<0,-7.105427E-17,1>,
<1,0,0>,
<1,0,0>,
<1,0,0>,
<1,0,0>,
<0,7.105427E-17,-1>,
<0,7.105427E-17,-1>,
<0,7.105427E-17,-1>,
<0,7.105427E-17,-1>,
<0,7.105427E-17,-1>,
<0,7.105427E-17,-1>,
<-1,0,0>,
<-1,0,0>,
<-1,0,0>,
<-1,0,0>,
<-1,0,0>,
<-1,0,0>
}
uv_vectors{
26,
<1,0>,
<1,1>,
<0,1>,
<0,0>,
<0,0>,
<1,0>,
<1,1>,
<0,1>,
<0,0>,
<1,0>,
<1,1>,
<1,1>,
<0,1>,
<0,0>,
<1,0>,
<0,1>,
<0,0>,
<1,0>,
<1,1>,
<1,1>,
<0,1>,
<0,0>,
<0,0>,
<1,1>,
<1,1>,
<0,0>
}
face_indices{
12,
<0,1,2>,
<2,3,0>,
<4,5,6>,
<6,7,4>,
<8,9,10>,
<11,12,13>,
<3,14,6>,
<6,15,3>,
<16,17,18>,
<19,20,21>,
<22,0,23>,
<24,7,25>
}
uv_indices{
12,
<0,1,2>,
<2,3,0>,
<4,5,6>,
<6,7,4>,
<8,9,10>,
<11,12,13>,
<3,14,6>,
<6,15,3>,
<16,17,18>,
<19,20,21>,
<22,0,23>,
<24,7,25>
}
normal_indices{
12,
<0,1,2>,
<2,3,0>,
<4,5,6>,
<6,7,4>,
<8,9,10>,
<11,12,13>,
<14,15,16>,
<16,17,14>,
<18,19,20>,
<21,22,23>,
<24,25,26>,
<27,28,29>
}
inside_vector <0,0,1> }


//Model assembly from the meshes
#declare box_=
object{box_unnamed_material_  material{unnamed_material_} hollow}




--povray code for box/panel

//begin PANEL 1
#include "panel_POV_geom.inc"union{
#declare panel1= object {panel_ scale <0.025,0.025,0.025>}
object { panel1 scale <19.68504,29.52756,23.62205> pigment {image_map {jpeg
"A319_akcaagac.jpg"}scale 1 }
finish {phong 1 ambient 0.6 reflection 0.08}}
rotate <0,360,0> translate <-233.6575,14.76378,84.311>}
//end PANEL 1

in the second scale xyz is divided by 2


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.