FAQFAQ    Board RulesBoard Rules    SearchSearch    LotteryLottery    RouletteRoulette    UsergroupsUsergroups
     RegisterRegister  ProfileProfile    Log in to check your private messagesLog in to check your private messages    Shop    Log inLog in 
View posts since last visit View your posts View unanswered posts

New script engines for lighting and water

 
Post new topic   Reply to topic    Mafiascene.com Forum Index -> Mafia Mods
View previous topic :: View next topic  
Author Message
AsaSK

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 24 Feb 2013
Posts: 701
Location: London, England
13094 Bank Notes
Items

PostPosted: Sat Aug 04, 2018 3:30 am    Post subject: New script engines for lighting and water Reply with quote

Something ASM said the other week about Mafia being capable of imitating dynamic lighting struck a chord with me, so yesterday I thought I'd try and put together a script for pseudo-dynamic lighting/lightmaps. I also wrote a script for pseudo-dynamic water for Mr Robville's mod last year.
I was really pleased with how they turned out, most recently the lighting one, so I thought i'd show them here Smile

Dynamic lighting



Dynamic water


_________________

The official Mafioso Mod thread

Last edited by AsaSK on Sat Aug 04, 2018 9:36 am; edited 1 time in total
Back to top
View user's profile Send private message
huckleberrypie

Member
Member


Joined: 08 Aug 2014
Posts: 162

330 Bank Notes
Items

PostPosted: Sat Aug 04, 2018 5:15 am    Post subject: New script engines for lighting and water Reply with quote

Dynamic time of day would be golden. Sticking out tongue Except that it would require one hell of a lightmap atlas in that case unless you move to real time shadow maps.
Back to top
View user's profile Send private message
ASM.

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 10 Jan 2014
Posts: 187

405 Bank Notes
Items

PostPosted: Sat Aug 04, 2018 1:57 pm    Post subject: New script engines for lighting and water Reply with quote

Nice work! Thumbs up (left)

huckleberrypie wrote:
Dynamic time of day would be golden. Sticking out tongue Except that it would require one hell of a lightmap atlas in that case unless you move to real time shadow maps.

The approach detailed here could work and give at least semi-dynamic time-of-day. The only problem for implementing it is the available tooling, at least for mesto/freeride missions. However a proof-of-concept should be doable for, say, tutorial for example.
Back to top
View user's profile Send private message
huckleberrypie

Member
Member


Joined: 08 Aug 2014
Posts: 162

330 Bank Notes
Items

PostPosted: Sat Aug 04, 2018 2:54 pm    Post subject: Re: New script engines for lighting and water Reply with quote

ASM. wrote:
Nice work! Thumbs up (left)

huckleberrypie wrote:
Dynamic time of day would be golden. Sticking out tongue Except that it would require one hell of a lightmap atlas in that case unless you move to real time shadow maps.

The approach detailed here could work and give at least semi-dynamic time-of-day. The only problem for implementing it is the available tooling, at least for mesto/freeride missions. However a proof-of-concept should be doable for, say, tutorial for example.


Afaik LS3D also had per-vertex lighting as implemented in car headlights. Can that be assigned to certain spotlights or would that be too taxing since we're dealing with a forward renderer?
Back to top
View user's profile Send private message
AMadeMan

Senior Member
Senior Member


Joined: 23 May 2017
Posts: 255
Location: United States
374 Bank Notes
Items

PostPosted: Sat Aug 04, 2018 9:56 pm    Post subject: New script engines for lighting and water Reply with quote

Awesome effects! As for the water, if the splash is a little smaller, the pool would be perfect.

I had no idea dynamic water and lighting was possible even if it is a pseudo effect. It looks great!

A dynamic day/night system would be very interesting since you could play various missions at different times. It would kinda screw up the story though, because some missions such as Fairplay and Visiting Rich People were designed to be played during night time.
Back to top
View user's profile Send private message
AsaSK

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 24 Feb 2013
Posts: 701
Location: London, England
13094 Bank Notes
Items

PostPosted: Mon Aug 06, 2018 9:10 am    Post subject: Re: New script engines for lighting and water Reply with quote

Thanks for the responses Smile I am a little concerned about the possibility of lag. The water script should be okay in this regard because it isn't constantly looping and waits for certain checks (despite being an absolute b*tch to code/debug; subroutines inside subroutines), but the flickering light I could see possibly lagging as the checks are being looped and activated constantly.

ASM. wrote:
Nice work! Thumbs up (left)


Embarassed

AMadeMan wrote:
Awesome effects! As for the water, if the splash is a little smaller, the pool would be perfect. I had no idea dynamic water and lighting was possible even if it is a pseudo effect. It looks great!


Thanks! Mm splash size was one of my earliest thoughts, but it's a hardcoded particle effect so unfortunately changing the scaling is impossible except maybe in the hex (unfortunately I can only do limited things with a hex editor, and that is beyond my expertise..)
_________________

The official Mafioso Mod thread
Back to top
View user's profile Send private message
AMadeMan

Senior Member
Senior Member


Joined: 23 May 2017
Posts: 255
Location: United States
374 Bank Notes
Items

PostPosted: Mon Aug 06, 2018 2:21 pm    Post subject: Re: New script engines for lighting and water Reply with quote

AMadeMan wrote:
Awesome effects! As for the water, if the splash is a little smaller, the pool would be perfect. I had no idea dynamic water and lighting was possible even if it is a pseudo effect. It looks great!


AsaSK wrote:
Thanks! Mm splash size was one of my earliest thoughts, but it's a hardcoded particle effect so unfortunately changing the scaling is impossible except maybe in the hex (unfortunately I can only do limited things with a hex editor, and that is beyond my expertise..)


As long as the passengers in the turkish bath don't mind a car-sized splash! Laughing
Back to top
View user's profile Send private message
ASM.

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 10 Jan 2014
Posts: 187

405 Bank Notes
Items

PostPosted: Tue Aug 14, 2018 8:50 pm    Post subject: Re: New script engines for lighting and water Reply with quote

huckleberrypie wrote:

Afaik LS3D also had per-vertex lighting as implemented in car headlights. Can that be assigned to certain spotlights or would that be too taxing since we're dealing with a forward renderer?

All dynamic lighting is done per-vertex as far as I'm aware and all objects which are not lightmapped are lit dynamically (I could imagine there're some 4ds flags to disable the lighting pipeline for a material, though). In addition to that you can control the contribution of individual lights via flags. You can make a light dynamic-only (i.e. it won't contribute to lightmaps), lightmap-only or lightmap-additive (i.e. will contribute to lightmapped objects) for example.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Mafiascene.com Forum Index -> Mafia Mods All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

Generation Time: 0.071 | Queries: 18