Attempt at 3D #9
Replies: 1 comment
-
Not code, but I've been tinkering with vertex colors and materials for that workflow. For instance that eye has no textures, uses a Ybillboard material and is actually slightly 3D. Could allow for some comical effects, such as if you change the Z scale it makes the eye pop out... if you enable grow on the material it makes the pupil+eye itself larger (this would apply to every UI instance, but I also have distance fade on this so ideally if this were animated/scripted you'd only see it where intended, and I have no idea if other models would benefit from these options). I have about 9 materials so far (2 of which are different glass materials, some others like wood and a fur material I am not so sure of until I test with other models), I plan to apply these to models using an import script (which likely will be gdscript to start with at least). See this video by Octodemy: mmZ11qSGD3k (Change how your 3D MODELS are imported). Section on shared materials is most important, though I would like to include the single mesh functionality as well (or whatever I can do to remove the outer container that makes the object not centered). I am not sure how I want to handle transparency (and its impact), for instance I have not explored actually including alpha as part of the vertex colors for glass/other effects. I have had the thought that deleting faces should be another method for stylized transparency that works with any material without needing partial transparency (though I guess that does lose some capability like light/reflections on a fully transparent surface). |
Beta Was this translation helpful? Give feedback.
-
EDIT: Updated code, probably going to try to go mouse+KB only.
There are also some errors that I'm not sure if are caused by me or not.that was related to a door I tried to make with pure physics, though it just flew off the hinges (so unrelated to code)Maybe I'm overextending myself, but I figured a 3D demo would be nice. Given how the difficulties here happen I'm not even sure 2D would be much easier.
This is what I have so far, relative WASD movement (camera rotation with Q and E), not-great jumping:
Editor actions needed for this:
I was thinking that the code I have now might work with controllers (I have a Steam Controller), though I use that less and was thinking it may not be good to add more niche-ness. Though it would be fun to use the analog triggers or perhaps gyro. EDIT: Yes, but need to remove .normalized for analog control. This is way easier than mouse input.
In the future I may use simple 3D models w/vertex colors, though it would be nice if I had an importer script that could use object names to set existing Godot materials (matte, metal, glass, perhaps more variations especially with vertex color(-as-albedo) as input such as for emission).
Beta Was this translation helpful? Give feedback.
All reactions