SA-MP Forums

Go Back   SA-MP Forums > SA-MP DL Edition > SA-MP 0.3.DL

Reply
 
Thread Tools Display Modes
Old 03/04/2019, 12:58 PM   #1
AWhite
Little Clucker
 
AWhite's Avatar
 
Join Date: Mar 2018
Posts: 27
Reputation: 0
Lightbulb [Manual] Creating static lighting for an object

I studied the topic for a long time with the creation of static lighting for a model through Blender 3D.
A month later, I studied this topic and decided to share it. Wrote an article on the wiki addon.
I think someone will be useful.


Go to GitHub.Wiki
AWhite is offline   Reply With Quote
Old 03/04/2019, 02:09 PM   #2
Kalcor
SA-MP Developer
 
Join Date: Apr 2005
Posts: 1,015
Reputation: 2804
Default Re: [Manual] Creating static lighting for an object

The more I played around with vertex color baking in blender, the more convinced I was that the feature is broken. At least in my blender version (2.71).

The only good way to do it is probably using 3dsmax radiosity. The lighting in SA is all precalculated/baked, but it seems the 3dsmax radiosity is ray traced, so it looks better than dynamic lighting in a lot of cases.
Kalcor is offline   Reply With Quote
Old 03/04/2019, 02:15 PM   #3
AWhite
Little Clucker
 
AWhite's Avatar
 
Join Date: Mar 2018
Posts: 27
Reputation: 0
Default Re: [Manual] Creating static lighting for an object

Quote:
Originally Posted by Kalcor View Post
The more I played around with vertex color baking in blender, the more convinced I was that the feature is broken. At least in my blender version (2.71).

The only good way to do it is probably using 3dsmax radiosity. The lighting in SA is all precalculated/baked, but it seems the 3dsmax radiosity is ray traced, so it looks better than dynamic lighting in a lot of cases.
In this article, I made the lighting without light sources, because in 2.8 there is a bug with the light on the object.
AWhite is offline   Reply With Quote
Old 03/04/2019, 02:35 PM   #4
Garr
Big Clucker
 
Join Date: Feb 2014
Posts: 51
Reputation: 29
Default Re: [Manual] Creating static lighting for an object

Quote:
Originally Posted by Kalcor View Post
The more I played around with vertex color baking in blender, the more convinced I was that the feature is broken. At least in my blender version (2.71).

The only good way to do it is probably using 3dsmax radiosity. The lighting in SA is all precalculated/baked, but it seems the 3dsmax radiosity is ray traced, so it looks better than dynamic lighting in a lot of cases.
both 3ds max radiosity baking and its vertex painting tools are far better than what blender offers. im pretty sure most assets, except for roads and terrain, were painted manually. i know the extra baggage is annoying, but id strongly consider using 3ds max for all SA related modelling as its vastly superior in workflow, scripts and tools
Garr is offline   Reply With Quote
Old 03/04/2019, 07:48 PM   #5
Yaozu
Little Clucker
 
Yaozu's Avatar
 
Join Date: May 2018
Location: UK, River Styx
Posts: 46
Reputation: 65
Default Re: [Manual] Creating static lighting for an object

Vertex color blending only gives you a solid day and night time color where the color transitions instantly between day and night and doesn't provide ray tracing like 3DS Max's radiosity solution.

I wouldn't recommend using vertex paint to paint the object to give that fake sun glare effect; you would get better results setting up omni lights in your radiosity solution.

I'd recommend 3DS Max 2012 for GTA SA plug-in support.

If anyone is interested in using radiosity in 3DS Max this will help you out: https://gtaforums.com/topic/273217-3...nced-lighting/

If you have any questions or need help feel free to ask me.
__________________
Yaozu is offline   Reply With Quote
Old 04/04/2019, 02:22 AM   #6
Kalcor
SA-MP Developer
 
Join Date: Apr 2005
Posts: 1,015
Reputation: 2804
Default Re: [Manual] Creating static lighting for an object



When you bake the lighting to vertex colors, it'll preserve any ray tracing.

The instant transitions are done with timed objects, not vertex colors.

The world objects in GTA3/Vice City only have a single set of vertex colors. When R* wanted change an object to night colors, there are 2 seperate models and they'd use timed objects.

In San Andreas, every object can have two seperate vertex color layers, and these are automatically blended as time passes in the game. There are still timed objects used to add lights to windows on big buildings etc.
Kalcor is offline   Reply With Quote
Old 04/04/2019, 03:32 AM   #7
Yaozu
Little Clucker
 
Yaozu's Avatar
 
Join Date: May 2018
Location: UK, River Styx
Posts: 46
Reputation: 65
Default Re: [Manual] Creating static lighting for an object

Quote:
Originally Posted by Kalcor View Post
When you bake the lighting to vertex colors, it'll preserve any ray tracing.

The instant transitions are done with timed objects, not vertex colors.

The world objects in GTA3/Vice City only have a single set of vertex colors. When R* wanted change an object to night colors, there are 2 seperate models and they'd use timed objects.

In San Andreas, every object can have two seperate vertex color layers, and these are automatically blended as time passes in the game. There are still timed objects used to add lights to windows on big buildings etc.
It may be myself not baking it properly from my experience when I was first starting out as I used to use a vertex color solution in a similar way of easy color for kdff. I always found it wasn't ray tracing properly and would transition from night and day vertex colors in an ugly instant fashion.

I then learnt about using radiosity solution to bake the vertex colors which introduced ray tracing for my models.

TOBJ's normally have one set of vertex colors for special building such as the neon lit hotels in the Ocean Beach area in VC.

That's not strictly true, for the VC and 3 objects they used TOBJ's for some objects like the hotels but other objects used a ray tracing process similar to SA.
__________________
Yaozu is offline   Reply With Quote
Old 04/04/2019, 03:54 AM   #8
Garr
Big Clucker
 
Join Date: Feb 2014
Posts: 51
Reputation: 29
Default Re: [Manual] Creating static lighting for an object

Quote:
Originally Posted by Yaozu View Post
Vertex color blending only gives you a solid day and night time color where the color transitions instantly between day and night and doesn't provide ray tracing like 3DS Max's radiosity solution.

I wouldn't recommend using vertex paint to paint the object to give that fake sun glare effect; you would get better results setting up omni lights in your radiosity solution.

I'd recommend 3DS Max 2012 for GTA SA plug-in support.

If anyone is interested in using radiosity in 3DS Max this will help you out: https://gtaforums.com/topic/273217-3...nced-lighting/

If you have any questions or need help feel free to ask me.
i've been using vertex paint for years, and so have many people who have been making environment mods before 0.3DL came about. r* used vertex paint on buildings, and didn't directly bake radiosity into their models lol

model and neon sign i made with vertex color and illumination painting, not radiosity, including a TOBJ


models adjusted to have better lighting, once again through vertex painting


radiosity works well for getting an initial bake, but you'll still need to touch it up with vertex paint if you want to add lighting variation to your model, and don't want it to look like shit.
Garr is offline   Reply With Quote
Old 04/04/2019, 12:44 PM   #9
AWhite
Little Clucker
 
AWhite's Avatar
 
Join Date: Mar 2018
Posts: 27
Reputation: 0
Question Re: [Manual] Creating static lighting for an object

Quote:
Originally Posted by Garr View Post
i've been using vertex paint for years, and so have many people who have been making environment mods before 0.3DL came about. r* used vertex paint on buildings, and didn't directly bake radiosity into their models lol

model and neon sign i made with vertex color and illumination painting, not radiosity, including a TOBJ


models adjusted to have better lighting, once again through vertex painting


radiosity works well for getting an initial bake, but you'll still need to touch it up with vertex paint if you want to add lighting variation to your model, and don't want it to look like shit.
I did not quite understand, are the screenshots showing models using color vertices?
AWhite is offline   Reply With Quote
Old 04/04/2019, 01:38 PM   #10
Garr
Big Clucker
 
Join Date: Feb 2014
Posts: 51
Reputation: 29
Default Re: [Manual] Creating static lighting for an object

yes.
Garr is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
static or dynamic object car? grymtn Scripting Help 1 04/08/2017 07:24 PM
Copy static/offline object? mati233 Scripting Help 5 18/02/2015 06:39 PM
SAMP 3d Static Object remover. Wing Scripting Help 4 06/04/2012 04:21 AM
Using a vehicle as a static object. Cpt.Falcon Scripting Help 1 17/02/2012 11:00 AM
Creating a static faction system, help with command. Azzeto Scripting Help 8 14/12/2011 01:06 PM


All times are GMT. The time now is 10:00 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.