Page 2 of 3

Posted: 2006-09-24, 17:26
by Thrawn

I tested it and it does work, but not as you think it should ;)

Click me

The new SDK doesn't include dynamic light sources that are attached to the player or the trinity bot.
Like this, the only way models are getting lit by now is the sky lighting.

As you see on the screen, it does work, but only when shadows are casted by brushes, right now static detail models do not cast shadow for themself and no shadows are precisly drawn on them (like one site of a model is lot and the other site isn't). They are lightened as a whole depening on the sunlight shadows in their area.

If you want true shadows and lighting for the right now, you have to place a rocket launcher in the map and fire with the rocket, it casts dynamic lighting...

Posted: 2006-09-25, 13:20
by yehuna
Mmmh, it seems that for now I have to try to do some modelling with brushes, if I want to have my desired shading. ;-)

But at least it's good to know that I didn't make a mistake while modelling.
Thanks a lot.


Posted: 2006-09-25, 14:47
by Carsten
Yehuna, is your problem really solved?

I'm confused because
yehuna wrote:The texture seems to be full brightness at all directions, as if it would be self-luminant.
seems to indicate that the model is very bright, whereas the model in Thrawns screenshot is (as expected) mostly black! :?:

Posted: 2006-09-25, 15:31
by yehuna
I am not really sure if my problem is solved, but the answer Thrawn gave me sounds plausible. But, for comparisation, I made a screenshot from my screen. Please look here.

Posted: 2006-09-25, 16:16
by Carsten
Ah, okay, I imagined it would look like that.

The Ca3D-Engine currently obtains the "ambient" color of (static detail) models from the color of the lightmap "below" that model.

Normally, there is always some floor brush with a corresponding lightmap below each model. If for any reason there is no such texture (+lightmap) below the model, the engine just falls back to white, because it has no idea what else to do.
From your screenshot, I think that there is probably nothing below the white object but sky, from which the engine cannot derive a good ambient color value either.

Thus, in order to fix the problem, just create a small ordinary brush below the origin of the model. (Make sure you apply a regular texture to it, e.g. the same that you use for floors elsewhere.) You may even make the small brush "inside" the model (insivible from the outside), as long as it is still located below its origin point.

I guess that that should fix (or say, work-around) the problem. ;)

Posted: 2006-09-26, 15:09
by yehuna
@Carsten: I tried to do as you said, and put a little brush in my model. At least, I have the ambient color instead of white now. Again I made a screenshot.

Maybe I can find a way to add shading too, while playing with the textures of the skydomes. For now, I found that the compile time gets very high then when I change them to "normal" textures.

Posted: 2006-09-26, 16:11
by Carsten
Yes, okay, now the object looks "as expected". ;)

Thrawn was right in pointing out that this object would only be affected (shaded) by dynamic light, which you can get with the current SDK only if you place a rocket launcher weapon into your map and fire it (or you'd have the modify the SDKs source code and recompile).

Such objects are (currently) not taken into account by the radiosity computations of CaLight (which you probably referred to when you mentioned the high compile time).

However, I guess what you probably want is to place a light source that casts dynamic (per-pixel) light at the object, not another light source for radiosity light.
The next SDK will come with an appropriate entity type for such light sources. You could also create such an entity relatively easy for yourself, but as mentioned before, it requires recompiling the SDK code.

Posted: 2006-09-26, 19:01
by yehuna
Ok, I think it's best for now to wait for the next SDK instead of trying to recompile the SDK Source Code. With my actual skills in doing such things, I probably will have a toaster instead of a running engine after compiling. :wink:

Maybe I will try later to do own stuff, like trying to make my own mod. The first reason to test the engine was the idea to have a great graphic engine to make a 3D-Chat, because I am absolutely not satisfied with the results I have with vrml or x3d. But I found that first I have to become familiar with the whole project, which is difficult enough for the next time.

But, like always, good things needs time, and I have a lot of patience... *ggg*


Posted: 2006-09-26, 19:09
by Carsten
Hi Joachim,
and I have a lot of patience... *ggg*
Nice to hear that! :cheesy:
I'm sorry that there was no immediate better and more satisfying solution for the lighting problem with the map object, but as you said, things definitively get better over time. ;)
As always, just keep posting here whenever you experience another problem with Ca3DE - either we will find a solution then, or I'll try to get it fixed with the next release. This is also why I love getting feedback on any aspect of the engine - it's the only way to learn about problems and fix them. :up: :)

Posted: 2007-06-06, 14:29
by Jojimbo
well ase is a royal pain,i imagined exporting a simple file from max would be quite easy and after 2 nights at it all i get is either a black box,yellow box or a see through box containing no texture.
please hurry with the new model formats.

the tutorials are of no help,even the crate wont work :frown:
and all material files checked,tried,tested,i dont know
*COMMENT "AsciiExport Version 2.00 - Wed Jun 06 12:01:21 2007"
*SCENE_BACKGROUND_STATIC 0.0000 0.0000 0.0000
*SCENE_AMBIENT_STATIC 0.0000 0.0000 0.0000
*MATERIAL_NAME "Textures/vegetation/grass1"
*MATERIAL_AMBIENT 0.5000 0.5000 0.5000
*MATERIAL_DIFFUSE 1.0000 1.0000 1.0000
*MATERIAL_SPECULAR 0.0000 0.0000 0.0000
*NODE_NAME "Plane01"
*NODE_NAME "Plane"
*TM_ROW0 15.5979 0.0000 0.0000
*TM_ROW1 0.0000 15.5979 0.0000
*TM_ROW2 0.0000 0.0000 15.5979
*TM_ROW3 0.0000 0.0000 0.0000
*TM_POS 0.0000 0.0000 0.0000
*TM_ROTAXIS 0.0000 0.0000 0.0000
*TM_SCALE 15.5979 15.5979 15.5979
*TM_SCALEAXIS 0.0000 0.0000 0.0000
and the material file
diffusemap Textures/Vegetation/grass1_diff.png
red ambientLightRed
green ambientLightGreen
blue ambientLightBlue
alphaTest 0.5
this is so frustrating,any chance of a pointer to whats up here?
i maybe am checking wrong boxes in max export options?

Posted: 2007-06-06, 14:49
by Carsten
Jojimbo, here is a suggestion:
Whenever you come across a model file that Ca3DE should support but doesn't, send the file to me (per email), and I'll check and let you know the solution. (Just make sure that you use one of the materials the come with the Ca3DE package, so that we can be reasonably sure that there are no material related problems.)

Please don't worry yourself through sleepless nights, you really shouldn't. Whenever you are sure that you're using one of the proper materials with the model and it still doesn't work, send me a mail.

I would also like to improve every tutorial you have trouble with or that you find unhelpful, but for improving these tuts, I need more information on what exactly is wrong, incomplete or misleading in which tutorial.

Posted: 2007-06-06, 15:02
by Jojimbo
Dont worry Carsten i am sure you are a busy guy,ill find out eventually,ill get an msn account and grab thrawn,he will block me after 10 minutes of my noobish questions :D
its probably a max end problem,as i discovered by opening the .ase file i made in notepad showed the file was trying to draw bitmaps and the material was designated as C:/max/material1,so therefor i started to mess around with notepad,having to look up other material files to compare etc etc,try to correct it via haxxxxx what a nightmare.
theres a whole list of checkboxes in max,which ones do i check?

anyway file sent :roll:

Posted: 2007-06-06, 16:42
by Jojimbo
a miracle :shock: i went into the map and there it was,although 5 metres off the ground but a success.i am wondering if the materials file was again messed up.
however placing all this grass hmmm,is there a way to make the static models conform to the terrain,or do we have to manually move the seperate pieces of foliage by hand?

Posted: 2007-06-06, 17:27
by Carsten
Just sent you an email with the reply, which essentially says that in .ase models, the *MATERIAL_NAME must be properly set.
If possible, you should do that right in 3D Studio Max, otherwise you have to edit the file later.
Besides that, I don't know 3DS Max at all, but your current settings seem to work well.

For me, the lesson is that I should document the ModelViewer and write something like the above about .ase files into the Wiki... :book:

Posted: 2007-06-09, 13:23
by Thrawn
See step 2 and 3 in the creating static models wiki entry- they should be relevant for you too!

Click me