3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: Enviroment map Refl. factor control  (Read 175 times)

« on: May 31, 2014, 08:28:17 AM »
Is there a way to control the reflection factor of a skinmesh by a script runtime?
I mean the environment mapping.
For example, the reflection factor to be 0.5 if raining and to be 0.1 when sunny weather.
If somebody can answer, I will be VERRRY thankful!
If we don't give up we can achieve the unthinkable!
« Reply #1 on: June 01, 2014, 08:46:28 AM »
this won't have anything to do with Environment Map reflections... (actually, it might)... but if you've set the object shader properties to  0015user_bumpy_glossy_tile, then you can use iShaderFloatSet() and iShaderFloat3Set() to modify the various properties that affect the appearance to make it gradually look more wet (cGlossy for example)...

also, a translucent (ghosted) copy of the skinmesh with scrolling uv  could be used to simulate water flowing...



--Mike
« Last Edit: June 01, 2014, 08:54:41 AM by Mike Hense »
« Reply #2 on: June 01, 2014, 10:00:26 AM »
I know that but for roads it will be more effective if the reflection factor is adjusted. So if anyone knows how... feel free to share (shader, code, trick etc...) Thanks anyway, Mike for the feedback!
If we don't give up we can achieve the unthinkable!
« Reply #3 on: June 01, 2014, 11:29:46 AM »
I like the screenshot. Looks very accurate.
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #4 on: June 01, 2014, 11:42:34 AM »
Yes, of cource but I also use this effect. I want reflective roads, not boxes or other objects.
If we don't give up we can achieve the unthinkable!
« Reply #5 on: June 02, 2014, 05:36:24 AM »
Also, controlling the reflection factor may be a graphical setting in the games. The glossy factor is really good idea, I've used it in one of my games, but it only reflects lightings.

Like here (a rainy road) - the reflection is not only from the light:
If we don't give up we can achieve the unthinkable!
« Reply #6 on: June 02, 2014, 05:47:55 AM »
Yes, of cource but I also use this effect. I want reflective roads, not boxes or other objects.
well if I want reflective roads I have to export the roads as different models and use the specmap bumper glossy shader.
I be trippin!
« Reply #7 on: June 02, 2014, 07:18:08 AM »
then use the same technique on the road...

are you talking about your own custom roads or roads made from the highway construction pieces...


--Mike
« Reply #8 on: June 02, 2014, 09:32:47 AM »
are you talking about your own custom roads or roads made from the highway construction pieces...
--Mike
My custom, made from Skinmesh (the collision is hidden rigidbody). I don't use highway construction kits because they keep an unexpected collision lag.

well if I want reflective roads I have to export the roads as different models and use the specmap bumper glossy shader.
I know that. I've been using the specmap shader, I've been using the glossy factor.

But the question was - is there a way to set the reflection (environment mapping) value runtime by a script or something?
If we don't give up we can achieve the unthinkable!
« Reply #9 on: June 03, 2014, 09:44:09 AM »
Quote
the question was - is there a way to set the reflection (environment mapping) value runtime by a script or something?
i don't think that the environment map is what you're looking  to change here... but to answer your question, i think the simple answer is no...

off the top of my head i don't have an immediate solution... except possibly using Genetransfer's Volume Cubemap shader... 

there are going to be several things to consider trying to arrive at a suitable solution...

first... the road surface isn't reflecting the objects... its mostly the water that is reflecting things... in the real world i mean...

second... in 3DRAD, the object being reflected (skinmeshes) can be controlled via script as to whether they appear in the reflections or not... so that may point to a possible direction..


i think you've come up with the next real challenge PS... to see how close a 3DRAD scene can come to that picture... 


--Mike
 

« Reply #10 on: June 03, 2014, 09:54:32 AM »
Quote
second... in 3DRAD, the object being reflected (skinmeshes) can be controlled via script as to whether they appear in the reflections or not... so that may point to a possible direction..
How exactly?
If we don't give up we can achieve the unthinkable!
« Reply #11 on: June 03, 2014, 10:21:55 AM »
read the skinmesh help PS...  all the way at the bottom it says...


INTERNAL PARAMETERS

The following internal parameters can be accessed run-time by using objects like EventOnValue or Script:
 ....
 ....
Internal flags (write-only). This parameter allows you to control additional functions for the SkinMesh object, as follows: set this parameter to 0 to disable 'Visible In Reflections' mode, set it to 1 to enable.


link all the skinmeshes you want to be reflected to a script and look for the internal flags property in the PUTPUT window... set that index to control the visibility in reflections...


--Mike



« Reply #12 on: June 03, 2014, 10:29:17 AM »
THANKS VERY MUCH! I really did not read this at help, so I sorry. This is perfect solution of my purpose. Thanks Again!!!
If we don't give up we can achieve the unthinkable!
« Reply #13 on: June 03, 2014, 10:41:04 AM »
it's easy to miss one line of info... there's a lot of stuff in the skinmesh help  :D

--Mike

 
« Reply #14 on: June 03, 2014, 10:43:39 AM »
Of course! Sometimes I lose the most important there :D :D :D
If we don't give up we can achieve the unthinkable!
Pages: [1]