3D shading and environment test

Previous topic - Next topic

erico

#15
me too me too, keep me updated too! Just because you all lost that day dosen´t mean you are going to skip me! :P :-[

ps: that is really interesting Kanonet, the specular and diffuse! I will wait for the next iteration of GLB as currently I´m only doing 2d stuff, but heck, all this 3d stuff is bugging my mind!

matchy

erico, I am more intersted in designing the texture rather than fix texture. For now, you are welcome to submit you own creative versions.

kanonet, I have used your libraries but disconnected again so that I can product the desired shadows and spots. Either way, I don't to get too carried away with the graphics again without having some sort of game play at least to test and administer. Last time we chatted I had asked you about a sample net program because it's neat to have the lib but pointless with a program.

Hemlos

Hi guys,
Looking good matchy!

I have been testing bump mapping alot, and i would have to say that ericos approach can be effective.
Inducing the height differences on the texture this way, is an effective although quick and dirty solution.

The key is to have at least 2 very contrasting grey colors.
Where the 2 colors adjoin, this is where specifically the "bump" will map to your surface.

As opposed to black and white, as these can cause anomalies, inducing invisible surfaces.

Below are two examples of bump maps.
One of these screenshots uses a wide variation of grey colors.
The other is using only 2 colors.



[attachment deleted by admin]
Bing ChatGpt is pretty smart :O

matchy

Okay Helmos, here are some samples. Without bump, with bump and original large texture.  :)

[attachment deleted by admin]

matchy

Here are screenshot with no bump, bump and alt bump.

[attachment deleted by admin]

matchy

What about the blue tinge that LOADBUMPTEXTURE creates. If it is LOADSPRITE normally then the second textured in overlayed (I found....handy!).


[attachment deleted by admin]

Hemlos

Good question, I'll do some more testing.
I suspect this is happenning when you use more grey variations.
Ie. distorted grey bump maps, as opposed to bump maps with only 2 colors.

I'm not 100% sure, I'll test in a few hours.
Bing ChatGpt is pretty smart :O

erico

Within 3d packages, that blue tinted one is an image normal map, similar to a bump map when it comes to results.
Can GLB read those?

Hemlos


LOADBUMPTEXTURE is not the cause of the blue tint.
I am actually having a hard time reproducing this effect.  :blink:
Its odd because i used to get this alot too.
Perhaps it is the map, or lighting causing it.

In order for me to figgure this out for you, i will need the object, the texture and the bumpmap.
Bing ChatGpt is pretty smart :O

erico

Inside a 3d package, let´s suppose you have an object full of stuff, bumps, displace, high poly count, etc.
Suppose you would like to export this object into a reduced poly version + bump and texture, then, it is usual to export a normal map like that tinted blue image so it simulates those missing polygons.

Hemlos

@erico
The blueing is something to do with opengl directly.
I just cant remember what exactly i did to fix it with my software.
Bing ChatGpt is pretty smart :O

Hemlos

#26
The reason i am posting this, is because if the order here is different; you may get mixed results of rendering, an error/crash, or possibly blueing.
Ever since i ordered the commands in this way, i get no rendering problems at all.
This is the order in which i rendered the objects:

Code (glbasic) Select
X_MAKE3D
X_CAMERA
X_SPOT_LT -1 //note: not 100% compatible with celshading. Also note, other ADDITIONAL lights will produce EXTRA darkness on the bumped object!
ALPHAMODE
X_SCALING
X_CULLMODE
X_MOVEMENT
X_SETTEXTURE t1,t2
X_DRAWOBJ


Again, as i said earlier if you still get blueing, when you do not want this result send me the obj/tex/bump or post it here and i will check it out.

Here is the results(screenshot) without a texture, and only a bumpmap(notice, no blue surface)

edit: ps. i will test your textures now that i have some time...be back in a few with the results.

[attachment deleted by admin]
Bing ChatGpt is pretty smart :O

erico

#27
Bump and normal image map is the same on my end(as far as results on a 3d soft).
The normal map is actually able to produce diagonals in a better fashion then the bump.

Reason it has a mix of 3 colors instead of only 2 from the black and white bump.

Of course open gl will accept the blue normal stuff when it comes to games, as it is the standard on reducing million polygons to few polygons + normal image map. Direct X should accept it too.

The normal image map (blue stuff) is only actually important when reducing details from packages, not important at all when building polygons by code, since you are building what you actually need. In this case, that you are building the polygons straight to the game, either by code or software, a bump will do. Normal image map is only important when exporting and reducing, lets say, a Zbrush 3 zillions polygons model and displaces for a game.

Which brings me the question... applying a bump map (BW black and white) and applying an image normal map (blue stuff) actually requires different reading to perform correctly. Can GLB read the normal one? By the examples, it seems the BW stuff goes ok.

According to what Matchy posted, it is hard to read the bump, as that requires movement from the lights, so I will give a go on simple 3d object display I did over a Gernot´s youtube example to give it a try. But for sure, what Matchy got on the normals looks to me as normals map being used somehow as texture and colours, which raised my first ever question on an attempt to use image normal map :S 

edit 2: The normal image map, the blue stuff, combines 3 colors in an attempt to tell the renderer where the normals(fake normals here, not real polygon ones) are going over the surface, so you get a better 3d feeling then the BW stuff, which only attempts for height and not diagonals.

matchy

Helmos, The texture and map have been posted in this thread and the object is a simple quad. When I moved, there doesn't seem to be any change in the bump lighting, just the yellow/blue shading.

Hemlos

#29
@matchy:
Ok i made a quad object(2 triangles, size 256x256), and i used your textures and bumpmaps(i altered the size and posted them in texture.rar below).
The textures need to be power of 2, (ie. 64x64,128x128, etc), otherwise your texture will not scale properly on an object of same size.
I fixed the images the best i could, in the .rar file.(not perfect because i had to rescale them in mspaint)


[attachment deleted by admin]
Bing ChatGpt is pretty smart :O