الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

الربط بين C و ال .3ds

مغلق
بدأه mgbaw في 22 أغسطس 2004 · 4 رد · 1,365 مشاهدة · في قسم برمجة الألعاب و الرسوميات العام
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

هل يمكنكم مساعدتي حول كيفية الربط بين ال .3ds و ال C++

بأمثلة أو شرح....

و جزاكم الله خيرا..

تم تعديل هذه المشاركة بواسطة mgbaw في 22 أغسطس 2004 في 11:11

#2

أخوي mgbaw أنا اللحين أدرس دايركت إكس (يعني لسة جديد)، بس أنا أعرف لازم بعد ما تخلص من رسم المجسم في الـ 3D Studio إنك تحول الملف إلى نوع X File يعني يكون اسم الملف مثلاً ball.x، وذلك لأنه يحولها إلى مثلثات على ما أعتقد، فإذا كنت تريد تعرف هذه المعلومات لازم تبدأ بدراسة رسم الجرافيك باستخدام DirectX.

أقصد أن العملية لا تتم بكبسة زر.

وإليك هذا المثال من دايركت إكس 7. ستجد ملف اسمه XFile وهو يقوم بتشغيل ملفات ثري دي ستديو المحولة إلى إكس. ويحتوي الملف على أحد المجسمات بالإضافة إلى الشيفرة المصدرية.

example.zip

#3

السلام عليكم ,,

اذا لم ترغب في تحميل النماذج وتحويلها في طور تشغيل البرنامج لملفات ال .X يمكن أن تستخدم الاداءة الجاهزة مع ال DirectX SDK وهي ال conv3ds بكتابتها في الكونسول مع الخصائص كالتالي :

If the .3ds file contains key frame data, you can use the -A option to produce an .x file that contains an animation set. The following command would do this.

conv3ds -A File.3ds

The File.3ds parameter is the name of the file to be converted. 

Use the -m option to make an .x file that contains a single mesh made from all the objects in the .3ds file. 

conv3ds -m File.3ds

Use the -T option to wrap all the objects and frame hierarchies in a single top-level frame. Using this option, all the frames and objects in the .3ds file can be loaded with a single call. The first top-level frame hierarchy in the .x file will be loaded. The frame containing all the other frames and meshes is called x3ds_filename, without the .3ds extension. The -T option will have no effect if it is used with the -m option. 

The -s option enables you to specify a scale factor for all the objects converted in the .3ds file. For example, the following command makes all objects ten times bigger.

conv3ds -s10 File.3ds

The following command makes all objects ten times smaller: 

conv3ds -s0.1 File.3ds

The -r option reverses the winding order of the faces when the .3ds file is converted. If, after converting the .3ds file and viewing it in Microsoft® Direct3D®, the object appears inside-out, try converting it with the -r option. All Lightwave models exported as .3ds files need this option. For details, see Producing 3DS Files from Lightwave Objects.

The -v option turns on verbose output mode. Specify an integer with it. The following table shows the currently supported integers. 

Option Meaning 
-v0 Default. Verbose mode off.  
-v1 Prints warnings about bad objects, and prints general information about what the converter is doing.  
-v2 Prints basic key frame information, the objects being included in the conversion process, and information about the objects being saved.  
-v3 Very verbose. Most useful for debugging information.  

The -e option enables you to change the extension for texture map files, as shown in the following example.

conv3ds -e"ppm" File.3ds

If File.3ds contains objects that reference the texture map file Brick.gif, the .x file will reference the texture map file Brick.ppm. The converter does not convert the texture map file. The texture map files must be in the D3DPATH when the resulting .x file is loaded. The D3DPath is an environment variable that sets the default search path. 

The -x option forces the Conv3ds.exe utility to produce a text .x file, instead of a binary .x file. Text files are larger but can be easily edited by hand. 

The -X option forces the Conv3ds.exe utility to include the .x file templates in the file. By default, the templates are not included. 

The -t option specifies that the .x file produced will not contain texture information. 

The -N option specifies that the .x file produced will not contain normal vector information. All the load calls will generate normal vectors for objects with no normal vectors in the .x file. 

The -c option specifies that the .x file produced should not contain texture coordinates. By default, if you use the -m option, the mesh that is output will contain (0,0) uv texture coordinates if the .3ds object had no texture coordinates. 

The -f option specifies that the .x file produced should not contain a frame transformation matrix. 

The -z and -Z options enable you to adjust the alpha face color value of all the materials referenced by objects in the .x file. For example, the following command causes Conv3ds.exe to add 0.1 to all alpha values under 0.2.

conv3ds -z0.1 -Z0.2 File.3ds

The following command causes Conv3ds.exe to subtract 0.2 from the alpha values for all alphas.

conv3ds-z"-0.2" -z1 File.3ds

The -o option enables you to specify the file name for the .x file produced. 

The -h option tells the converter not to try to resolve any hierarchy information in the .3ds file, usually produced by the key framer. Instead, all the objects are output in top-level frames if the -m option is not used.

سنقابل مرات كثيرة سنحمل فيها نماذج من 3ds الى x Files خلال تعاملنا مع ال Direct3D في الفترة القادمة باذن الله ,,

banner_60_468.gif

NOTHING IS IMPOSSIBLE

#4

الله يجزيكم الخير ...القط الأسود, HGB

أنا أريد عمل مشروع و ما عندي خبرة فيه,

أريد عمل مجسم يحتوي مباني و شوارع على ال 3D Max

و عمل شخصية متحركة .. - إنسان مثلا - و أستطيع تحريكه

بين المباني بإستخدام أي لغة برمجة سهلة - open gl مثلا

تم تعديل هذه المشاركة بواسطة mgbaw في 18 سبتمبر 2004 في 14:51

#5

طيب تابع معنا وسندخل من اليوم في تحميل النماذج ل Direct3D ,,

في موضوع مستقل هنا في قسم الجرافيكس ,,

banner_60_468.gif

NOTHING IS IMPOSSIBLE

هذا الموضوع مغلق.

مواضيع مشابهة