logo
Main

Forums

Downloads

Unreal-Netiquette

Donate for Oldunreal:
Donate

borderline

Links to our wiki:
Wiki

Walkthrough

Links

Tutorials

Unreal Reference

Usermaps

borderline

Contact us:
Submit News
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Add a new lighting model for mesh (Read 1264 times)
sn260591
Full Member
***
Offline



Posts: 108
Location: Russia
Joined: Aug 17th, 2011
Gender: Male
Add a new lighting model for mesh
Apr 20th, 2015 at 8:05am
Print Post  
Maybe should add Phong shading model? Gouraud shading sometimes looks really bad:

  

Sorry for my bad English
Back to top
 
IP Logged
 
Smirftsch
Forum Administrator
*****
Offline



Posts: 7882
Location: at home
Joined: Apr 30th, 1998
Gender: Male
Re: Add a new lighting model for mesh
Reply #1 - Apr 20th, 2015 at 3:34pm
Print Post  
this is a topic discussed in many ways here in the forums already. It's no (feasible) option at all unless not moving huge parts of the rendering system from the CPU to the GPU, which again is a humongous task.
  

Sometimes you have to lose a fight to win the war.
Back to top
WWWICQ  
IP Logged
 
sn260591
Full Member
***
Offline



Posts: 108
Location: Russia
Joined: Aug 17th, 2011
Gender: Male
Re: Add a new lighting model for mesh
Reply #2 - Apr 20th, 2015 at 4:41pm
Print Post  
I thought the lighting of meshes is hardware, because the line in the source code d3d9drv:
Code (C++)
Select All
m_d3dDevice->SetRenderState(D3DRS_SHADEMODE, D3DSHADE_GOURAUD); 


So, if you replace D3DSHADE_GOURAUD on D3DSHADE_PHONG, then it will not work?
  

Sorry for my bad English
Back to top
 
IP Logged
 
han
Global Moderator
Unreal Rendering Guru
Developer Team
*****
Offline


Oldunreal member

Posts: 557
Location: Germany
Joined: Dec 10th, 2014
Gender: Male
Re: Add a new lighting model for mesh
Reply #3 - Apr 21st, 2015 at 2:33am
Print Post  
In the default Unreal Engine 1 form, the RenderDevice does not know where the light originated, which is a requirement for Phong. If you use forward shading on hardware by walking through some actor list, you can't handle amount of light sources in reasonable time. So you need some deferred lighting approach.. and even getting shit sorted before you can even thing about adding that is a tremendous task..
  

HX on Mod DB. Revision on Steam.
Back to top
 
IP Logged
 
Turboman.
God Member
Developer Team
*****
Offline


I love YaBB 1G - SP1!

Posts: 860
Location: Somewhere else
Joined: Feb 4th, 2003
Gender: Male
Re: Add a new lighting model for mesh
Reply #4 - Jul 21st, 2015 at 7:40pm
Print Post  
This sounds like an overly complicated feature to implement (i'd rather have lightmaps on meshes instead for that matter).

But on the topic of mesh lighting, the current implementation still has some flaws that i hope to see fixed some day, for example on large staticmesh terrain dynamic lighting only works near the pivot, a few thousand UU further you cannot light the terrain with your dispersionpistol or flashlight anymore!
  
Back to top
WWWICQ  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo