Legs in a Source mod? No way!

Show off your finished maps, models and other creations. Screen shots are a must!

Re: Legs in a Source mod? No way!

Postby dissonance on Fri Jun 10, 2011 6:11 pm

dark0r wrote:
  • It is not possible to have water and real-time reflections in the same scene;
is it possible to defer the rendering by one frame? if the client is rendering at 30+ fps, it shouldn't be too laggy.
[edit]: semi-related idea; would it be possible to render the water during even-numbered frames and the reflections during the odd-numbered frames? they'd both be pulling fps/2, but with some interpolation it could look passable.

I was also thinking that it might be beneficial to scrap the entire firstperson view, and just make a really highpoly version of the character, sort of a LoD model for use when the distance between the camera and model is near 0. essentially, it'd be a thirdperson view with the camera inside the player's model's head.
...i hope i explained that well enough.
i had fun once, and it was awful.
User avatar
dissonance
Veteran
Veteran
 
Joined: Wed Oct 10, 2007 12:35 am
Location: usa

Re: Legs in a Source mod? No way!

Postby dark0r on Fri Jun 10, 2011 10:03 pm

dissonance wrote:
dark0r wrote:
  • It is not possible to have water and real-time reflections in the same scene;
is it possible to defer the rendering by one frame? if the client is rendering at 30+ fps, it shouldn't be too laggy.
[edit]: semi-related idea; would it be possible to render the water during even-numbered frames and the reflections during the odd-numbered frames? they'd both be pulling fps/2, but with some interpolation it could look passable.

I was also thinking that it might be beneficial to scrap the entire firstperson view, and just make a really highpoly version of the character, sort of a LoD model for use when the distance between the camera and model is near 0. essentially, it'd be a thirdperson view with the camera inside the player's model's head.
...i hope i explained that well enough.

Nothing that eccentric is necessary, we just need two render targets. One for water reflections, one for mirror reflections (at the moment, they both use the water reflection texture, easily fixable).

That would be possible with the system I'm using at the moment. Unfortunately, I've come across a high-demand job which is taking up all of the free time I've got at the moment. I hope I will have the tutorial/code out within a month, but don't quote me on that.
dark0r
Been Here A While
Been Here A While
 
Joined: Sat Mar 25, 2006 10:16 am
Location: de_hell

Re: Legs in a Source mod? No way!

Postby Palermo on Sun Jul 10, 2011 8:57 pm

I tested the code which give dark0r (this one : http://pastebin.com/EpD258aS). I put this code in c_baseplayer.cpp but I have some compile errors :|

Code: Select all
1>e:\modding\mymodsource\src\game\client\c_baseplayer.cpp(2478) : error C2084: function 'ShadowType_t C_BasePlayer::ShadowCastType(void)' already has a body
1>e:\modding\mymodsource\src\game\client\c_baseplayer.h(191) : see previous definition of 'ShadowCastType'
1>e:\modding\mymodsource\src\game\client\c_baseplayer.cpp(2486) : error C2509: 'GetShadowCastDirection' : member function not declared in 'C_BasePlayer'
1>e:\modding\mymodsource\src\game\client\c_baseplayer.h(61) : see declaration of 'C_BasePlayer'
1>e:\modding\mymodsource\src\game\client\c_baseplayer.cpp(2493) : error C2084: function 'bool C_BasePlayer::ShouldDraw(void)' already has a body
1>e:\modding\mymodsource\src\game\client\c_baseplayer.h(260) : see previous definition of 'ShouldDraw'
1>e:\modding\mymodsource\src\game\client\c_baseplayer.cpp(2502) : error C2509: 'GetRenderOrigin' : member function not declared in 'C_BasePlayer'
1> e:\modding\mymodsource\src\game\client\c_baseplayer.h(61) : see declaration of 'C_BasePlayer'
1>e:\modding\mymodsource\src\game\client\c_baseplayer.cpp(2522) : error C2084: function 'int C_BasePlayer::DrawModel(int)' already has a body
1>e:\modding\mymodsource\src\game\client\c_baseplayer.h(261) : see previous definition of 'DrawModel'


I said that I use the SDK template 2007 for a multiplayer mod. Others have had the same problem (see here : http://forums.steampowered.com/forums/s ... p=22858188)

Anybody managed to run this code ? :smt021
User avatar
Palermo
Dumpling
Dumpling
 
Joined: Sun Jul 10, 2011 8:44 pm

Re: Legs in a Source mod? No way!

Postby dark0r on Sun Jul 10, 2011 9:07 pm

Well, remove the other definitions of the functions, and add the respective declarations to the class header.
dark0r
Been Here A While
Been Here A While
 
Joined: Sat Mar 25, 2006 10:16 am
Location: de_hell

Re: Legs in a Source mod? No way!

Postby Palermo on Mon Jul 11, 2011 7:49 am

Thank you for your rapid response. I'll try that !!!!
User avatar
Palermo
Dumpling
Dumpling
 
Joined: Sun Jul 10, 2011 8:44 pm

Re: Legs in a Source mod? No way!

Postby Palermo on Thu Jul 14, 2011 1:00 pm

I did what you said. I see my legs but !

Image


I have effectively a problem :smt021

dark0r, I hope you have less work and you will be able to do a tutorial on these damned legs !!
User avatar
Palermo
Dumpling
Dumpling
 
Joined: Sun Jul 10, 2011 8:44 pm

Re: Legs in a Source mod? No way!

Postby Surfa on Thu Jul 14, 2011 1:22 pm

It is really simple from there on mate. Just recompile the model with a new body group without the arms and head then in the drawmodel function in the clientside player class add a simple check.
Code: Select all
//This isn't right more pseudo code
if(IsFirstPerson())
setBodyGroup(1);
else
setBodyGroup(0);
Surfa
May Contain Skills
May Contain Skills
 
Joined: Sun Dec 30, 2007 3:04 pm

Re: Legs in a Source mod? No way!

Postby Gary on Thu Jul 14, 2011 5:18 pm

I wouldn't use body groups, I would use a new skin. So I could make the invisible mesh still cast depth shadows.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Legs in a Source mod? No way!

Postby dark0r on Sun Aug 07, 2011 11:27 pm

Palermo wrote:I did what you said. I see my legs but !

I have effectively a problem :smt021

dark0r, I hope you have less work and you will be able to do a tutorial on these damned legs !!

In my hacky version, I used custom clip planes to not render above the waist.

Gary wrote:I wouldn't use body groups, I would use a new skin. So I could make the invisible mesh still cast depth shadows.

Fix for ya ;) (more pseudo code, but the current view ID function does exist)
Code: Select all
if(IsFirstPerson() && !GetCurrentViewId() != VIEW_DEPTH)
    setBodyGroup(1);
else
    setBodyGroup(0);


I will be writing up the tutorial tomorrow
dark0r
Been Here A While
Been Here A While
 
Joined: Sat Mar 25, 2006 10:16 am
Location: de_hell

Re: Legs in a Source mod? No way!

Postby Kubata on Mon Aug 08, 2011 4:01 am

This is really really interesting since I feel this is something pretty essential in terms of realism and you seem to be pulling it off well enough!
Image
"You can have all the cool effects and the latest technology, but if you don't nail that 30 seconds of fun, you're not gonna have a great game." - Jaime Griesemer
User avatar
Kubata
Been Here A While
Been Here A While
 
Joined: Sat Jan 28, 2006 12:08 am
Location: Alamogordo, NM
Previous

Return to Showcase

Who is online

Users browsing this forum: No registered users