March 29 2024 16:31:57
Navigation
· Home
· Articles
· Downloads
· FAQ
· Discussion Forum
· Web Links
· News Categories
· Contact Me
· Photo Gallery
· Search
· Gameservers
Languages
Users Online
· Guests Online: 2

· Members Online: 0

· Total Members: 1,127
· Newest Member: Highl@nder
Teamspeak 3
Last Seen Users
· GONZO00:09:38
· gus02:06:58
· Intruder13:11:52
· desintegrator22:54:43
· Highl@nder 1 day
· Silent Bob 2 days
· Jerry 3 days
· forrest747 4 days
· WEZ 5 days
· Sully 5 days
· doomed 1 week
· Terminator 1 week
· The ACE 1 week
· VictorMyson 3 weeks
· Don Turtuma 4 weeks

View Thread: Import subobjects to custom map?
Vietcong.Info » Vietcong General Discussion » Maps & Mapping
Who is here? 1 Guest
Current Rating: (Total: 0 ratings)  
 Print Thread
Import subobjects to custom map?
Brchi
I'm trying to use an object from the original ptero maps in my custom map.
Actually it is a subobject of SERPENTINY\BIGVALLEY.BES (one of the "machinegun shelters").

So I imported the bes into max with besImport.dli (isn't that for VC2? also, all materials/textures were missing!), selected the 3 objects needed and "Export selected" to .3ds.
Then imported the .3ds and tried to manually assign the right textures (which I found out).
But it just doesn't look the same.

Is it even possible?
Brchi attached the following images:

[175.72 kB]


[116.46 kB]

 
http://www.myCong.net
SGT PEPPER
I have imported .bes files to max, yes it comes in without the textures, normally just bring texture in to material editor, select object, assign material, and it has kept uvw mapping for me.
Edited by SGT PEPPER on 29-01-2015 00:50
  x 1
 
apfelbaum
if you don't rename the textures the engine keeps looking in the original .cbf files.
unfortunately pterodon kept multiple files sharing the same name although the textures are different.
the screenshot looks to like the detailtexture is missing or wrong.
 
apfelbaum
I attached the bunker file as

.bes
.max (3DS Max 8)

including all necessary textures. I assigned all materials and collisions, should work. If you still got problems with the textures give them unique new names and change the materials too.

Also you didn't add smoothgroups to your bunker and is it possible you forgot to rebuild you texdb?

greetings
apfelbaum attached the following file:
bunker.zip [449.3 kB, 431 Downloads]
Edited by apfelbaum on 28-01-2015 22:58
  x 1
 
Brchi
Oh thanks, it's looking good!

I tried to rebuild texdb/reload scene multiple times.
I'm an absolute novice in max (didn't even know about smoothing groups) and got a few questions now:

1) It doesn't look 1:1 to the original though (see orig vs. yourtry), why is that?
2) Mine doesn't even show the cloth-multitexture, but the Bags2/Bags3 materials are set exactly the same as in your max file. What could have gone wrong?
3) Did you export these 3 objects as .3ds first? Or what was your workflow?
4) The mavez1 Bags object was "inside out" when importing my .3ds, I had to apply a normal-modifier. Did you notice this too?
5) The object polygons have material IDs like 123, 124.. but the Multi/Sub materials are ID 1, 2... how does it still work?
6) How did you find out so quickly which collisions/textures are used by the object?

This would really help me Smile
Brchi attached the following images:

[342.09 kB]


[367.83 kB]


[205.08 kB]

 
http://www.myCong.net
apfelbaum
1. oh sorry, could be i picked the wrong detail texture.
2. don't know, let's discuss pm and i will post the solution here!?
3. i didn't export objects to .3ds. why should I?
4. yes the polygons where flipped. just flip them back within the polyedit menu.
5. the id's are that high because they modeled almost half of the map in one scene in 3ds max and therefore used loads of materials. the small bunker just had a few of them assigned. if you model it is not to important which material has which id, it is just necessary for declaration which polygon got which material assigned.
6. collisions should be correct or an equal collision, wood (not penetrable) and and sandbags. i hope you got the english translated collisionlist in 3ds max!? most of its textures are contained in the serpentiny levels folder. just three textures are on almost all maps shared wood textures in the maintexturefolder (_FOR_ALL)


if you need help in 3ds max i can teach you everything you need for 3ds max related to vietcong and more (Kann es dir ja auf deutsch erklären :-) ).

greetings
 
Brchi
1) It's the correct one. Still, it looks a bit different (no problem, I just wonder why)

3) I also tried to delete all other objects from bigvalley but then, when trying to add a Multi/Sub material, max crashed.
It helped to save the project and reopen it after removing everything else.

5)
Spoiler:
I still don't understand how you properly assigned the materials to the polygons, if not by ID (because your material IDs are 1-7, while the polygons have 123, 124, ... how does max know ID 1 belongs to 123, ID 2 to 124 and so on?)

Okay, I guess you used drag&drop assignment (just read about this). Now I see the cloth texture ingame.
There's another problem now, see the attachments. I added the smoothing groups, still it doesn't look as smooth as yours (edges) :) (material and polygon props should be the same).
Also, I noticed that my object has 871 vertices, while yours has only 674. It's the same object, what else did you do?

6) Yea, I just wonder if you know a way to see which textures are used by the bes object, or did you just look at the .dds files and guessed which ones could fit?
(Because I analyzed the .bes file to find the correct assignments..)

Thanks again, you're a big help already ;)

@SGT PEPPER
Thanks for your effort, @apfelbaums version looks closer to the original though :P
Brchi attached the following images:

[81.18 kB]


[67.28 kB]

Edited by Brchi on 29-01-2015 11:43
 
http://www.myCong.net
apfelbaum
3. max crashed for me everytime i do more than importing an object so i first have to save the scene and restart max. maybe a bug in the importer plugin!?

5. yes i used drag&drop system to assign the new materials. you can also selesct material ids in poly submenu. my object has less vertices cause i weld them. this would be a bit longer post about directx why those vertices are broken along edges and corners. but you first have to weld them in order to get nice smoothgroups and avoid z-fighting.

6. theoretically you can open the .bes file in notepad or wordpad, any editor and search for the tags ".dds" (or ".tga" often used by lightmaps). this will jump over to material names and properties and assigned texture. it's even possible to rename the textures within the .bes file via notepad, but sometimes the editor then crashes. i didn't figured out yet what causes this error.
 
Brchi
3) Ahh okay, so I'm not alone with this Smile I also think it's an importer bug.

5) Okay, but the original ptero object (non-welded) still looks smooth, mine looks rough (contrast) at the edges.
So I think there must be some other way to reproduce the original look without changing the geometry.

6) Yea, but we need to know which object has which materials assigned. I found out how to retrieve that information from a .bes and will probably write a small tool with useful mapping functions.
Yea, I also renamed things, mostly for physics properties. Be sure to use a name not longer than the original and eventually terminate it with a zero byte.
Also, most strings have their length prepended, so you'd have to change that byte too.
 
http://www.myCong.net
apfelbaum
5. sure pterodon welded the original object. at exporting the scene from 3ds max the exporter triangulates the polygons and splits all necessary vertices, that's the native procedure every exporter does to eliminate every incompatibility for directx. some engines (like the unreal engine) got some similiar settings at importing the mesh but reversed (quadify mesh). this is just for using tesselation mapping in realtime as far as i know.

why the objects is split into more vertices than you think you need it is necessary to understand rendering of polygons and vertices.

to be short: everything you do on your mesh has influence on the vertex count. for example

a) smooth groups; if you got for example 2 polygons modeled as quad (4 vertices) with 2 different smooth groups, the vertices between them will be split cause one vertice can store just one information for that. therefore you will get 6 vertices.

b) texturecoordinates: when rendering the mesh you can think of unfolding it like your uv data. your mesh gets split into the uv shells/clusters you mapped over your mesh. when your mesh is just a plane with hundreds of polygons but all share welded texture coordinates there will be no single split in the vertices. if you got for example a simple dice with 6 sides (12 polygons) there will be at least a few splits. one vertice can't be on two or more uv coordinates, means it gets split into two ore more vertices for each position in your texturecoordinates.

c) multi-/submaterials: example is same as smooth groups. all vertices where two or more materials hit the same spot they got split into two or more vertices.

these are all cases you need for vietcong. different engines offer more exclusive functions like vertex coloring where one vertex can store just one color, therefore you could double -quadruple the amount of polygones and vertices in your scene. also realtime lighting (commonly called vertex lighting) renders a second pass of you mesh with different uv coordinates and vertex count. but that's a really extensive topic.

you don't need to be too precise, this would eat up to much of your mapping time but it is good to keep those things in mind and avoid such performanceissues.

at least i want to mention that you could get visual issues when vertices are split or not welded very well cause gamerendering is an unprecise rendering of realistic rendering in programs like 3ds max and so on and produces artifacts if you don't pay attention. if you are interested you can ask more about it.
Edited by apfelbaum on 30-01-2015 04:28
  x 1  x 1
 
Brchi
Ahh, I thought welding would be a complicated process, but after selecting all vertices and welding with zero threshold, it finally looks the same as your object Smile (However I guess it's not always that easy)
I want to learn more about all that stuff, but at the moment I rather want to work on the VCHub VC
 
http://www.myCong.net
apfelbaum
you can create the pure awesomeness in battlefield 3 scale if you remind these and other things. maybe a project in the future is imaginable....
  x 1
 
Jump to Forum:
Similar Threads
Thread Forum Replies Last Post
Areas in custom map that are a black void Maps & Mapping 10 07-03-2019 17:55
Custom MP Coop map - custom death messages Maps & Mapping 11 14-10-2018 15:49
new custom addons General Discussion 11 24-01-2016 21:29
Vietcong doesn't start with more than 500+ custom maps? General Discussion 5 27-12-2015 06:06
M79 (Granade Launcher) on a custom map Maps & Mapping 3 21-08-2015 12:19
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Render time: 0.38 seconds - 84 Queries 4,883,181 unique visits