The "Lets get ready the rooms models" topic

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

Postby Bertram » 30 Jul 2014, 14:10

Thanks! I'll add this asap.
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

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

Postby oln » 30 Jul 2014, 15:10

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.
User avatar
oln
 
Posts: 1020
Joined: 26 Oct 2010, 22:16
Location: Norway

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

Postby Bertram » 30 Jul 2014, 16:32

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,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

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

Postby Danimal » 30 Jul 2014, 16:35

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
Attachments
Dormitory_texture.png
GoldStacks.zip
(2.51 MiB) Downloaded 288 times
OpenDungeons 2014-07-30 16-55-17-091.png
User avatar
Danimal
OD Moderator
 
Posts: 1407
Joined: 23 Nov 2010, 13:50

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

Postby Bertram » 30 Jul 2014, 16:51

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!
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

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

Postby oln » 30 Jul 2014, 17:18

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.
User avatar
oln
 
Posts: 1020
Joined: 26 Oct 2010, 22:16
Location: Norway

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

Postby paul424 » 30 Jul 2014, 17:39

I got lost , Could you again explain what RTSS is ? What it makes so diffrent from Cg and GLSL in two sentences ?
User avatar
paul424
OD Moderator
 
Posts: 660
Joined: 24 Jan 2012, 13:54

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

Postby Danimal » 30 Jul 2014, 17:42

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.
User avatar
Danimal
OD Moderator
 
Posts: 1407
Joined: 23 Nov 2010, 13:50

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

Postby Bertram » 30 Jul 2014, 21:03

Thanks for the issue :)
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

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

Postby Bertram » 30 Jul 2014, 23:00

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,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

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

Postby Bertram » 30 Jul 2014, 23:02

@Danimal, @Dm3d:

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

Thanks!
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

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

Postby Danimal » 31 Jul 2014, 00:35

The chicken model is already in since some time, ill check tomorrow if its behaving correctly
Attachments
ChickenCoop no normal.zip
(1.7 MiB) Downloaded 296 times
Farm_tile.zip
(724.22 KiB) Downloaded 290 times
User avatar
Danimal
OD Moderator
 
Posts: 1407
Joined: 23 Nov 2010, 13:50

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

Postby Danimal » 31 Jul 2014, 15:03

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:
Attachments
Chicken no normal.zip
(567.16 KiB) Downloaded 302 times
User avatar
Danimal
OD Moderator
 
Posts: 1407
Joined: 23 Nov 2010, 13:50

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

Postby Bertram » 31 Jul 2014, 15:38

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. ;)
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

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

Postby Danimal » 31 Jul 2014, 17:25

Good!! ill be able to test the normal maps in there
User avatar
Danimal
OD Moderator
 
Posts: 1407
Joined: 23 Nov 2010, 13:50

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

Postby oln » 31 Jul 2014, 17:32

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.)
User avatar
oln
 
Posts: 1020
Joined: 26 Oct 2010, 22:16
Location: Norway

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

Postby Bertram » 31 Jul 2014, 17:42

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,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

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

Postby hwoarangmy » 31 Jul 2014, 20:08

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.
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

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

Postby Bertram » 02 Aug 2014, 00:04

eh eh. Cool. :)

Now, I'm officially on the new in-game window.
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

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

Postby Danimal » 05 Aug 2014, 19:29

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 ;) )
Attachments
OpenDungeons 2014-08-05 20-11-33-908.png
OpenDungeons 2014-08-05 20-09-38-689.png
OpenDungeons 2014-08-05 20-09-16-809.png
TrainingDummy1.zip
(116.25 KiB) Downloaded 293 times
User avatar
Danimal
OD Moderator
 
Posts: 1407
Joined: 23 Nov 2010, 13:50

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

Postby hwoarangmy » 05 Aug 2014, 20:31

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.
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

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

Postby Bertram » 05 Aug 2014, 21:36

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,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

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

Postby Bertram » 05 Aug 2014, 21:51

@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 :)
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

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

Postby Bertram » 05 Aug 2014, 22:14

@Danimal, @hwoarangmy: New pull request adding the new training dummies. They're not animated yet, though.
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

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

Postby hwoarangmy » 05 Aug 2014, 22:30

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 :)
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Who is online

Users browsing this forum: No registered users and 1 guest