Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / question litting a part of a 3d object

Author
Message
haliop_New
User Banned
Posted: 17th Jan 2017 12:25
lets say I have a 3d object of 3 planes

1. main plain it the middle
and 2 plains attached to it from the sides

I want to use global lightning on that object
but I want the 2 other plains to be fully lit regardless of world lightning

should I use a light map for it ?

the object is created from one piece and I want just some of it to be fully lit I don't know maybe a shader will do it but I have no grasp over it ...
what could I do ?
cause I really don't want to create 2 separate objects since it will make 2 drawcalls over one which is much faster I already tried..


thank you for your time.
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 19th Jan 2017 15:39
If you want them to have different lighting then they'll have to have separate draw calls anyway, unless the shader has some kind of dynamic branching, but that tends to be slow on mobile devices. You could keep it as one object if the planes were separate meshes, but again each mesh uses its own draw call.
haliop_New
User Banned
Posted: 20th Jan 2017 08:07
Yeah thats what im trying to avoid
Cause there are about 250 objects at any given time anf to turn it into 500 is not the best idea...

Thank you for yhe answer.

Login to post a reply

Server time is: 2024-04-25 11:27:44
Your offset time is: 2024-04-25 11:27:44