Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, dr_panther, Quad), 935 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Unidirectional gouraud shading in the engine #53137
08/23/05 15:24
08/23/05 15:24
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline OP
Senior Expert
ulillillia  Offline OP
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
In MED and WED, when you move the camera around (panning), the lighting changes. I'd like to have this same thing in the engine except not changing from panning (be constant). Like, for example, if I had the Sun to the southeast 45° above the horizon, the lighting would be like that. This would cause the northwest sides of objects to be the darkest and the southeast sides to be the lightest. The lightest should be the true color version while the darkest be half transparent black. The function only needs to run once for the associated world and change when the world changes (such as going from the city world to the mountain world) being processed only once again (although things will be flagged as visible and invisible and eventually be created when the player changes the graphics options for some worlds).

These are MDL models, not blocks. I'd like to know how to accomplish this. The only thing that I can think of is to have a separate model for the lighting, but this is hard to do on curved surfaces like hilly land and could seriously hurt the frame rate, even with my.dynamic set to off.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Unidirectional gouraud shading in the engine [Re: ulillillia] #53138
08/23/05 18:06
08/23/05 18:06
Joined: Aug 2002
Posts: 44
Panama City, FL
S
Specterdragon Offline
Newbie
Specterdragon  Offline
Newbie
S

Joined: Aug 2002
Posts: 44
Panama City, FL
Well, this could easily be accomplished with a simple shader. My question though... Isn't there a way to do this directly from inside WED? If it's somehting that simple, I would think there is a mat_shaded option on the object properties window.

Unfortunatly, I'm at work at the moment and can't look, but it seems like it would be that simple.


Just thinking out loud, Specterdragon
Re: Unidirectional gouraud shading in the engine [Re: Specterdragon] #53139
08/23/05 18:13
08/23/05 18:13
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
i once did a nice lighting situation, maybe thats what you are talking about.
heck this: http://www.earthcontrol.de/downloads/katakomben/katakomben.zip out, the global lighting always comes from the same side, no matter where you look at.


www.earthcontrol.de
quoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
Re: Unidirectional gouraud shading in the engine [Re: ello] #53140
08/23/05 18:33
08/23/05 18:33
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline OP
Senior Expert
ulillillia  Offline OP
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
Hmm. I downloaded it and Winzip says that that ZIP file is an invalid archive and don't see anything. Thus, I can't use it. Winzip said to try to redownload it so I did and that didn't work either.

Question, does this allow you to configure the angle positions of the "Sun"?


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Unidirectional gouraud shading in the engine [Re: ulillillia] #53141
08/23/05 18:36
08/23/05 18:36
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
that was just ment as a demo to see if you where talking about that. (file works for me)

you can check the images on my website (downloads -> katakomben) and tell me if thats what you are talking about...


www.earthcontrol.de
quoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
Re: Unidirectional gouraud shading in the engine [Re: ello] #53142
08/23/05 18:49
08/23/05 18:49
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline OP
Senior Expert
ulillillia  Offline OP
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
It's hard to see the lighting as the area is very foggy and from the best I can tell, I can't make anything out well enough to see if it's what I'm after. Perhaps showing an "octagonal" sphere might help (without the intense fog of course) with this applied. Interesting project though.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Unidirectional gouraud shading in the engine [Re: ulillillia] #53143
08/29/05 08:53
08/29/05 08:53
Joined: Nov 2003
Posts: 677
There
Julius Offline
Developer
Julius  Offline
Developer

Joined: Nov 2003
Posts: 677
There
i don't know if this will help, but try the settings in WED's Map Properties -> Sun to set the position and brightness of the sun, and in the manual (Help -> Contents) do a Seartch for "sun_light".

i hope this is what you're looking for. i think it lights all entities in the direction of the sun and puts shadow on the other side.

julius


flabadabadab.
Re: Unidirectional gouraud shading in the engine [Re: Julius] #53144
08/29/05 19:05
08/29/05 19:05
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline OP
Senior Expert
ulillillia  Offline OP
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
I looked into that earlier, but it causes false coloring. I'd like it to have hard gouraud shading where all faces facing in one direction have the same lighting conditions. In fact, it turns my much-better-looking world:



into this horrible-looking version of almost the same position (without any modifications besides the addition of the sun through script)):



Before, the ambient was giving me problems, but setting it to zero fixed it. In this case, the ambient is zero and it doesn't help. In fact, both the ambient and albedo are at the default and simply changing them won't get what I want.

That is definitely not acceptable. That's why I can't use the sun (or any lights at that). Perhaps you might want a screenshot or two of what I'm talking about to better explain this?


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Unidirectional gouraud shading in the engine [Re: ulillillia] #53145
08/29/05 21:05
08/29/05 21:05
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
I think that you mean the effect that the sharp edges of the houses look smooth.
That is because auf the models. If you want to have sharp edges while goroud shading, you have to build them with seperate planes for each side, DON'T merge them.

Re: Unidirectional gouraud shading in the engine [Re: Pappenheimer] #53146
08/29/05 22:33
08/29/05 22:33
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline OP
Senior Expert
ulillillia  Offline OP
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
Perhaps, you might need some objects to help understand what I'm after? Here's a screenshot of what I'm talking about:



This is a view of what I'm after. This is textured, by the way, and it took two hours to figure it out and it's still not perfect. If you want, you can download the model and see for yourself what I'm after. It's not exact, but fairly close In my case, the sun comes from due east and is 45 degrees above the horizon.

If I were to have separate planes, the vertex count would practically double (or quadruple in some cases). This would seriously harm the frame rate. Blocks appear correctly with the shading as they should. Blocks have what I call "hard gouraud shading". If you add the sun and have a bunch of blocks of all shapes and look at them after building, that's exactly what I want for models. The screenshot directly above is how blocks appear. The darkest side should be half as bright as the lightest side. I don't think I'm asking much.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Page 1 of 2 1 2

Moderated by  Blink, Hummel, Superku 

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

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

Powered by UBB.threads™ PHP Forum Software 7.7.1