November 26 2024 06:27:18
Navigation
· Home
· Articles
· Downloads
· FAQ
· Discussion Forum
· Web Links
· News Categories
· Contact Me
· Photo Gallery
· Search
· Gameservers
Languages
Users Online
· Guests Online: 43

· Members Online: 0

· Total Members: 1,134
· Newest Member: Brody
Teamspeak 3
Last Seen Users
· hackepter07:57:30
· GONZO14:03:55
· Intruder14:30:38
· Sully 1 day
· desintegrator 2 days
· WEZ 2 days
· Homi 3 days
· The ACE 4 days
· xhc 1 week
· dRgiGGLeZ 1 week
· El Dookie 1 week
· Melber 2 weeks
· SGT PEPPER 2 weeks
· martyr 2 weeks
· Terminator 2 weeks

View Thread: Blender plugins for Vietcong files
Vietcong.Info » Vietcong General Discussion » Maps & Mapping
Who is here? 1 Guest
Current Rating: (Total: 6 ratings)  
 Print Thread
Blender plugins for Vietcong files
sonic
Good morning, Vietnam!

This projects aims to support 3D files used by Vietcong in Blender. Information about the BES format are shared with vc-spec project (specifically the doc/bes.md document). There is still minimal around 10% of data in every BES files which are still unknown for me.

Current status
-Importing BES files (version 0100):
- vertices/faces
- model hierarchy
- materials/textures
- UV mapping

Planned features
-Importing BES files:
- Handle special materials like PteroMat/Bitmap and their textures
- importing other (currently unknown) information from BES
-Exporting BES files

Possible improvements in distant future
-Other BES verions
-Model animations
-Scenes
-Skelet animations

This plugin has been tested on objects made by Gonzo (which are available at Gonzo's Laboratory) and BES files extracted from official CBF archives bundled with Vietcong 1.60 installation.
It is planned to extend these test data to all user made maps.

The source code and plugin itself can be found on Github

Latest version: 0.3.0

Screenshot:
i.imgur.com/4ctaFyB.jpg

Older versions:
Spoiler:

0.2.0
Added
- importing materials/textures
- importing UV mapping
- importing object rotation and scale
- option to ignore texture extensions in import setup
- option to add texture locations

Changed
- opening unsupported BES versions is forbidden
- plugin up to date with BES doc

Fixed
- better error handling

Screenshot:
i.imgur.com/lmbKSMM.jpg

0.1.0
Added
- importing vertices/faces of objects from BES files
- preserve model hierarchy from BES files

Screenshot:
i.imgur.com/Je6wk4V.jpg


I have no plans about creating plugins for new versions of 3DS Max, just Blender.

See you VC
Edited by sonic on 02-12-2018 16:21
SignatureAnyone who run, is a VC. Anyone who stand still, is a well disciplined VC.
-Door Gunner
  x 4  x 3  x 1
 
https://github.com/sonicpp
420Ninjutsu
i dont know what blender do.. but i feel that sonic is truly an artist.
  x 1  x 2
 
sonic
420Ninjutsu wrote:
i dont know what blender do.. but i feel that sonic is truly an artist.


I am not artist, really, I just imported some Gonzo's models.

Blender is just 3D modelling tool - you can create houses, trees etc there.
SignatureAnyone who run, is a VC. Anyone who stand still, is a well disciplined VC.
-Door Gunner
  x 1  x 1
 
https://github.com/sonicpp
Confused Master
Those are some really amazing news!
Looks like I soon won't have to run a virtual machine with 3dsmax 8 any longer.
Keep it up mate Smile
  x 1  x 2
 
http://www.teamplay-community.de
vasquehaal
Do you plan to provide this addon to all blender users in this forum ?
 
Silent Bob
Well, ist public on github as he posted!
Edited by Silent Bob on 12-03-2018 11:06
 
www.vietcong.info
sonic
Yes, this plugin can be downloaded from github (since its in Python, it is also a source code).

But please dont expect too much functionality, right now it is not much useful as it even doesnt support exporting. I extended my tests to BES files from vietcong CBF archives and noticed that some models are not imported correctly. After I fix it, I will tyr to add support for textures and then maybe export.
SignatureAnyone who run, is a VC. Anyone who stand still, is a well disciplined VC.
-Door Gunner
 
https://github.com/sonicpp
vasquehaal
Thanks... I 'm a blender user and not accustomed to 3DSmax ... Would be nice to export models directly from blender ...
 
sonic
Hello,

I am working on Blender plugin again and I think I will release new update soon. But thats not why I am here today. Today I came to ask some questions about 3DS Max and importing/exporting BES files.

First of all, there is no technical problem in importing BES version 1.00 (those created by 3DS Max plugin) meshes into Blender at the moment. The problem is the way I am doing it. On the picture below are two G_Villa models. One was imported from .max file into 3DS max, then converted into .3ds and this 3ds was imported into Blender. The second was imported directly from .bes by my plugin. As you can see (on panel at right side), the .max file has only one mesh (and this mesh has several materials), while .bes file (imported by bes plugin) has several meshes (each associated one material). Let me explain why my plugin works like this. it is because .bes files doesnt contain one big mesh, instead of this its made of several meshes where each mesh has one material (so exactly same way as I imported it into bes). .bes file simply can not have associated more than one material to one mesh. So I suggest 3DS max .bes export plugin solved this by cutting one object into multiple. And 3DS max .bes import plugin is doing just the opposite. Is it the way you like it to be imported, to got one big mesh? I think the way 3DS max is importing bes files is better than my Blender plugin is doing right now and I should fix it.... I didnt notice the difference until today when I tried to import bes file into blender through exporting it into .3ds file first.
i.imgur.com/fLGn1r8.jpg,

The other issue is that while importing .max file into 3DS max imports also information about materials (see second picture), importing .bes file doesnt (third picture - the materials are empty). Am I doing something wrong, or 3DS max .bes plugin really can not import material settings? I think this can be easily done in my blender plugin.
i.imgur.com/drBqbYl.jpg

i.imgur.com/Epz0QTm.jpg

But wait, there are more questions! As I mentioned before, one mesh (or triangle) can has up to 1 material in .bes file. What will happen if you associate more materials to one mesh? Is it possible in 3DS max? It is possible in Blender and I am thinking what to do:
1) ignore all materials except the first one
2) duplicate meshes which have more than one material, so each mesh has exactly one

There are other issues, like that in bes files collisions are associated with material, while in Blender it is special physics properties, or .bes known only several type of textures, while Blender has one special texture, but each material can have unlimited amount of them. I will resolve this later....somehow...maybe

By the way, I found nice tutorial about Blender (for amateurs like me) where I am trying to learn to handle Blender (I have no plans to learn 3DS max, I rely on your help with 3DS max things Smile )

See you in game VC

YouTube Video
SignatureAnyone who run, is a VC. Anyone who stand still, is a well disciplined VC.
-Door Gunner
  x 1  x 1
 
https://github.com/sonicpp
sonic
I was wrong, only one material can be associated to mesh in Blender, so this is solved.

By the way, Blender support Python scripting very well, so if there is anything you think could be automatized and is annoying to do in 3DS Max by hand, tell me, I can try to write some additional scripts for Blender ...
SignatureAnyone who run, is a VC. Anyone who stand still, is a well disciplined VC.
-Door Gunner
  x 1  x 1
 
https://github.com/sonicpp
sonic
Hello everyone,

(first post has been updated)
I have been working on the plugin (after few months break) and I am back with new release - you can download it from Github (note that I moved repository into another project, so url has changed). Most visible update is that plugin now load materials and textures, including the UV mapping. However, work on materials and textures is not finished, I do not distinguish between types of textures (lightmaps, environment maps etc), all imported textures has the same type in Blender at the moment. The same applies to materials - there is no difference between PteroMat and Bitmaps in imported materials. Also texture transparency is somehow broken, as you can see from the screenshot in the first post. This is also thing I want to change in next update - add support for various Ptero materials/textures into Blender (I am not sure how to do that yet) . After that update, I will finally focus on exporting objects back into BES file (there may be one more update in between, I am not sure yet).

For now, I focused only on version 0100 of BES files - that is the version which is exported from 3DS max by original BES plugin (you can not import other versions at the moment). Any feedback is welcome.

Additional info:
-BES contains names of used textures, but not their location. Import script search for those textures in directory where is imported BES file located, but user can add more directories where import plugin will look for BES textures.
-Sometimes texture extension in file system differs with extension from BES file. For that case, user can choose whether import plugin will ignore texture extensions or not. In that case, plugin will search for textures with any supported extension in following order: DDS, TGA, BMP (like PteroEngine does).

You can see these settings on following picture
i.imgur.com/YEgDIVV.jpg
Edited by sonic on 05-08-2018 13:54
SignatureAnyone who run, is a VC. Anyone who stand still, is a well disciplined VC.
-Door Gunner
  x 1  x 2  x 1  x 1
 
https://github.com/sonicpp
martyr
sonic wrote:...
Also texture transparency is somehow broken, as you can see from the screenshot in the first post. This is also thing I want to change in next update - add support for various Ptero materials/textures into Blender (I am not sure how to do that yet) . After that update, I will finally focus on exporting objects back into BES file (there may be one more update in between, I am not sure yet)...


Firstly I just want to say that creating this BES plugin for Blender is a truly AWESOME thing to do. I could not applaud you more Sonic. It's amazing that you are able to spend time doing this for the community. Thank you!

I understand that your development plan is in place for a reason and the order you've chosen to develop things in makes sense. However, I would personally not mind if transparency was given a low priority - particularly if it holds up your progress. There are so many things we can create with textures without using any transparency and it seems a bit of luxury. Without it, we could still have a method to make BES files for new maps without having to use old versions of MAX and that would be incredible!


sonic wrote:...
For now, I focused only on version 0100 of BES files - that is the version which is exported from 3DS max by original BES plugin (you can not import other versions at the moment). Any feedback is welcome.
...


I understand that being able to reference how the MAX plugins worked is useful in the development of your Blender plugin. But I am curious why the focus on the original MAX plugin export format? I assumed that in this development, you would focus on the original BES files from CBF packages and the editor database? Or am I truly ignorant and making a fool of my understanding lol ?
Edited by martyr on 29-10-2018 09:15
Signature________________________________________________________________________

"From every kill grow, from every death learn"
  x 1  x 1
 
http://www.clanofminh.vcclan.net/minh/
sonic
Thank you very much for your feedbeck.

martyr wrote:
I understand that your development plan is in place for a reason and the order you've chosen to develop things in makes sense. However, I would personally not mind if transparency was given a low priority - particularly if it holds up your progress. There are so many things we can create with textures without using any transparency and it seems a bit of luxury. Without it, we could still have a method to make BES files for new maps without having to use old versions of MAX and that would be incredible!


You are right. I am working on some kind of visual update at the moment, it is nearly done so I will finish it. I just wanted to make Blender to show your model same way as the Ptero Engine II does (as I understand, 3DS MAX shows you only one texture at the time as I heard..., my plugin will show you all texture layers). Next time I will focus on bringing export feature as soon as possible, even if that means it will not be feature complete in first release. The biggest challenges are materials, so I will focus only on one material now (PteroMat or Standard MAX material) and will implement the second later (exporting models without any material support would be useless).

martyr wrote:
I understand that being able to reference how the MAX plugins worked is useful in the development of your Blender plugin. But I am curious why the focus on the original MAX plugin export format? I assumed that in this development, you would focus on the original BES files from CBF packages and the editor database? Or am I truly ignorant and making a fool of my understanding lol ?


I understand your question. Unfortunately this is not only about creating plugin for Blender, but also about reverse-engineering BES file format (since there is no available BES specification).

About the reverse-engineering, I am recreating the BES specification here. At the beginning the BES file was completely unknown to me. I had no point where start. And here 3DS Max plugin has proven to be very useful. I started creating simple box (without textures etc), I was modifying the size etc, until I realized how vertices and faces are stored in BES. After that I started experiments with rotation and other transformations. And after that textures and UV mapping. With these small steps I was able to make specification of about 90 % of the BES format (version 100) and I believe that I will make full specification soon. After that I will focus on other BES versions. I found out that some other versions are very, very similar to version 100, while others are very different (like version which contains skeleton animations). I will not be able to reverse-engineered these versions same way as I did with 0100, but with full specification of 0100 version I will be able to easily reverse-engineere other versions (much, much easier than it would be if I started with these versions at the beginning). BES file is made of 13 kinds of TLV data structures. You can see my progress here - there are 2 structures fully documented, 9 almost done and 2 still almost unknown.

About the BES Blender plugin. It is much more complicated than I thought at the beginning. I will have to create plugin for custom materials (PteroMat/Standard material) for example because Blender handles materials slightly different than 3DS Max. And there are several other problems. But yeah, I will try to bring export feature as soon as possible..
SignatureAnyone who run, is a VC. Anyone who stand still, is a well disciplined VC.
-Door Gunner
  x 1  x 3
 
https://github.com/sonicpp
sonic
Hello,

I am making some progress on reverse-engineering BES file format and now I am facing another issue. As you know, BES files contains one or more 3D objects, where each object is made of several meshes. This mesh contains information about vertices, faces and transformation. I documented the transformation part here. As you can see, the transformation structure has translation, rotation and scale data and transformation matrix. The point is that transformation matrix can be calculated from other data (translation, rotation an scale), thus it is redundant to store is in the BES file. But problem is that sometimes recalculating transformation matrix from those data gives slightly different matrix than the one stored in BES file.

My question is: have you ever had problems with transformation in 3DS (translation/rotation/scale) like for example model in 3DS Max had different rotation (or scale) than in game/game editor? Or other mysterious behavior of transformations?

I have this issue with following files, but there are much, much more of them:
https://github.co.../issues/15
SignatureAnyone who run, is a VC. Anyone who stand still, is a well disciplined VC.
-Door Gunner
  x 2  x 1
 
https://github.com/sonicpp
sonic
Nobody knows? Ok, I have another question.

I am experimenting with Standard material in 3DS. Max shows me 12 textures which I can associate with Standard material and I can create all of them (which is by the way wrong behavior, since PteroEngine can not handle more than 8 textures per material), but for some reason the Opacity texture is never exported to BES file (I do not know what this texture does, I just know that BES plugin is not exporting it into BES).. Any experiences/ideas?
SignatureAnyone who run, is a VC. Anyone who stand still, is a well disciplined VC.
-Door Gunner
  x 1
 
https://github.com/sonicpp
Intruder
sonic wrote:

Nobody knows?
...
Any experiences/ideas?

Unfortunately, this subject is way too complicate for me to propose any help.
The only idea I'm thinking about, is... Have you already tried to ask for help in forums specialised in 3D modeling and games? Or in Blender's forums? I guess you already have...
Even though they know nothing about Vietcong, maybe they could propose you different ideas and clear some of your interrogations?


Good luck!



Intruder
Signaturewww.vietcong.info/portal/images/ranks/Member_of_the_Month1011.pngwww.vietcong.info/portal/images/ranks/Member_of_the_Month_6.png
 
sonic
Thanks, these questions are more about bes plugin for max than max itself or blender. So I think no one can help me except vietcong community. It is not big issue, but I think that is bug in BES plugin for (no exporting of opacity texture). I also noticed that similar problem is for PteroMat, where Environment map #2 is exported as Environment #1... do you know what is difference between these two textures (env 1 vs env 2)?
SignatureAnyone who run, is a VC. Anyone who stand still, is a well disciplined VC.
-Door Gunner
 
https://github.com/sonicpp
sonic
Good evening, Vietnam!

I released new version: 0.3.0 - the visual update (see updated first post for screenshot). The current version has some improvements in 3D view: transparency, multi-layer uv mapping and more. There are also some bugfixes of course.

In next version (0.4) I am going to add some options to help with creating/editing Standard and PteroMat materials. It will be preparation for next update (0.5), which will bring some kind of export support (finally!). I would appreciate any feedback.
SignatureAnyone who run, is a VC. Anyone who stand still, is a well disciplined VC.
-Door Gunner
  x 3  x 1
 
https://github.com/sonicpp
martyr
sonic wrote:
...I released new version: 0.3.0 - the visual update (see updated first post for screenshot). The current version has some improvements in 3D view: transparency, multi-layer uv mapping and more. There are also some bugfixes of course...


First, just let me say... this is really awesome work dude. THANK YOU!
I am lucky that I am able to use 3DSmax 8 to make new objects but the time will come when I will need to move over to Blender and the work you are doing now will mean I am make more custom VC maps in the future.

However, I did do a quick import of a custom BES into Blender (2.79) on an iMac and it worked well. I see no errors. It recognises the name of the linked DDS image in the material but it does not render it.
So I guess that works as expected? I will try to import a VC database BES in the next couple of days and let you know.

One thing I noticed was that i couldn't see the info about how to install the plugin for MAC. I figured it myself and it works but maybe just add that info to the readme documents.

Thanks again
Signature________________________________________________________________________

"From every kill grow, from every death learn"
  x 1  x 1
 
http://www.clanofminh.vcclan.net/minh/
sonic
Hello martyr,
thanks for testing!

martyr wrote:
However, I did do a quick import of a custom BES into Blender (2.79) on an iMac and it worked well. I see no errors. It recognises the name of the linked DDS image in the material but it does not render it.

To see textures, you need to switch Viewport shading from Solid to Rendered or Material. You can find the option at the bottom of the screen (see here). I will make some howtos here on forum once I will finish export support.
martyr wrote:
So I guess that works as expected? I will try to import a VC database BES in the next couple of days and let you know.

Cool! Just keep in mind that this plugin supports only 1.00 version of BES files (probably all custom maps/models, most of Fist Alpha files (except animation BES files etc) and some in base Vietcong game). I will add support for some other versions after the export release.

martyr wrote:
One thing I noticed was that i couldn't see the info about how to install the plugin for MAC. I figured it myself and it works but maybe just add that info to the readme documents.

Ah, my bad. Thanks for info. I do not have MAC myself so I couldnt test it. I updated README file, can you confirm it is right, please? I will add support for installing plugin from zip file in near future.

Btw, have you tried running Vietcong in Wine for Mac? More info in this thread or HowTo/Notes at Wine AppDB
Edited by sonic on 21-12-2018 19:18
SignatureAnyone who run, is a VC. Anyone who stand still, is a well disciplined VC.
-Door Gunner
  x 2  x 1  x 1
 
https://github.com/sonicpp
Jump to Forum:
Similar Threads
Thread Forum Replies Last Post
Vietcong interactive map General Discussion 1 23-11-2024 20:08
WG: Vietcong 1 Informationsseite Allgemeines Diskussionsforum 15 23-11-2024 11:05
Vietcong remaster mod General Discussion 25 06-11-2024 12:22
Is www.vietcong-customs.com Coming back online soon! General Discussion 6 06-11-2024 11:52
DOWNLOAD FOR VIETCONG FIST ALPHA General Discussion 2 04-11-2024 13:56
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Render time: 0.62 seconds - 115 Queries 5,471,239 unique visits