Jump to content

Engine Questions


The Undying Nephalim
 Share

Recommended Posts

We have skyboxes which the engine can send to a model (check the technique for model_water in public/shaders/effects), you could use that to give an effect sort of chrome-y (it would require a new shader though but I'm sure something can be thought of).

We could somewhat easily support some basic environment map to give a better effect though.

Link to comment
Share on other sites

We have skyboxes which the engine can send to a model (check the technique for model_water in public/shaders/effects), you could use that to give an effect sort of chrome-y (it would require a new shader though but I'm sure something can be thought of).

We could somewhat easily support some basic environment map to give a better effect though.

How would I go about making a texture I have on my model use the model_water shader?

Link to comment
Share on other sites

We have skyboxes which the engine can send to a model (check the technique for model_water in public/shaders/effects), you could use that to give an effect sort of chrome-y (it would require a new shader though but I'm sure something can be thought of).

We could somewhat easily support some basic environment map to give a better effect though.

That would be very cool to have in the game, not that we would use it often, but for mods and demonstrations.

How would I go about making a texture I have on my model use the model_water shader?

Assuming you want to add water to a model, check out the temp/reservoir.xml actor for an example (or, more specifically its water prop). Currently, it is very much hardcoded for water rendering and can't be used on arbitrary textures.
Link to comment
Share on other sites

Well I messed with water materials/shaders and ended up with this:

qnoRB2d.jpg


If only I could just get the model's assigned texture to appear in addition to the skybox, at maybe a 50% to 75% transparency then the chrome effect should look convincing enough. I can't seem to find a way to pull that off in any of the shader files though. Either the texture shows up and no skybox, or skybox shows up and no textures. I can't seem to get either to blend in any way.


Link to comment
Share on other sites

What I got fiddling around:

It's kind of a hack right now but if you like the effect I can make it work better and put it in-game after A18 is released.

Current system can tint the skybox so it looks perhaps more realistic (could probably be made to only color rays that look towards the ground). I also use an optional fresnel so you can make it fully chrome or only reflective at sharper angles.

Edit: yup. Can probably look right on maps where terrain won't change color much.

post-9128-0-62598300-1426084999_thumb.pn

post-9128-0-30480500-1426085001_thumb.pn

post-9128-0-88397900-1426085002_thumb.pn

post-9128-0-22346900-1426085004_thumb.pn

post-9128-0-05342000-1426085006_thumb.pn

post-9128-0-48273200-1426085007_thumb.pn

post-9128-0-43508500-1426085406_thumb.pn

  • Like 7
Link to comment
Share on other sites

What I got fiddling around:

It's kind of a hack right now but if you like the effect I can make it work better and put it in-game after A18 is released.

Current system can tint the skybox so it looks perhaps more realistic (could probably be made to only color rays that look towards the ground). I also use an optional fresnel so you can make it fully chrome or only reflective at sharper angles.

Edit: yup. Can probably look right on maps where terrain won't change color much.

That third screenshot looks pretty much perfect. :yes3:

Link to comment
Share on other sites

What I got fiddling around:

It's kind of a hack right now but if you like the effect I can make it work better and put it in-game after A18 is released.

Current system can tint the skybox so it looks perhaps more realistic (could probably be made to only color rays that look towards the ground). I also use an optional fresnel so you can make it fully chrome or only reflective at sharper angles.

Edit: yup. Can probably look right on maps where terrain won't change color much.

Interesting! I guess it doesn't take into account units, structures, actual terrain, so it would have to be used very carefully. Looking at the bottom left screenshot, it would be strange if there was a larger unit, structure, or mountain next to the building but not reflected on its shiny roof. Would it be feasible to at least map terrain, since ours is static?
Link to comment
Share on other sites

I guess my next question is if there is an example of a unit or building that has a passive ability that removes objects around it and/or replaces objects around it. One of my races terra-forms the ground around their buildings, and I'd really like every rock/bush/tree to replace themselves into little crystalline objects when the building is done. It looks kind of weird having a crystalline ground decal and then tropical palm trees and desert rocks sitting on top of it. :sweatdrop:

Link to comment
Share on other sites

Interesting! I guess it doesn't take into account units, structures, actual terrain, so it would have to be used very carefully. Looking at the bottom left screenshot, it would be strange if there was a larger unit, structure, or mountain next to the building but not reflected on its shiny roof. Would it be feasible to at least map terrain, since ours is static?

Well everything is feasible, the question is "how" and "can it be fast enough?". I'm not an expert in reflections and I don't think we can use what we do for water here, so I'd have to look into it.

Very interesting indeed wraitii! nice experiment :D I wonder if the intensity of it could be driven by the specular map ^_^

Could be driven by anything really. I was thinking alpha of the specular map or the normal map.

Well I tried out Wraitii's chrome shader, tah dah:

xeBFw7A.jpg

Looking pretty good! It could be slightly improved though, I'll be working on that a bit.

Do you use A18 or the SVN version?

For your latest post: it is certainly possible to code a new component that does that, I'm not too sure about existing ones.

Link to comment
Share on other sites

I guess my next question is if there is an example of a unit or building that has a passive ability that removes objects around it and/or replaces objects around it. One of my races terra-forms the ground around their buildings, and I'd really like every rock/bush/tree to replace themselves into little crystalline objects when the building is done. It looks kind of weird having a crystalline ground decal and then tropical palm trees and desert rocks sitting on top of it. :sweatdrop:

That would need some code, but it wouldn't be very hard either. Do you have people that can code in your team? We could give a bit of guidance.

It also depends on the details of course, like what happens when the changing unit disappears, should it only change the look, or should all stats be replaced too, stuff like that.

An other way is to give the building a bigger obstruction, so the player can't build it near to trees (or other buildings) anyway.

Link to comment
Share on other sites

Well everything is feasible, the question is "how" and "can it be fast enough?". I'm not an expert in reflections and I don't think we can use what we do for water here, so I'd have to look into it.

Could be driven by anything really. I was thinking alpha of the specular map or the normal map.

Looking pretty good! It could be slightly improved though, I'll be working on that a bit.

Do you use A18 or the SVN version?

For your latest post: it is certainly possible to code a new component that does that, I'm not too sure about existing ones.

The alpha in the normalmap is already being use by the parallax effect. However the alpha of the specularity map is only used for self-illumination effect which is almost non-existent, and it needs a flag or a different material type to be enabled, so I think the alpha layer of the specmap would be perfect for this.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...