Dice and collsion

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: Dice and collsion

Post 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.
AReichl
Posts: 270
Joined: Wed Jul 13, 2011 2:34 pm

Re: Dice and collsion

Post 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).
Asimov
Posts: 246
Joined: Thu Dec 04, 2014 7:41 pm
Contact:

Re: Dice and collsion

Post 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?
thanhle
Posts: 325
Joined: Wed Jun 12, 2013 8:09 am

Re: Dice and collsion

Post 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
Last edited by thanhle on Sat Jan 24, 2015 3:02 pm, edited 1 time in total.
thanhle
Posts: 325
Joined: Wed Jun 12, 2013 8:09 am

Re: Dice and collsion

Post 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
Asimov
Posts: 246
Joined: Thu Dec 04, 2014 7:41 pm
Contact:

Re: Dice and collsion

Post 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
The_Glitch
Competition winner
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Re: Dice and collsion

Post 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
Asimov
Posts: 246
Joined: Thu Dec 04, 2014 7:41 pm
Contact:

Re: Dice and collsion

Post 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.
The_Glitch
Competition winner
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Re: Dice and collsion

Post 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.
Asimov
Posts: 246
Joined: Thu Dec 04, 2014 7:41 pm
Contact:

Re: Dice and collsion

Post 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?
The_Glitch
Competition winner
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Re: Dice and collsion

Post 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.
Asimov
Posts: 246
Joined: Thu Dec 04, 2014 7:41 pm
Contact:

Re: Dice and collsion

Post 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.
rustyk
Posts: 25
Joined: Sat Jan 10, 2015 4:03 pm

Re: Dice and collsion

Post 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?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Dice and collsion

Post 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)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Asimov
Posts: 246
Joined: Thu Dec 04, 2014 7:41 pm
Contact:

Re: Dice and collsion

Post 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.
Post Reply