View previous topic :: View next topic |
Author |
Message |
Duelist
Member


Joined: 06 Nov 2016 Posts: 129 Location: Poland 264 Bank Notes
Items
|
|
@Abradox, Firefox3860
Creating shader water is ridiculously simple. I will explain how to do it in 3D max (I don't know if zmodeler can do anything from these things).
Water
1. Open/import countryside.
2. Choose water meshes you would like to convert to shader water and hide all the rest.
3. Apply tessellation with 0 tension and 3 iterations, collapse modifier.
4. Scale each mesh by 0,5 in all axes.
5. Reset Xform, collapse modifier.
6. Scale each mesh by 20 000 in all axes.
7. Export to some file.
Water is nearly done. Now either copy meshes from exported file to the waterC.4ds and adjust their material ID (hex) if you want them all in one file. Or copy just that one material from waterC.4ds to your exported file. Adjust visualFlags (hex) so they are the same as in waterC. Either way, water now works.
Reflections
Countryside has some reflections already so you can use them.
1. Hide all other objects you don't need.
2. Scale each mesh by 0,125 in all axes.
3. Reset Xform, collapse modifier.
4. Scale each mesh by 80 000 in all axes.
5. Export to some file.
Adjust visualFlags (hex) so they are the same as in reflection.4ds. Reflections are ready.
As for the gap. I didn't try anything yet. It would be best if original author made it so it's not hardcoded somehow . I will probably level main riverbed and banks to the city level. But ponds and water behind dam would still need some solution.
@brokenneedlecaa76
I don't know how to help you as I was trying to achieve something entirely different. I wanted to start a race from a dialogue with an NPC (for example) not from main menu, but it crashes the game  |
|
Back to top |
|
 |
spartaque12
Junior Member


Joined: 10 Apr 2017 Posts: 41
81 Bank Notes
Items
|
|
Duelist
thank u 4 all of your guides and enthusiasm towards mafia <3 |
|
Back to top |
|
 |
Firefox3860
Junior Member


Joined: 23 Aug 2014 Posts: 31 Location: The Russian Federation, Samara 65 Bank Notes
Items
|
|
Thanks, Duelist. I'll try your method. But I do not understand what is visualFlags.
Another question about locations. How do you transfer collision data (unite files tree.klz)? |
|
Back to top |
|
 |
Duelist
Member


Joined: 06 Nov 2016 Posts: 129 Location: Poland 264 Bank Notes
Items
|
|
Hmm, I assumed you are using hdmaster's 010 editor templates These are object render flags like - to recive shadows or not, or be visible in game at all. You don't have to adjust that. It's just that water will recieve cars shadows if not adjusted for example.
I'm creating them in 3D max but I won't write tutorial right now. I'm not using face collisions for buildings so I have nearly eliminated texture flicker. And cache objects are not done yet.
 |
|
Back to top |
|
 |
Firefox3860
Junior Member


Joined: 23 Aug 2014 Posts: 31 Location: The Russian Federation, Samara 65 Bank Notes
Items
|
|
Ok. But I think that using so many cubes is not good, it's better to do face collisions wherever they are in the original. |
|
Back to top |
|
 |
Duelist
Member


Joined: 06 Nov 2016 Posts: 129 Location: Poland 264 Bank Notes
Items
|
|
Back to top |
|
 |
ASM.
Mafiascene Veteran Modder


Joined: 10 Jan 2014 Posts: 232
491 Bank Notes
Items
|
|
Firefox3860 wrote: | Ok. But I think that using so many cubes is not good, it's better to do face collisions wherever they are in the original. |
The problem with face cols is that they cause z-fighting for certain meshes that are a bit away from the world origin for some reason. |
|
Back to top |
|
 |
Duelist
Member


Joined: 06 Nov 2016 Posts: 129 Location: Poland 264 Bank Notes
Items
|
|
This got me thinking. ASM. did you try to find a limit for maximum number of collisions for a mission? I've conducted some experiments and it seems that limit for amount of XTOBBs is somewhere between 91 117 and 91 216. I thought it would be the same for AABBs but I'm at 123 024 and game still loads fine. I didn't check the remaining types yet. MWE gave up at some point and stopped drawing some collisions, later it stopped displaying some meshes  |
|
Back to top |
|
 |
ASM.
Mafiascene Veteran Modder


Joined: 10 Jan 2014 Posts: 232
491 Bank Notes
Items
|
|
Duelist wrote: |
This got me thinking. ASM. did you try to find a limit for maximum number of collisions for a mission?
|
Hm no. The maximum number of primitives is 2^31 per type (maybe twice as much as I'm not sure whether the integers in the col data header are interpreted as unsigned or not) but you can only reference the first 2^24 primitives per type in the grid. These are the hard limits dictated by the KLZ v5 format but it's of course well possible that the game imposes additional limits (like in case of the 4ds format).
Duelist wrote: | I've conducted some experiments and it seems that limit for amount of XTOBBs is somewhere between 91 117 and 91 216.
|
How do you know? Does the game crash if you go beyond that?
Duelist wrote: | MWE gave up at some point and stopped drawing some collisions, later it stopped displaying some meshes  |
Oh. Does it help if you reload the mission? |
|
Back to top |
|
 |
Duelist
Member


Joined: 06 Nov 2016 Posts: 129 Location: Poland 264 Bank Notes
Items
|
|
Reloading mission doesn't help. It depends on camera position and the direction its pointing to. No big deal I doubt that anyone would get even close to that point
ASM. wrote: | How do you know? Does the game crash if you go beyond that? |
Yes, I'm at 91 116 when I add another 100 it crashes during mission loading. And it's not connected to the amount of AABBs, I will see tomorrow how far I can go with them.
Meanwhile, here are the files for tutorial mission (both AABBs & XTOBBs) and 10 000 dummy collisions if you would like to see it for yourself:
tree.klz
collisions
EDIT:
Aaa, 2^24 is 16 777 216 while hex selection size for 91 116 XTOBBs is 16 765 344 I think I know how many AABBs game could handle  |
|
Back to top |
|
 |
Firefox3860
Junior Member


Joined: 23 Aug 2014 Posts: 31 Location: The Russian Federation, Samara 65 Bank Notes
Items
|
|
ASM. wrote: | The problem with face cols is that they cause z-fighting for certain meshes that are a bit away from the world origin for some reason. | Yes, I know about this problem. But dgVooDoo, which was offered by Abradox, can fix it. It removes the flickering of surfaces with face cols. |
|
Back to top |
|
 |
Duelist
Member


Joined: 06 Nov 2016 Posts: 129 Location: Poland 264 Bank Notes
Items
|
|
Back to top |
|
 |
spartaque12
Junior Member


Joined: 10 Apr 2017 Posts: 41
81 Bank Notes
Items
|
|
amazing , but tractor ? where did u find him xD |
|
Back to top |
|
 |
AMadeMan
Senior Member


Joined: 23 May 2017 Posts: 347 Location: United States 461 Bank Notes
Items
|
|
spartaque12 wrote: | amazing , but tractor ? where did u find him xD |
The tractor was a scrapped vehicle that can be accessed through cheats and it works. |
|
Back to top |
|
 |
AsaSK
Mafiascene Veteran Modder


Joined: 24 Feb 2013 Posts: 763 Location: London, England 13745 Bank Notes
Items
|
|
AMadeMan wrote: | spartaque12 wrote: | amazing , but tractor ? where did u find him xD |
The tractor was a scrapped vehicle that can be accessed through cheats and it works. |
xD _________________
The official Mafioso Mod thread |
|
Back to top |
|
 |
|
|