Model pimpage Thread

Modelling, Textures, Animating and other general engine asset topics.

Re: Model pimpage Thread

Postby ShinobiWan on Wed Sep 17, 2014 5:54 pm

I dont post much, but i lurk quite often.

Crate prop, needs a retexture.

Image
User avatar
ShinobiWan
Regular
Regular
 
Joined: Thu Sep 11, 2008 9:17 pm
Location: Michigan

Re: Model pimpage Thread

Postby Black_Stormy on Wed Sep 17, 2014 11:50 pm

kraid wrote:Normalmaps on the other hand are lit on a per pixel base, but only respect actual light sources no shadows cast by props or bsp. This means your prop will be lit properly regarding enviroment lights and other light sources at the lighting origin of the prop.


Do you have more information on this? I'd like to know how it works and why.
User avatar
Black_Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: Model pimpage Thread

Postby Surfa on Thu Sep 18, 2014 9:37 am

This is an old article but gives a good explanation and is still relevant.
http://www.3dkingdoms.com/tutorial.htm
Surfa
May Contain Skills
May Contain Skills
 
Joined: Sun Dec 30, 2007 3:04 pm

Re: Model pimpage Thread

Postby kraid on Thu Sep 18, 2014 3:43 pm

Ok here's an example in Source:

From top to bottom:
#1. flat color pipe with additional edgeloops every 32 units (pipe is 512 units long) uses per vertex light
#2. textured and normalmapped prop with phongshading and cubemaps enabled
#3. flat color prop without normalmap uses per vertex light
#4. flat color pipe with normalmap, phong and cubemap for better visualisation of how the normalmap reacts to light.

Pic 1:
http://cloud-4.steampowered.com/ugc/26216921952944372/599A16506C6C508E1A8E923DD258C708115C0528/
Odd lighting artefacts due to blending between vetexes with different light values. (#1)
Also blending of vertex light across the whole prop (#3)

Pic 2:
http://cloud-4.steampowered.com/ugc/26216921949129787/27272412C54693C079B3BDAF4CF3E2A13CABD741/
Wireframe view of the scene.

Pic 3:
http://cloud-4.steampowered.com/ugc/26216921948852763/7A824AA4BEB7B304B9D6F295B5A57C787766EB91/
Close up of pipe 4.
Here you can see how the normalmap affects the light distribution across the prop.
Little dents and bumps on the normalmap are lit on a per pixel base with the light values sampled at it's origin.
Two more shots without Phong, for better understanding:
http://cloud-4.steampowered.com/ugc/26216921953599922/9919815F4B8368091E0F397BD6BB288DF93A4F7C/
http://cloud-4.steampowered.com/ugc/26216921953601646/756D6C40CE2289E01C15F07A3797C62DA229A519/

Pic 4:
http://cloud-4.steampowered.com/ugc/26216921952947164/81D002797BABBB89707B380DD88722DF3A42D449/
View from behind the pipes.
Notice how sampling light every 32 units (#1) creates a slightly different (more accurate) transition from blue to red light then the sampling at the pipe start and end point only (#3)?
Also, odd triangle blending issues on #3.
Goldeneye Source v4.2.3
get it now and play for FREE!!!
http://www.goldeneyesource.net
kraid
Been Here A While
Been Here A While
 
Joined: Thu Jan 22, 2009 12:09 pm

Re: Model pimpage Thread

Postby plagueofburia on Fri Sep 19, 2014 12:27 am

Thanks Surfa, this will help I glossed over, I don't know these terms very well but I noticed something with object/tangent space. It seems object space must have every UV coordinate with their own defined space, no overlapping UVs.

I don't think that would be a problem for my roof, as there are no overlapping UV islands. I will keep this in mind for the future.

Excellent kraid cheers, I will try to understand.

Okay the first pipe I see that having more vertices gives source engine more information (more vertices) which can produce a better detailed shadow but I guess at a higher cost. I can do this if I use vertex lit on props by adding edgeloops, that is cool.

Normalmaps on the other hand are lit on a per pixel base, but only respect actual light sources no shadows cast by props or bsp. This means your prop will be lit properly regarding environment lights and other light sources at the lighting origin of the prop.


Thanks for this explanation, per pixel lighting sounds like the best option does this mean a prop with per pixel base one can use the HL2 flash light and the pipe/prop will still cast a shadow?

In addition can I ask if I had one junk bag prop and this junk bag was inside a dumpster prop covered with a door prop would the junk bag receive shadows from the dumpster and door cover prop? What would you use vertex lit or normal map lit? And on which prop Junk bag/dumpster/door cover?

So if I understand a model that uses per pixel lighting ( a normal map) it will receive light information and be lit correctly with the environment and other lights that is great.

Pipe 2 looks super detailed like it. Not sure if I have all this but cheers for the explanation.

This kind of goes with this topic in a way. I have created and textured a model, but I seem to see some strange shadows happening at one end of the pipe segment. I have deleted Double UVs, is this to do with the direction of the normals? or something else? Blender does not have normal edit direction, how can one fix this?

Image

Image
plagueofburia
Regular
Regular
 
Joined: Mon Sep 12, 2011 9:09 am

Re: Model pimpage Thread

Postby marnamai on Fri Sep 19, 2014 1:57 am

Image
Last edited by marnamai on Sun Sep 21, 2014 12:37 am, edited 1 time in total.
User avatar
marnamai
Veteran
Veteran
 
Joined: Thu Nov 10, 2005 12:17 pm
Location: Belgium

Re: Model pimpage Thread

Postby Gambini on Fri Sep 19, 2014 3:05 am

Very good! Sometimes I wish i had the chance to take a design study.
User avatar
Gambini
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Oct 20, 2008 1:52 am
Location: Buenos Aires, Argentina.

Re: Model pimpage Thread

Postby kraid on Fri Sep 19, 2014 1:16 pm

@plagueofburia: you cannot have object space normalmaps in source, allmost every realtime engine relys on tangent space normalmaps. Also object space normals don't work with animated models, which is the reason why they're not used often.

Luckly, if you have the prop and a object space normalmap, it's possible to calculate a tangent space normalmap from it and vice verse. But it's ofc. better to calculate a tangent space normalmap from highpoly onto a lowpoly object to avoid issues and artifacts.

The HL2 flashlight will cast shadows across other props and even on other parts of the same prop.
But these shadows are sharp realtime shadows.

A normalmapped prop will recive light and shadows from the enviroment but only at it's illumposition.
Most of the time, it's the props origin, but it can be altered in the .qc by using the $illumposition command.
So if the origin happens to be in a darker area like behind a pillar that casts shadow on it, it will be darker then the prop next to it who's origin is outside of that shadow.

Ofc. you can always change the origin on which the light is sampled by using a info_target entity for it.

As for the dumpster, junk bag + door, the dumpster is able to cast shadows onto other props, too.
If the prop is normalmapped, it'll sample light at it's illumposition, so if this is dark because the dumpster casts shadows on it, the prop will be overall darker.
if the prop is vertex lit because it ain't got a normalmap and you compile the map with -staticproppolys, then all the vertics that are shadowed will be darker then the ones that are not.
The question is will it look better if the prop is lit that way.

Like i showed you before, there can be issues with triangular gradients on vertex lit props especially if there are huge brightness differences from one vertex to the other.

If you use one method or another for a certain prop, always depends on the situation and enviroment.
I'd even say you as the level designer have to know about the engines restrictions as well as the things where it shines on.
Your job is to avoid situations where you hit these restrictions and create situations the engine can show it's advantages.

If i'd do a dumpster with a junkbag inside, i think i'd keep the inside of the dumpster rather dark and avoid lighting situations where bright light can shine straight into the dumpster.
The bags as roughly round organic objects might be better off without vertex light, no matter if they're normalmapped or not.

Example:
Image
Left: phong shading, Right: per vertex light.
Kinda faked the vertex light within the 3d app because i didn't want to compile 2 props and a map just for an example pic. So the result might look slightly different in Source.

The pipe indeed has shading issues that might be caused by the vertex normals of it.
Blender also has some possibilities to edit vertex normals, one of them is the edge split modifier.
mark edges you want, press 'ctrl+e' and select 'mark sharp' then add modifier 'edgesplit' deselect 'from edge angle', and select 'from marked as sharp' option


@marnamai: sexy, reminds me that i need to redo the BTR 80 model i made for Goldeneye Source one day.
Goldeneye Source v4.2.3
get it now and play for FREE!!!
http://www.goldeneyesource.net
kraid
Been Here A While
Been Here A While
 
Joined: Thu Jan 22, 2009 12:09 pm

Re: Model pimpage Thread

Postby Surfa on Fri Sep 19, 2014 4:36 pm

kraid wrote:@plagueofburia: you cannot have object space normalmaps in source, allmost every realtime engine relys on tangent space normalmaps. Also object space normals don't work with animated models, which is the reason why they're not used often.

Luckly, if you have the prop and a object space normalmap, it's possible to calculate a tangent space normalmap from it and vice verse. But it's ofc. better to calculate a tangent space normalmap from highpoly onto a lowpoly object to avoid issues and artifacts.


Technically you can use object space normals with both mirror'd uv's and animated models if the implementation is correct in the vertex shader. This isn't used often because it ends up being more expensive than using tangent space, though for static props object spaced normal maps are cheaper. There are reasons why you would want to use object space normal maps but generally they seem to have been replaced outright by their tangent-space counter parts.

Changing a object-space normal map into a tangent is actually very useful. All object-space normal maps produce the same shading (within reason) no matter what engine they are present in. Tangent space normal maps are reliant on the baker's and engine's calculation of the tangent space. If this calculation differs then there will be smoothing errors present on the in-game version. There are two ways of fixing this problem, the first is to sync the tangent space calculation between engine and baker (best option for production) the second is to use something like hand-plane to convert your object space normal map into a tangent-space with the correct calculation to match your engine.

The reason I posted the link above was not to start a conversation about object space v.s. tangent space but it gives a good overview of how normal-mapping works in the shader, providing an insight into the shading of a model works inside a game engine. This is highly dependant on the shading model used in the engine, if you are interested then I recommends checking out some of the more famous methods such as Blinn-Phong and more recently the Beckman distribution.

Warning equations ahead:
http://simonstechblog.blogspot.co.uk/2011/12/microfacet-brdf.html
Surfa
May Contain Skills
May Contain Skills
 
Joined: Sun Dec 30, 2007 3:04 pm

Re: Model pimpage Thread

Postby Sathor on Sun Sep 21, 2014 8:22 am

marnamai wrote:Image


Sweet! Looks like a German "Fuchs" APC, right?

@ShinobiWan

That is how a 2014 crate should look like :-D
User avatar
Sathor
Senior Member
Senior Member
 
Joined: Sat Jan 20, 2007 10:31 pm
Location: Germany

Re: Model pimpage Thread

Postby marnamai on Sun Sep 21, 2014 10:58 am

User avatar
marnamai
Veteran
Veteran
 
Joined: Thu Nov 10, 2005 12:17 pm
Location: Belgium

Re: Model pimpage Thread

Postby marnamai on Tue Sep 23, 2014 10:24 pm

Image

le bonus
Image
User avatar
marnamai
Veteran
Veteran
 
Joined: Thu Nov 10, 2005 12:17 pm
Location: Belgium

Re: Model pimpage Thread

Postby plagueofburia on Fri Sep 26, 2014 10:15 pm

Hi, for some reason I have slowed down.

Thanks Surfa/kraid object/tangent space
A while back I saw a youtube tutorial about baking normal maps (I glossed over it) it was for a modern game and at some point in the tutorial two options were mentioned when using a program called Xnormals between object and tangent space and the person selected tangent space but did not explain why, so now I guess I know why that person suggested tangent space.

Thanks kraid real grateful for the answers I ask about the light sources and if these models will cast shadows if the flash light is shone on them because I don't want the models to be out of place with the other models.

The illumposition, my past models need to be all redone as I think the origins are not centred. Regarding origins in Blender I just put all my origins at centre of mass when editing in blender the origins are moved around. This is the first time I have heard of illumpostion

Initially I thought that normalmap lit on a model wouldn't allow other models to cast shadows onto other models but this seems to not be the case.

I think what confused me is this
Normalmaps on the other hand are lit on a per pixel base, but only respect actual light sources no shadows cast by props or bsp. This means your prop will be lit properly regarding environment lights and other light sources at the lighting origin of the prop.


The bit about no shadows cast by props I interpreted that as a normalmapped lit model would not cast a shadow onto another prop

A normalmapped lit model uses the pixels of the texture to form its calculation( I guess now that also includes the illumposition, the origin of the model ) to produce lighting information

Where as a vertex lit model uses all the vertices of the model to form its calculation to produce lighting information. to the engine, is this correct?

If a model has a 1024x1024 pixels that would be 1024x1024 points of information that certainly would produce a more realistic result than the amount of vertices the model uses. I am still trying to clearly understand the disadvantage of normalmap lit model, the only disadvantage I see is that it doesn't contain BSP lighting information. In what situation can one think of that a normalmapped lit model, may not produce the results that one desires? And how would the same model vertex lit generic be the better alternative?

I have not checked this out but if HL2 Ep2 engine introduced bumped map lighting then I guess models from those games would use normalmap lit models but they do not.Even portal 2 and I am not sure how many but the texture of the models I have seen use Vertexlit generic why use Vertex lit when normalmap lit produces more realistic result as it calculates per a pixel?

Is it that a vertex lit model would be affected by a real world brush where as a normal map lit model would not be affected by a real world brush is this a disadvange?

If I understand correct, using Vertex lit on a model that the more vertices a model has the more defined a shadow will be when it is cast onto it. This would be due to having more data to calculate light information. Like with pipe 1 that has more vertices than pipe 3 in your example.

Like i showed you before, there can be issues with triangular gradients on vertex lit props especially if there are huge brightness differences from one vertex to the other.


Cool, I believe I am beginning to understand, vertex lit would cause a problem if they are used to calculate light information. If the distances between vertices were great, where one vertex was in darkness and the other vertex was not. There would be a disparity in how the shadow looks between the two vertices, it would not look smooth just like in the last example you show with the phong and vertex lit props.

I'd even say you as the level designer have to know about the engines restrictions as well as the things where it shines on.

Your job is to avoid situations where you hit these restrictions and create situations the engine can show it's advantages.


I will try and remember this, I still don't know source 1 and source 2 is out, to be honest I am still learning art program like gimp/pshop and Blender. So I guess I have fallen behind in many cases.

In that example you provide, the Phong shading prop, the shadow looks really smooth compared to the vertex lit model.

Sorry if I have not clearly understood and if carrying on old ground is tiring I understand but thanks for all the advice it has helped me understand source and normal mapping a little better

---------------------
marnamai the vehicle looks epic, I would really like to know how one would UV unwrap something like that. What texture size would one go for, for a vehicle.1024 or 2048 or 4096, I can't work on 4096x4096 system cannot handle it. The wheels seem like cylinders of some kind but it seems like it would be difficult to unwrap with all those details.

------------------------------

Cheers kraid :smt023 yeah the edge split modifier in blender fixed up how the model received lighting. Those shadow errors seemed to disappear.

I have created a few new pipe sets, one is a gutter type pipe set, another is thicker pipeset and the other is a gas type pipeset. There is still one more gutter pipe set I am working on.

This took much more time than I thought because pipeset2 and 3 I had to redo the whole texture my mistake my error, I slowed down a lot because of that.

For the gutters, black was difficult to get so my gutter pipes fully lit looks dark gun metal kind of colour.

Pipe set 1(gutters) have 5 different skins dark white, white, red rust, black black2. Testure size 1024x1024

Pipe set 2/3 has 3 skins texture size 2048x2048 I wanted to fit 3 pipesets on the texture sheet but I could not and I could not fill up all the space with just 2 pipesets.

pipeset1_1a dark white
Image

Image

pipeset1_1b white
Image

pipeset1_1c red rust
Image

pipeset1_1d black
Image

pipeset1 1e blackV2
Image

Image

Pipeset2 and 3 skin C
Image

skin A
Image

Skin B
Image

Is there any problems one can see with the textures and models so far?

I have to somehow get these props working in source. Perhaps I have lost focus of the level that should be the most important aspect. I guess this happens sometimes.
plagueofburia
Regular
Regular
 
Joined: Mon Sep 12, 2011 9:09 am

Re: Model pimpage Thread

Postby kraid on Sat Sep 27, 2014 3:07 pm

You should place your prop origin always at a point it makes sense.
For objects that will be placed on the ground (e.g. a crate), i'd place that origin always at the bottom.
Ofc. then it's neccessary to use the illumposition command in he .qc to lift the lighting origin roughly at the center of the prop again.
For anything modular, it's vital that the pieces fit together seamlessly.
Depending on the prop, a centered origin might end up somewhere inbetween two units, which makes it necessary to align each piece off grid.

As for the normalmapped vs vertexlit topic:
(if you use the -staticproplighting compile parameter) normalmapped props will cast shadows onto vertexlit props and bsp, but they won't recive shadows cast by themself, other props or bsp.
If you use -staticproppolys, it'll calculate the shadows based on the actual model, not only the collision mesh.

Flashlights are dynamic lights and will work on any prop even with self shadowing.
So one part of the prop can recive shadows from another part of it.
But these shadows are not as smooth and diffuse as baked lighting can be, so mixing them with lightmaps won't be the best solution in most cases.

Your pipeset indeed looks much better now.
Not sure about the pre-baked shadows though.
Goldeneye Source v4.2.3
get it now and play for FREE!!!
http://www.goldeneyesource.net
kraid
Been Here A While
Been Here A While
 
Joined: Thu Jan 22, 2009 12:09 pm

Re: Model pimpage Thread

Postby marnamai on Sun Sep 28, 2014 8:19 pm

sculpting update, next up, sculpting the hair for the lower body half.
Image
User avatar
marnamai
Veteran
Veteran
 
Joined: Thu Nov 10, 2005 12:17 pm
Location: Belgium
PreviousNext

Return to Art Creation

Who is online

Users browsing this forum: No registered users