Page 3 of 6

Re: Dice and collsion

Posted: Sat Jan 24, 2015 3:53 am
by mongoose7
You can export the model with a normal map and then change it to a bump map in the MTL file. No programming necessary.

Re: Dice and collsion

Posted: Sat Jan 24, 2015 7:32 am
by AReichl
Hi,

1.) long time ago i found an example (maybe even here in the forum) for a Bump Shader (hlsl+glsl).

2.) importing models is also my problem with Irrlicht. CuteAlien's friend once created a beautifull
spaceship for me, but i could not load it any way (tried converting it in different formats with different
tools).

What about a "little" side-project - a converter from anything to Irrlicht format. Could use the Assimp
library - others are also doing it this way (e.g. Urho3D).

Re: Dice and collsion

Posted: Sat Jan 24, 2015 12:09 pm
by Asimov
Hi AReichl,

That sounds like a good idea. Unfortunately I haven't the experience yet to write such a system.
I find it hard to believe that this engine does not seem to support normalmaps properly and you have to jump through so many hoops to make a map work, and then it looks rubbish.

I have found out that even Ogre 3D has a decent normalmap solution.
I have now spent a few weeks trying to get them to work, and I am a bit down.

I can make beautiful 3D models, and cannot display them properly in a game.

I have invested quite a bit of time in my game already. It would be a shame if I had to stop and look for another engine, and there are very few that support C++, and I am not a fan of C# although I have used it in a previous game I made.

@mongoose
You can export the model with a normal map and then change it to a bump map in the MTL file. No programming necessary.
Can you explain how. I know the text editor bit, but what line do you replace the bumpmap code with?

Re: Dice and collsion

Posted: Sat Jan 24, 2015 2:44 pm
by thanhle
Hi mate,
Here's your bump map or normal map in Irrlicht.
That was from the obj file.

Image

I don't know why you load the bump texture twice.
But this is how I fix it.

Fix: Open material file rename your map so that there is no spacing (e.g. 2pbackbump.jpg)

map_bump -bm 0.300000 maps\2pbackbump.jpg
bump -bm 0.300000 maps\2pbackbump.jpg

Also rename your image file to 2pbackbump.jpg.


I guest the obj loader can check for other string if vendor use a different string rather than just bump or map_bump.

Goodluck.
thanh

Re: Dice and collsion

Posted: Sat Jan 24, 2015 2:51 pm
by thanhle
rustyk wrote:
CuteAlien wrote:Yeah, something like bump-map instead of normal-map is what I think is going wrong - the format is used wrong.


Image
Hey nice shadow on the ninja. Did you create the projection or you using an existing library in here?

Regards
thanh

Re: Dice and collsion

Posted: Sat Jan 24, 2015 3:13 pm
by Asimov
Hi Thanhle,

Unfortunately you downloaded the wrong zip file. The one you downloaded was a test file with a bumpmap of a 2pence coin that CuteAlien wanted so that she could see the difference in file structure of an output of an x file with a bumpmap instead of a normalmap from 3ds max. So you have shown me a bump map working, but not a normalmap. I used the 2pence bumpmap because it was one I had lying about on my hd.

I have no problem with getting a bumpmap to work. I am trying to get a normalmap working. This was the link I first posted
http://www.asimoventerprises.co.uk/test/grenade.zip

This has an x file, an obj file, and my original max file with the normalmalmap nrm.tga.

And this is how it should look when the normalmap is properly applied. This was from marmoset, a game model viewer, which is a brillient tool for previewing game models before they go into a game.

Image

Re: Dice and collsion

Posted: Sat Jan 24, 2015 4:38 pm
by The_Glitch
After reading this thread I can honestly say I've had no problems with Irrlicht and the DirectX format. Matter of fact I chose it as my format to use for characters and levels. I haven't tried your exporters you posted but I've used 3ds max for years and I tried one exporter in the past I can't recall the name but Irrlicht hated anything is spitted out of 3ds max. So I stuck to a well know exporter instead and I've never had any problems. My pictures are all DirectX format but I'm using shaders. But I used an Irrlicht normal map material in the past and it worked fine.



Image
Image
Image

Re: Dice and collsion

Posted: Sat Jan 24, 2015 6:01 pm
by Asimov
Hi The Glitch,

Very nice photos, but you didn't say what exporter you used, and how you got these normalmaps to work.
If you have a shader to do this, I wonder if I could look at it, as I have so far only got one shader to work in irrlicht, and I don't fully understand it yet.

Re: Dice and collsion

Posted: Sat Jan 24, 2015 6:15 pm
by The_Glitch
Let me see If I can find the exporter name, only draw back is I believe it only supported up to 3ds max 2012. Also are you using windows or another OS as my shaders are for DirectX API.

Re: Dice and collsion

Posted: Sat Jan 24, 2015 6:55 pm
by Asimov
Hi The_Glitch,

I am using windows and directx, but I am using 3ds max 2015.
I have tried a few exporters, for x and obj, but nothing seems to work so far.

How did you implement your normlmap shaders by the way?

Re: Dice and collsion

Posted: Sat Jan 24, 2015 11:51 pm
by The_Glitch
I have a lot of school work sadly :/.

I'll try and help you when I get a chance. The environment in the pictures use valves radiosity normal mapping. But the dynamic objects use normal mapping. My shader is pretty straight forward. There is also post processing on the scene also I'm sure you can tell.

Re: Dice and collsion

Posted: Sun Jan 25, 2015 12:39 am
by Asimov
Hi The_Glitch,

I especially like your light maps. I just love glow effects. It is a speciality of mine in 3ds max.

Re: Dice and collsion

Posted: Sun Jan 25, 2015 6:54 am
by rustyk
thanhle wrote: Hey nice shadow on the ninja. Did you create the projection or you using an existing library in here?

Regards
thanh

Hey Thanh, Thanks. that's just Irrlicht's Stencil Shadows. I just played with the settings and alpha so it kinda looks decent.

Do you know any methods where you can use texture or PSSM?

Re: Dice and collsion

Posted: Sun Jan 25, 2015 1:35 pm
by CuteAlien
Asimov wrote:... that CuteAlien wanted so that she could ...
Hehe, I really need to change my nick one day :-) (hint: My real name is Michael)

Re: Dice and collsion

Posted: Sun Jan 25, 2015 2:01 pm
by Asimov
Hi CuteAlien eh Micheal,

Sorry about that. The nick seemed female LOL. Am I the first to think this?
Not many men describe themselves as cute heh heh, or an Alien to think of.

By the way my real name is Thomas, just in case of Confusion :D
Asimov is my favourite author, and I have been known as Asimov for many years on IRC and forums.