Previews

Discuss artwork in all of its forms here, from level design to GUI button themes. New MODs planning, work-in-progress and other samples are welcome in this forum as well.
KillerKind
Posts:56
Joined:2005-01-23, 19:12
Location:Gulf Shores - USA
Contact:

Post by KillerKind » 2005-03-11, 06:55

OK, alpha channels. What I want, or what is needed, is for the model skins to be able to use an alpha channel. There are certain situations where this is desirable for the model.

1) To save poly count.
2) To render a more realistic representation of real world objects.
3) To create a more aesthetically pleasing model.

Certainly more can be added to the list. However, they would probably be related to to each other anyway.

What I have in mind pertains mostly to natural models. You would be surprised how low poly I can make a tree or grass model by using alpha channels. There are certain weapon models that will require textures with alpha channels as well.

Personally, I would rather you released the shader scripts (cmaps) as at least modifiable, even if this requires code to be compiled. It is really no bid deal to compile the code, at least it is not for me. I would think that if you can not compile, you have no business modifying the code in the first place.
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Post by Carsten » 2005-03-11, 10:04

KillerKind wrote:OK, alpha channels. What I want, or what is needed, is for the model skins to be able to use an alpha channel. There are certain situations where this is desirable for the model. [...]
Ah, okay. My question about specifics was more related to wether you want alpha-tests (as is required for grates, ladders, etc. ("masked" textures)) vs. alpha-blending (translucency, as for glass).
Good news is that both kinds are already supported. :)
Personally, I would rather you released the shader scripts (cmaps) as at least modifiable, even if this requires code to be compiled.
cmat scripts (the more important ones) are simple text files that are parsed by the MatSys on each init anyway. Thus, yes, they are modifyable by everybody. This does not even require the MDK, the demo will be enough.
I would think that if you can not compile, you have no business modifying the code in the first place.
For Shaders (C++ modules) that is certainly true.

Shaders implement a specific way of rendering something. For example, a Shader may be responsible for rendering a standard Material that has a diffuse-map, a light-map, and a normal-map, but no luminance-map and no specular-map. Another shader may implement rendering for standard materials that come with all five kinds of maps, another renders the materials that only have the diffuse-map etc.
Normally, each shader can tell autonomously wether it works well with a material or not. Thus, on initialization, for each material, the shader library is queried for auto-detecting the most suitable shader for each material.

The cmat script however may override this automatic shader assignment, e.g. if you want to write a Shader that implements the latest GPU fragment-program effect and want to use that with a certain material (rather than the auto-assigned shader), this can be stated in the materials cmat definition.

:arrow: Unless someone wants to write brand-new Shaders (e.g. a Shader containing a fragment-program for metallic car paint), no source code modification and no compiling is required.

Finally, here are some examples for cmat contents, for reference above:

Code: Select all

table sosTable { snap { 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0 } }


Textures/Kai/barrel_rst
{
    diffusemap  Textures/Kai/barrel_rst_diff.png
    normalmap   Textures/Kai/barrel_rst_norm.png
    specularmap Textures/Kai/barrel_rst_spec.png
    lightmap    $lightmap
}


meshColorsTest
{
    useMeshColors
}


blueMaskedTest
{
    // diffusemap  blue2alpha(Textures/Kai/crossport_diff.png)
    diffusemap  blue2alpha(Textures/Kai/dc_cage_side_diff_masked.png)
    // diffusemap  blue2alpha(Textures/Kai/ladder_red_diff.png)

    lightmap    $lightmap
    twoSided
    alphaTest 0.5
    // blendFunc one one
    // red div(add(sinTable[mul(time, 0.25)], 1), 2)
}


D3Test1a
{
    diffusemap  Textures/D3Test/lfwall2.png
    normalmap   Textures/D3Test/lfwall2_local.png
    specularmap Textures/D3Test/lfwall2_s.png
    lumamap     Textures/D3Test/lfwall2_add.png
    lightmap    $lightmap

    rgb div(add(sinTable[mul(time, 0.5)], 1), 2)
}


// Don't worry about this one for now...
// I'll provide documentation with the release...
Textures/Terrains/Lindstrom
{
    AmbientShader A_custom_Terrain      // Override the automatic shader selection.
    LightShader   none1234              // Override the automatic shader selection - make sure no light shader is selected.
 // noDynLight                          // Same effect as the previous line.

    diffusemap Textures/Terrains/ps_Texture_1k_a.png, wrapS clampToEdge, wrapT clampToEdge
    lightmap   $lightmap                                // Ambient shader "A_custom_Terrain" requires a lightmap.
    lumamap    Textures/Terrains/CommonDetail1.png      // "A_custom_Terrain" takes the Luma-map as Detail-map (optional).

    shaderParamExpr fParam4             // The first eight shader parameters are taken from fParam4 to fParam11
    shaderParamExpr fParam5             // and specify the coefficients of two planes for automatic tex-coord generation.
    shaderParamExpr fParam6
    shaderParamExpr fParam7
    shaderParamExpr fParam8
    shaderParamExpr fParam9
    shaderParamExpr fParam10
    shaderParamExpr fParam11
    shaderParamExpr 100                 // Scale / Repetitions of the Detail-map.

    twoSided                            // "twosided" is required for the SOAR terrain algorithm.
}

Best regards,
Carsten
KillerKind
Posts:56
Joined:2005-01-23, 19:12
Location:Gulf Shores - USA
Contact:

Post by KillerKind » 2005-03-11, 14:38

Carsten wrote:Good news is that both kinds are already supported. :)
OK, I could swear you told me otherwise. I guess we misunderstood each other, as you said alpha channels will not be supported until the new material system is finished.
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Post by Carsten » 2005-03-11, 17:46

I guess we misunderstood each other, as you said alpha channels will not be supported until the new material system is finished.
Yes, that was about alpha channel support on models, iirc.
And with "already supported" in my post above I meant alpha channel support in the (unfinished) MatSys, not in the current engine release.
It's also already supported in the current engine, but only for world polygons (brushes).

Sorry for the confusion. :oops:
Best regards,
Carsten
KillerKind
Posts:56
Joined:2005-01-23, 19:12
Location:Gulf Shores - USA
Contact:

Post by KillerKind » 2005-03-13, 04:00

My bad, very sorry! :oops:

Thirsty?

Image
KillerKind
Posts:56
Joined:2005-01-23, 19:12
Location:Gulf Shores - USA
Contact:

Post by KillerKind » 2005-03-13, 06:37

Started skinning the Coca-Cola vending machine model and thought you all might like this render. Even though the skin is only around 40% finished, the render is done quite well in my opinion.

Image
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Post by Carsten » 2005-03-13, 12:14

:D
Best regards,
Carsten
User avatar
Shadow
Posts:195
Joined:2004-08-28, 06:00
Location:Minesota, USofA
Contact:

Post by Shadow » 2005-03-13, 17:13

haha nice. one thing wrong tho. ITS COKE!! pepsi better lol
Image
PBX CONTINUES!!!
CLICK HERE!!
KillerKind
Posts:56
Joined:2005-01-23, 19:12
Location:Gulf Shores - USA
Contact:

Post by KillerKind » 2005-03-13, 22:10

Shadow wrote:haha nice. one thing wrong tho. ITS COKE!! pepsi better lol
Hehe. I have to make Pepsi too; my wife hates Coke. :roll:

Also have two new renders. The render on left is with bump (or height if you please) mapping, on the vending machine front, and one on right with diffuse only.

Click image to enlarge.

Image Image
scott
Posts:173
Joined:2004-08-23, 09:11

Post by scott » 2005-03-14, 03:02

Nice work:) You certainly are belting out a lot of work !
KillerKind
Posts:56
Joined:2005-01-23, 19:12
Location:Gulf Shores - USA
Contact:

Post by KillerKind » 2005-03-14, 03:54

scott wrote:Nice work:) You certainly are belting out a lot of work !
Thanks, Scott. Just think if I didn't have to work 50 hours a week in the real world :!:

Now you can take your pick, Pepsi or Coka-Cola! 8)

Image
User avatar
Shadow
Posts:195
Joined:2004-08-28, 06:00
Location:Minesota, USofA
Contact:

Post by Shadow » 2005-03-14, 05:27

i like it. but most machines at least where i live dont have the letters raised like in the bump map. the front part is just a single convex piece of plastic. otherwise it looks great.
Image
PBX CONTINUES!!!
CLICK HERE!!
KillerKind
Posts:56
Joined:2005-01-23, 19:12
Location:Gulf Shores - USA
Contact:

Post by KillerKind » 2005-03-14, 11:18

Well these are a new type, made be yours truly. :wink:

But seriously, here they are with no bump map.

Image
User avatar
Kai
Posts:177
Joined:2004-08-19, 15:56
Location:Germany
Contact:

Post by Kai » 2005-03-14, 13:45

Hey Killer very nice work, where did you get those pretty textures ? Photos ?

Do not use a bump map out of the texture, like shadow said this is not common ;)

I think a bumpmap, or better: normalmap would fit very nice.
Use the plain render (without texture) to see what could be used to create a normalmap. All the buttons and the small beveled edge around are ideal . You can also decrease the polycount for the front.
Another idea would be to create a curvy surface for the nmap, then adding the button nmap elements. Even a flat surface would act like a curvy one if there a nice highligts (specular map)

Just ideas :)
User avatar
Thrawn
Posts:302
Joined:2004-08-30, 10:38
Location:NRW, Germany
Contact:

Post by Thrawn » 2005-03-14, 15:04

Oh god, PLEASE use it with bumb maps, it looks amazing and shocking, gameplay first so dont care about realism - it should look nice and with bumb maps it definitely does.

Damn, if it already looks like this with diff and bumb maps only how the hell will it look like with the rest like specular and luminance? :shock:

BTW: It suits perfect into my planed level :D
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests