Gamestudio Links
Zorro Links
Newest Posts
Votes for future features
by 7th_zorro
Today at 01:57
Open WMB file
by Superku
Yesterday at 23:37
Stopping and resuming sessions without interrupting trade statis
by jcl
Yesterday at 08:14
Best Devlopment Experience
by j45p41
03/20/19 23:04
Blog Post: Continuous Futures Data in Zorro
by chsmac85
03/20/19 15:59
Error message : Closing Order Quantity
by OptimusPrime
03/20/19 12:49
script can work but no result(Profit and loss)
by jcl
03/20/19 09:12
AUM Magazine
Latest Screens
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Who's Online
3 registered (AndrewAMD, 7th_zorro, 1 invisible), 658 Guests and 8 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
FrankFred, QuartzLoop, Conchip, danatrader, ilikezorro
18190 Registered Users
Page 1 of 2 1 2 >
Topic Options
Rate This Topic
#475318 - 12/01/18 20:33 Lighting Question
Garrettwademan Offline
Member

Registered: 01/26/06
Posts: 242
Loc: PA
So I have been beating my head over this, can anyone tell me why my light cast is acting this way on the models? The ceiling tile and floor is 1 model, but it has multiple faces and the light appears different at each face having its own local light scheme. Looking to see if I can make this look more realistic. Any thoughts?

FYI - I have almost no code to handle this today, so I am open to ideas on how to start on this.



Edited by Garrettwademan (12/01/18 20:45)
_________________________
Current Project: Computer Repair Simulator
https://www.computer-repair-simulator.com

Top
#475319 - 12/01/18 20:53 Re: Lighting Question [Re: Garrettwademan]
3run Offline
Senior Expert

Registered: 05/05/09
Posts: 5105
Loc: Caucasus
Hi there! I guess only per pixel lighting will fix this issue. By default acknex uses vertex lightning as far as I know. So the best way to fix that, is to use shaders (to write it by yourself, cause I can't really recall a 'ready-to-use' solution for that Edit: I guess those bumpmapping shaders from AUM or free resource page are having per pixel lightning).

Edit: also, face-separation might help. I remember something about this from Superku, will try to find now.

Edit2: I couldn't find it.. so here I've made some screen shots to show what I meant by face-separation:
1 - this is a simple 'smooth' box created in MED, it will have some lightning issues (same as on your screenshot).
2 - select one of it's sides (f.e. the top as on this picture) and press COPY (near by the OPEN, SAVE etc)
3 - after copying it, remove the side (press delete)
4 - press PASTE button which is right next to COPY, and you'll get separated top side of the box
5 - continue with the rest 5 sides, and you'll get a box with separated faces

This will help to get more or less proper lightning, but per pixel lightning shader is MUST have too (combined with this tips).
Quote:
#1

#2

#3

#4

#5



Edit3: also, you can see differences between vertex lightning (only looks good on more or less high polygon models/surfaces) and per pixel lightning on this videos
Vertex Lighting
BDX Devlog #2 - Per-Pixel Lighting

Best regards.


Edited by 3run (12/01/18 21:15)
_________________________
Looking for free stuff?? Take a look here: http://badcom.at.ua

Top
#475320 - 12/01/18 21:14 Re: Lighting Question [Re: 3run]
Garrettwademan Offline
Member

Registered: 01/26/06
Posts: 242
Loc: PA
You guys got it! Thanks.

_________________________
Current Project: Computer Repair Simulator
https://www.computer-repair-simulator.com

Top
#475321 - 12/01/18 21:17 Re: Lighting Question [Re: Garrettwademan]
3run Offline
Senior Expert

Registered: 05/05/09
Posts: 5105
Loc: Caucasus
Glad to be helpful! Thanks to Superku, I've learned all those awesome tips from him! laugh
_________________________
Looking for free stuff?? Take a look here: http://badcom.at.ua

Top
#475323 - 12/02/18 08:22 Re: Lighting Question [Re: 3run]
Superku Offline
Senior Expert

Registered: 09/13/03
Posts: 6828
Loc: Kiel (Germany)
@3run: Good avice/ post! wink
My pic you were probably looking for - from January 2013, took me a while to find it:

_________________________
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends

Top
#475348 - 12/03/18 17:25 Re: Lighting Question [Re: Superku]
20BN Offline
Member

Registered: 02/08/03
Posts: 120
Loc: RP China
You can import *.obj in "Model from FBX 2010" fix all smooth group.

Top
#475698 - 01/04/19 04:33 Re: Lighting Question [Re: 20BN]
Garrettwademan Offline
Member

Registered: 01/26/06
Posts: 242
Loc: PA
I see what you did, you basically have a model that has welded vertices connecting more than 1 plane facing different directions etc, and you copied the specific faces, and re pasted so its on its own group, and then delete the original, thus removing the shared vertices....right? BRILLIANT. I think you now taught me what the heck has been going on with my models over the years lol.

I have focused my entire career to coding and getting a game to a functional point...now that I am here I am learning so much about the finishing touches. I still need to learn shaders and special edge blending lol.

This is probably way off topic, but if anyone has tried this, it would be you Superku. Is there a way to make like a light outline around a certain model? Say for instance in your model above, if you wanted to have a red outline around the model outside edges, does this game engine support such a thing?
_________________________
Current Project: Computer Repair Simulator
https://www.computer-repair-simulator.com

Top
#475699 - 01/04/19 05:46 Re: Lighting Question [Re: Garrettwademan]
Garrettwademan Offline
Member

Registered: 01/26/06
Posts: 242
Loc: PA
So I spent the last hour following your steps on some of my main models....and WOWZER! Amazing overhaul to my output with so little work. FYI Tonight I learned to link the keyboard hotkeys in MED haha, I had no idea this worked in the A8 MED, been using a very old MED I just found out too.

Check this out, THANK YOU AGAIN!!

_________________________
Current Project: Computer Repair Simulator
https://www.computer-repair-simulator.com

Top
#475706 - 01/04/19 15:00 Re: Lighting Question [Re: Garrettwademan]
Superku Offline
Senior Expert

Registered: 09/13/03
Posts: 6828
Loc: Kiel (Germany)
Np, glad it's helping you out!
Outline: Fullscreen outlines for all geometry via postprocessing is rather easy, might work for a single object as well (via a mask/ MRTs). The easiest way would be to create a duplicate of your model but where you weld all close-by vertices (again), then create a shader where you offset all vertices by the vertex normal direction times some factor. (You can do this in let's say Blender as well, scale in normal direction, but via shader you could let's say animate it slightly or change the offset based on the distance to the camera.)

Btw. you should start looking into some shaders for reflective materials, for a semi shiny reflective floor, for dynamic highlights on metal and all that good stuff. I'm not necessarily talking about actual real time reflections but you could try that as well.
I use shaders for everything and most of the time sample a simple highlight texture based on the view transformed normals, which makes objects look more dynamic and not as pre 1999. I use that for example for subtle highlights on characters or to give a flat greyscale object a metallic look of sorts.
Regarding reflective materials, here's something I made and recorded a few weeks ago (first 10seconds or so): https://i.gyazo.com/6443ca1228cb2d7571e5dd960973ae3b.mp4
It's over the top of course but shows how basic textures can be transformed into something else not via artistic skills but some coding.
_________________________
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends

Top
#475719 - 01/05/19 01:38 Re: Lighting Question [Re: Superku]
Garrettwademan Offline
Member

Registered: 01/26/06
Posts: 242
Loc: PA
That is really good advice. I got as close as considering duplicating my model and always having it slightly bigger behind the original and make it like an all in 1 color, but it would have to move around the camera and I think I have too many items to handle for this. That is okay but wanted to make sure it wasn't something super easy.

As for my shaders, I use 0 now (I use 1 to make an item all white lol). I will watch your video because I think having some fake reflections could do a lot of good, along with some object shaders. I know it can be done, I just have to focus on it. I will go back and do some reading on the tutorials as well. Now that the main code is done in my project, I can now begin to look at this stuff. My thought before hand was if I have no code, there is no point to having good models. I can't say that now.

I know this forum has some good stuff too, I plan on going through it for final touches.
_________________________
Current Project: Computer Repair Simulator
https://www.computer-repair-simulator.com

Top
Page 1 of 2 1 2 >


Moderator:  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de