SWBFGamers

Modding for the Original SWBF1 and SWBF2 => 3D-Modeling, Animation and Texturing => Topic started by: {AR}MetalKiller on June 04, 2023, 11:08:27 PM

Title: ZE Model alignment with rotation
Post by: {AR}MetalKiller on June 04, 2023, 11:08:27 PM
Hi,

I am trying to create a wall that surrounds a town with several kinks and edges with angles between 15 and 45 degrees (something like Picture 1).
Preferably with the grid alignment in ZE enabled.
For arguments sake, let's say a wall segment is a cube with dimensions of (1, 1, 1).
Aligning wall objects without rotation is straight forward, as they are aligned along the x or z axes (Picture 2).
However, rotating the object breaks the alignment as the model coordinates are not a multiple of 1 anymore but rather something like (0.85, 1, 0.35).
As shown in Picture 3 there will always be a gap or the objects have to overlap, which causes Z-fighting (flickering) issues.

Side note: I created connector objects that solve the transition from no-rotated objects to rotated objects.

I know that most SWBF maps get around this problem by having just 90 degree edges or using a model that has the kinks already in them.
I really would like to keep the assets generic and reusable and not create one big model.
Any ideas how to get around this problem?
Or do I have to manually align the objects with the grid alignment disabled?

Picture 1:
wall.png

Picture 2:
norotation.png

Picture 3:
rotation.png

Note: I am using blender and SK exporter to create the models.

Thanks for any help  ;)
Title: Re: ZE Model alignment with rotation
Post by: Sereja on June 09, 2023, 07:39:36 AM
Rotating something in ZE only makes sense if precision is not important. If you need a specific rotation angle and precise coordinates - i guess you need to edit World.odf text file (if i rememember it's name correct).
Title: Re: ZE Model alignment with rotation
Post by: Led on June 11, 2023, 09:10:24 AM
Good to see you Seraja...hope you have been well.
Title: Re: ZE Model alignment with rotation
Post by: {AR}MetalKiller on June 13, 2023, 07:17:34 AM
Quote from: Sereja on June 09, 2023, 07:39:36 AMRotating something in ZE only makes sense if precision is not important. If you need a specific rotation angle and precise coordinates - i guess you need to edit World.odf text file (if i rememember it's name correct).

Thanks for the hint! But what's the name of the property that has to be applied here? I could not find any mentions of "rotation", "degrees", or similar keywords in other odf files or in the documentation.

Last resort would be to copy the msh file and change the orientation there. But this would increase the size of the shipped map.

Take care  ;)
Title: Re: ZE Model alignment with rotation
Post by: Sereja on June 16, 2023, 07:08:51 AM
Quote from: Led on June 11, 2023, 09:10:24 AMGood to see you Seraja...hope you have been well.
I am fine, thanks! :tu:

Well, I actually dont have SWBF installed right now, so may missing something. Also SWBF1 and SWBF2 may using different named files for same purpose. If you modding SWBF2, your file with objects coordinates may have some different name, and could be in a different directories, but it surely stored in some project folders.
msh. files doesnt realy increase much map size, but textures does.
Here the trick I used long time ago: first freeze each wall in your 3D software (I guess this function has most of them), then import your walls and save them in ZE. In your project find odf file with coordinates, open it, find coordinate at least one of the wall, copy it, and paste to all other walls. Close and save. Each wall should be in place like in your 3D software scene.
Title: Re: ZE Model alignment with rotation
Post by: wsa30h on June 17, 2023, 07:02:03 AM
hey sereja glad you are ok. have you seen this yet ? https://www.youtube.com/watch?v=H4DJJeLTyiQ
Title: Re: ZE Model alignment with rotation
Post by: {AR}MetalKiller on June 17, 2023, 08:10:35 AM
Quote from: Sereja on June 16, 2023, 07:08:51 AMI am fine, thanks! :tu:

Well, I actually dont have SWBF installed right now, so may missing something. Also SWBF1 and SWBF2 may using different named files for same purpose. If you modding SWBF2, your file with objects coordinates may have some different name, and could be in a different directories, but it surely stored in some project folders.
msh. files doesnt realy increase much map size, but textures does.
Here the trick I used long time ago: first freeze each wall in your 3D software (I guess this function has most of them), then import your walls and save them in ZE. In your project find odf file with coordinates, open it, find coordinate at least one of the wall, copy it, and paste to all other walls. Close and save. Each wall should be in place like in your 3D software scene.

Now I got it. You mean the *.wld file where the coordinates for each individual object is stored. Thanks again for clarifying.

Note: Copying odf files won't increase the map size, but copying meshes certainly does.
EhPortal 1.34 © 2024, WebDev