Jump to content

Bricktronic

Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by Bricktronic

  1. Cool, yea IIRC you should be able to call setSkin() to choose a skin for the model displayed in the GuiObjectView using the stock code. Yes, of course I am willing to share my GuiObjectView code! I've been meaning to upload it as a resource for awhile so it's coming soon!


    Now, dealing with skinning in the first place is just a little bit tricky but it's not too bad once you learn the ins and outs of naming the materials. I'll post more detail specifically about skinning and proper material setup either a bit later tonight( if I get the time ) or tomorrow. It's worth going over here one solid time for any who may be reading as well. Stay tuned!

     

    I found a way to bypass all that. I used a duplicate of the playermodel, scripted it, and now it just replaces the main material of the datablock. Thanks! :D

  2. @Bricktronic: I skimmed over my updated GuiObjectView code and stumbled on the 'stock' T3D console function for setting skins. Before we overkill this thing completely, try to use this:

     

    // Define the skin we want to apply to the main model in the control.
    %skinName = "disco_gideon";
    
    // Inform the GuiObjectView control to update the skin to the defined skin.
    %thisGuiObjectView.setSkin(%skinName);
    

     

    That might be more along the lines of what you were looking for to begin with. Sorry, I've been running all my builds custom for quite some time and have a tendency to overlook "what was stock" sometimes. I believe, dealing with skins, what my resource achieves is it allows the model to have multiple skins at the same time. As in, if you have a model with multiple sub-meshes that each have their own material. Anyhow, as promised, I'm still polishing my updated resource.

     

    Thanks for the replies, I'll try it soon. I'll have to research into how to use skins, as I'm used to TGE rather than T3D. I'm willing to add the C++ code, if you're kind enough to pass it on, however, if I can use skinning, I'd rather do that. We're struggling a bit as a team, as none of us know much C++, and we're all new to the latest T3D. Thanks! :D

  3. So I'm working on player customization GUI, however, I can't seem to get the mesh to switch materials in the GuiObjectView.. I've been researching for hours, and dumping over and over, but I can't seem to come across an explanation, thus I'm here. If there's a way to access the object through the GuiObjectView, please do tell. I've tried getObject(), and that returns nothing with any number in the args. I basically need the ID of the player model I've set inside the GuiObjectView.

     

    function replaceSimpleMaterial(%matname,%mapto,%RGBA)
    {
    	if(%e==1)
    	{
    		%se = "emissive[0] = 1;";
    		%add = "emissive";
    	}
     
    	if(%g==1)
    	{
    		%sg = "glow[0] = 1;";
    		%add = %add @ "glow";
    	}
     
    	%r = getWord(%RGBA,0);
    	%g = getWord(%RGBA,1);
    	%b = getWord(%RGBA,2);
    	%a = getWord(%RGBA,3);
    	$eval = "singleton Material(" @ %matname @ %add @ %cl @ ")" NL
    	"{" NL
    		"mapTo = " @ %mapto @ ";" NL
    		"diffuseColor[0] =  \"" @ %r-0.1 SPC %g-0.1 SPC %b-0.1 SPC %a @ "\";" NL
    		"specular[0] = \"" @ %r SPC %g SPC %b SPC %a @ "\";" NL
    		"specularPower[0] = " @ 50 @ ";" NL
    		%se NL
    		%sg NL
    		"translucentBlendOp = \"None\";" NL
    	"};";
    	eval($eval);
    	DecoyDAE.setMeshMaterial(%mapto SPC 2,%matname @ %add @ %cl);
    	echo(%RGBA);
    }

     

    I'm using DecoyDAE at the moment, which just makes the targeted node disappear. :?: :?: :?:

  4. Did you weight paint the model properly? Looks like some vertices are attached to the root node.

    Are the bones parents set correctly? The arms seem to have wrong parents.

     

    Weight paint??? I'm new to modeling for games, sorry :s.. I tried the pose editor in blender to make sure when they rotated that they moved the right stuff..

  5. So, I'm trying to put my playermodel in-game, just rigged (as a tsstatic), and the positionings are all weird and the body of the player is stretching downwards. I've tried CTRL A > Rotation, Scale, and Location, but it doesn't seem to fix. Keyframes or not, it still does this. I'm very frustrated and disappointed in myself over this.

    Screenshot_2.thumb.png.012f5770bacb867e738a84bf2bfeb13a.png

    375274228_Screenshot_2-Copy.png.767ca430e390c0dcc976bdf1d81ed460.png

  6. I don't understand this situation in general, to be honest.. So, basically, when I add an armature to my model, after exporting from Blender, the scaling of about every body part completely messes up.. I'm very frustrated, I'm working with a team to make another game, but I can't get my part done due to this and I've re-done the model, the jointing, and the animations at least 5 times now.. :?: :oops:

    The material, I understand is orange, I can fix that myself, it's just the scaling and disposition here..

    This is just sucking out all of my motivation in general as well. Ugh.

    P.S. this is my first time within this community.


    Screenshots attached.

    s2.thumb.png.d2e782bd9c7f4511a85cad6244b21cd2.png

    Screenshot_1.png.9b86652724677456354892d2af23c1ee.png

×
×
  • Create New...