Page 6 of 10

Re: The "Lets get ready the rooms models" topic

PostPosted: 30 Jul 2014, 14:10
by Bertram
Thanks! I'll add this asap.

Re: The "Lets get ready the rooms models" topic

PostPosted: 30 Jul 2014, 15:10
by oln
Bertram {l Wrote}:Here are a few questions:
The RT Shader system is initialized here now. (I moved back its initialization from the ODFrameListener back to the render manager as it looks more appropriate.)
https://github.com/OpenDungeons/OpenDun ... er.cpp#L81
and here:
https://github.com/OpenDungeons/OpenDun ... r.cpp#L116

As I can see you've started working on making the shader do its job when creating entities:
https://github.com/OpenDungeons/OpenDun ... .cpp#L1336
https://github.com/OpenDungeons/OpenDun ... .cpp#L1355

But here, a TODO says it's not the right thing. Do you know why?
https://github.com/OpenDungeons/OpenDun ... .cpp#L1340

I say this because if i can add support to specify the normal texture of creature, rooms and tiles at load time,
I do think it would resolve the problem. What do you think?
- Creature normal texture name could be added in the creature definition.
- Room/trap objects and tiles could be hardcoded within the class for now, while waiting for a tileset definition file and such.
- Equipment normals could be defined in the future equipment catalog file.

I can't remember, it's been a while. Generally I wanted to make the code less interdependent, and there is a lot of singleton classes and other classes that do far too much, so maybe it has something to do with that. It may also be that I wanted it to only add shaders when a new model is loaded, rather than a new entity(not sure if does that now or not), and for whatever reason I thought it should be elsewhere because of that.

Now I would have thought that it ought to be possible to specify more of the RTshader stuff in the material files, at the very least specify the extra texture units that are used for normals (and specular mapping for that matter), or at least it should be, but I don't know.

Bertram {l Wrote}:Also, why did you invalidate the default scheme there?
https://github.com/OpenDungeons/OpenDun ... .cpp#L1333

Again, not sure. I think it might have been to force a refresh or something. I was still testing the RTshader out, so there is probably a bit of hacky test-code there.

Re: The "Lets get ready the rooms models" topic

PostPosted: 30 Jul 2014, 16:32
by Bertram
I can't remember, it's been a while. Generally I wanted to make the code less interdependent, and there is a lot of singleton classes and other classes that do far too much, so maybe it has something to do with that.

Fortunately, things are a bit better now, and singletons are much less intertwined when it comes to initialization/destruction.

It may also be that I wanted it to only add shaders when a new model is loaded, rather than a new entity(not sure if does that now or not), and for whatever reason I thought it should be elsewhere because of that.

You're right. The shader should be added only at first model loading. Makes me think we should have some entities catalog file listing the model name linked with all his parameters. This would simplify the loading process and permit tweaking parameters such as normals/scaling/... easily.
I'll have a look at how to create the shader only at first model load and/or when the normal specified isn't the same. (if it can ever happen.)

Now I would have thought that it ought to be possible to specify more of the RTshader stuff in the material files, at the very least specify the extra texture units that are used for normals (and specular mapping for that matter), or at least it should be, but I don't know.

This is true as well. There might be a few answers here, if the reflection map is compatible with what we're speaking about:
https://bitbucket.org/sinbad/ogre/src/3 ... ult#cl-801

Again, not sure. I think it might have been to force a refresh or something. I was still testing the RTshader out, so there is probably a bit of hacky test-code there.

I think I had the answer thanks to the the snippet found above, the material is invalidated and here you were invalidating the whole scheme which is working since it's invalidating all the entities sub render states using it, if I'm correct.

(Note for later: Try to invalidate only the material when reloading the shader once we have shaders at model load time.)

Regards,

Re: The "Lets get ready the rooms models" topic

PostPosted: 30 Jul 2014, 16:35
by Danimal
Now I would have thought that it ought to be possible to specify more of the RTshader stuff in the material files, at the very least specify the extra texture units that are used for normals (and specular mapping for that matter), or at least it should be, but I don't know.

Having normal and specular maps will be a great step when we start reworking the heroes factions models, the shining armor will shine even more :cool: , please dont drop this aspect of the project even if it has to wait for a future date.

Bertram, find attached the converted models for the gold stacks (and a revision of the dormitory texture); i think it would be wise to make treasury tiles hold only 1/4 (or 1/3) of the current gold quantity when treasury code is updated. So bigger treasuries are needed and all levels of gold stacks are displayed on the same room. Lastly, giving the gold stacks a ramdom rotation when created could give a nicely chaotic effect and break the unnatural order appereance it has atm.

One last thing, while capturing a video i saw the main menu refresh at 1530 frames per second!!! while the game ranges 30-50 f/s ; shouldnt it be limited? i know those crazy frames are because my graphics card is good, but it could fry any graphics card regardless of quality if left unatended while at that menu, Bizzard had to do something like that when they released Starcraft 2:
http://www.bit-tech.net/news/gaming/2010/08/03/starcraft-2-doesn-t-limit-framerates/1

Re: The "Lets get ready the rooms models" topic

PostPosted: 30 Jul 2014, 16:51
by Bertram
Hi both,

I've kept searching a few things about the RTSS and I must say that they are still struggling when it comes to add true bump mapping using it. Most users prefer to create GLSL shader and enable OpenGL 3+ features when possible.
Thus, I'll be honest. I'll sooner or later focus on making possible to add a normal to any model at load time, so the game gets prettier the way the dirt and gold are already, and I'd say let's use the Blender2Ogre artificial wisdom to emulate the rest through auto-generated material files when possible.
But the overall simplification and use of specular and diffuse textures will have to wait for better support from Ogre RTSS to happen.

Well, at least until I've found the time to learn a bit more on shaders possibilities. :)

As for the framerate limitation, may I request you open an new issue, Oh Great Owner Of The Open Dungeon Project. :lol:

Thanks for the models and textures!

Re: The "Lets get ready the rooms models" topic

PostPosted: 30 Jul 2014, 17:18
by oln
If RTSS hasn't evolved since I used it, it might be easier to use plain shaders I suppose. I remember having the problem that it crashed when there was too many lights, which didn't happen before I used it.

Re: The "Lets get ready the rooms models" topic

PostPosted: 30 Jul 2014, 17:39
by paul424
I got lost , Could you again explain what RTSS is ? What it makes so diffrent from Cg and GLSL in two sentences ?

Re: The "Lets get ready the rooms models" topic

PostPosted: 30 Jul 2014, 17:42
by Danimal
Oh Great Owner Of The Open Dungeon Project. :lol:

Heh, i guess i have become the man who pulls the strings :D ; now i wonder how my persuasion in a certain other post will work...
Sure, ill create a request/issue.

Re: The "Lets get ready the rooms models" topic

PostPosted: 30 Jul 2014, 21:03
by Bertram
Thanks for the issue :)

Re: The "Lets get ready the rooms models" topic

PostPosted: 30 Jul 2014, 23:00
by Bertram
Ok, new textures, new creatures and gold stacks in: https://github.com/OpenDungeons/OpenDungeons/pull/27

I've asked hwoarangmy to review for the merge, but anyone can of course have a look. :)

Best regards,

Re: The "Lets get ready the rooms models" topic

PostPosted: 30 Jul 2014, 23:02
by Bertram
@Danimal, @Dm3d:

Could you prepare the models for the hatchery? ground tile + center coop model + chicken model for what's next.

Thanks!

Re: The "Lets get ready the rooms models" topic

PostPosted: 31 Jul 2014, 00:35
by Danimal
The chicken model is already in since some time, ill check tomorrow if its behaving correctly

Re: The "Lets get ready the rooms models" topic

PostPosted: 31 Jul 2014, 15:03
by Danimal
It was a bad chicken, the many maps made it white and it was big as an orc. It was fun making an only chichen keeper :lol:

Re: The "Lets get ready the rooms models" topic

PostPosted: 31 Jul 2014, 15:38
by Bertram
eh eh. Lol. Good news guys: I think I fixed the RT Shader system by removing some mistakes in the material and the initialisation. OD is looking much better on my Linux now. :D
I think I should make a new rolling release once this fix is in place, and we'll be able to see whether we can reenable normals on models. ;)

Re: The "Lets get ready the rooms models" topic

PostPosted: 31 Jul 2014, 17:25
by Danimal
Good!! ill be able to test the normal maps in there

Re: The "Lets get ready the rooms models" topic

PostPosted: 31 Jul 2014, 17:32
by oln
Since you asked me to review your patch Bertram, works fine here. (Note: I still am not able to work much on the project, if I somehow gave the impression that I was.)

Re: The "Lets get ready the rooms models" topic

PostPosted: 31 Jul 2014, 17:42
by Bertram
Hi oln,

Since you asked me to review your patch Bertram, works fine here. (Note: I still am not able to work much on the project, if I somehow gave the impression that I was.)

Thanks for the review! :)
Don't worry, you didn't sign any contract. ;) Still, I 'm glad you're around to help or give hints when needed. :)

To me, giving relevant feedback, hints and such is participating, btw.

Regards,

Re: The "Lets get ready the rooms models" topic

PostPosted: 31 Jul 2014, 20:08
by hwoarangmy
Bertram {l Wrote}:I've asked hwoarangmy to review for the merge, but anyone can of course have a look. :)
It's merged. Scarab and rock golem are quite fine to see wandering :)
The game seems more shiny with the new wall textures, especially where the mouse is.

Re: The "Lets get ready the rooms models" topic

PostPosted: 02 Aug 2014, 00:04
by Bertram
eh eh. Cool. :)

Now, I'm officially on the new in-game window.

Re: The "Lets get ready the rooms models" topic

PostPosted: 05 Aug 2014, 19:29
by Danimal
Model by Aaron Eads CC-BY

I animated it, animation name is "Triggered"; we have to settle if it will be used as center or wall object to properly change centers and rotation. Do creatures face the spots while training? it would be a nice touch since the animation simulates dummy being punched.

The next training models will be coming next (sometime this year ;) )

Re: The "Lets get ready the rooms models" topic

PostPosted: 05 Aug 2014, 20:31
by hwoarangmy
Danimal {l Wrote}:One last thing, while capturing a video i saw the main menu refresh at 1530 frames per second!!! while the game ranges 30-50 f/s ; shouldnt it be limited?
As expected, it was my mistake. The patch is done. I used a wrong path on my computer and pushed it directly into the main repository. As it is a small fix, I don't think it is worth removing. I will be more careful next time. But if someone could have a look, I would be grateful.

Re: The "Lets get ready the rooms models" topic

PostPosted: 05 Aug 2014, 21:36
by Bertram
As it is a small fix, I don't think it is worth removing. I will be more careful next time. But if someone could have a look, I would be grateful.

Np. I've just tested it and it's ok.

Regards,

Re: The "Lets get ready the rooms models" topic

PostPosted: 05 Aug 2014, 21:51
by Bertram
@hwoarangmy: Please, remove the logging about entities deletion next time you 're preparing something. It is making the game's end slow, in fact. Thanks :)

Re: The "Lets get ready the rooms models" topic

PostPosted: 05 Aug 2014, 22:14
by Bertram
@Danimal, @hwoarangmy: New pull request adding the new training dummies. They're not animated yet, though.

Re: The "Lets get ready the rooms models" topic

PostPosted: 05 Aug 2014, 22:30
by hwoarangmy
Bertram {l Wrote}:@hwoarangmy: Please, remove the logging about entities deletion next time you 're preparing something. It is making the game's end slow, in fact. Thanks :)
ok I will remove it :)