• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
cozzie

KW X-port, specular always 0.9?

5 posts in this topic

Hi,

I've just replaced using Pandasoft X exporter by KW X-port, which for sure works better for complex scenes (in my case).

What I don't understand is that when I export a material with specular level = 0, it Always export RGB 0.9 / 0.9 / 0.9 as specular color.

 

For now I've fixed this by setting materials without specular reflection to 1 (scale 1 - 100) and only send float arrays to the shader if the R, G or B is higher then 0,01.

 

Does someone know how to solve this?

Any help appreciated.

 

0

Share this post


Link to post
Share on other sites

You are aware that "Specular level" and "Specular color" are different things?

Exporters probably export "Specular color" only, not taking "level" into account.

If you export max material as DX shader you can see how it is composed (0.9,0.9,0.9 is default specular color i change it to full white 1,1,1):

 

defaultshader.jpg

 

 

I'd recommend writing your own exporter and format so you have full control and whatever you wish to be exported.

0

Share this post


Link to post
Share on other sites

Hi Belfegor,

Thanks.

 

I've did some tests to see what 'comes out of max'.

 

1st test:

test1.jpg

 

Gives me:

 

   Material floor {
    0.588235;0.588235;0.588235;1.000000;;
    9.999999;
    0.447059;0.419608;0.815686;;
    0.000000;0.000000;0.000000;;

    TextureFilename Diffuse {
     "america001.jpg";

 

2nd test:

test2.jpg

 

Gives:

 

   Material floor {
    0.588235;0.588235;0.588235;1.000000;;
    9.999999;
    1.000000;1.000000;1.000000;;
    0.000000;0.000000;0.000000;;

    TextureFilename Diffuse {
     "america001.jpg";

 

Test 3:

test3.jpg

 

Gives:

 

   Material floor {
    0.588235;0.588235;0.588235;1.000000;;
    9.999999;
    0.020000;0.020000;0.020000;;
    0.000000;0.000000;0.000000;;

    TextureFilename Diffuse {
     "america001.jpg";

 

From this I conclude (just now though....) that the selected specular color, is what's in my output (see test 2 with the blue).

 

At the moment I only apply specular lighting when specular color R, G or B is > 0.0.

When I have a specular level other then 0, then the RGB seems to be divided by the level.
Test 3:

 

1,0 1,0 1,0 = white

2 = specular level

 

result = 0.02, 0.02, 0.02

 

I have to think of a good way to find out when a material 'has' specular reflections and when not.

Maybe I should use the power or RGB values, although power says more about the 'size' of the reflection.

1

Share this post


Link to post
Share on other sites

I put the code on github if you want to read it: git@github.com:jwatte/kwxport

 

Here's how it calculates the specular color:

 

        matProp = theMat->GetSpecularData();
        if (!matProp) goto not_stdmat;
        matProp->GetPropertyValue(p3);
        type = matProp->GetType();
        assert(type == IGAME_POINT3_PROP);
        matProp = theMat->GetSpecularLevelData();
        if (!matProp) goto not_stdmat;
        matProp->GetPropertyValue(f);
        if (f > 0) {
          p3.x = f; p3.y = f; p3.z = f;
        }

 

 

Translation: If the specular level is 0, use the specular color, else use the specular level as grayscale. This is likely because 3ds Max has both grayscale and color options for the properties.

You could probably change it to multiply specular color with specular level instead. (Note that specular level "2" in Max comes out as "0.02" inside the application -- the UI multiplies by 100.)

Edited by hplus0603
1

Share this post


Link to post
Share on other sites

Thanks hplusplus, that really helps.

So now it's either one of them:

 

A. you select a level, and that comes out Always, as grayscale

B. you keep level to 0 and select a color, then that comes out (without a 'level')

 

What you suggest sounds like a perfect option for me:

 

A. Always export selected color multiplied by level

 

Is it a possibility that you release a version 1.5.1 with this as a checkbox option? smile.png

 

Ps.; other then this the exporter works quite nice. Before I was using panda, but that got messy for my larger scene, normals we're being screwed up somehow, affecting my lighting terribly. That problem's completely gone now with your exporter.

Edited by cozzie
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0